Reminder: in case of any technical issues, you can use the lightweight website m1.codeforces.com, m2.codeforces.com, m3.codeforces.com. ×

noob_kiddo's blog

By noob_kiddo, history, 4 months ago, In English,

This is my code for round 568, B: https://pastebin.com/1qM7m5sj In it the elements of the frst array is not getting incremented. Can someone please explain what is the problem here. Thanks in advance.

 
 
 
 
  • Vote: I like it
  • -9
  • Vote: I do not like it

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

There is newline character after n in input. This will terminate your first while loop after reading that '\n'. You have to read it and discard.

»
4 months ago, # |
  Vote: I like it +27 Vote: I do not like it

interesting social experiment, gamegame