Блог пользователя Blaz

Автор Blaz, история, 3 года назад, По-английски

Hello,

With some friends we are very confused because of this. We have these two different codes:

The weird thing is that they are the same code, but the ONLY difference is how we read the input to the global string "path".

On the AC code:

string sAux; // line 69
cin >> sAux;
 
path = sAux;

On the TLE code:

cin >> path; // line 69

The submission that gives TLE reads directly into the global variable, while the AC code reads into an intermediary local string and then assigns to the global variable.

We have absolutely no idea why or how this makes any difference.

Any ideas? Thanks!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +15
  • Проголосовать: не нравится