ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1585. Penguins

A common mistake
Posted by D_G 1 Apr 2012 00:23
I noticed a lot of people complain about WA2. Just wanted to share my experience, since I got WA2 several times. Don't forget that after you read the number, you haven't read the newline after it. So cin.getchar + cin.ignore and getline(cin, ...) get that exact newline.
Re: A common mistake
Posted by namlunoy 10 Jun 2013 00:23
Thank you! :D
Re: A common mistake
Posted by RL_Agent 14 Jan 2022 22:28
Thank you!