Hi,
I was doing previous div 1 round and I got WA on the second task ( 33rd testcase). I wasn't able to understand why I got Wrong Answer, so I asked question on contest blog and had a few answers. They were very helpful, but still I do not understand whole sotry about my mistake and some different outputs of my program ( all programs looks same for me ).
Contest submission 25046285
First submission after contest [submission:25087377 (only added getchar(), immediately after cin )
Second submission after contest 25087412 (I changed place of getchar(), and wrote it one line above)
I understood why I needed to add one extra getline(), but I do not understand why getchar() is needed and why second and third submissions gives different verdicts.
I will be grateful for any help :)