Strange behavior in submissions page and c++ input during : Technocup 2017 — Elimination Round 1

Правка en1, от EbraM96, 2016-10-15 14:34:24

A: I submitted my code to problem B and I was redirected to my submissions page there were no entries in the submissions page ! I had to refresh the page to see my submission !

B: These two submissions (Problem B) :

[submission:http://codeforces.me/contest/727/submission/21448936]

[submission:http://codeforces.me/contest/727/submission/21449637]

the only difference is that in the first one I used :

while(scanf("%c" , &c)==1)

to get all the characters from the input and I got "Wrong answer on pretest 1"

in the second one I used the c++ cin to get the whole string first then process it :

cin>>s;

and I got "Pretests passed" costing me +7 minutes to get it accepted :(

why did this happen ????? thought scanf() works until it reaches end of file !

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский EbraM96 2016-10-15 17:45:50 165
en2 Английский EbraM96 2016-10-15 14:37:16 90
en1 Английский EbraM96 2016-10-15 14:34:24 929 Initial revision (published)