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 1102. Strange Dialog

Please help WA#1
Posted by Nisarg Shah 30 Dec 2008 18:50
I used getc and the idea of finite automaton to solve this problem and my program is working fine on the sample test case as well as all test cases given in thread.
Still I am getting WA#1. I know it is not same as sample case.
Please give me some good test from case 1.
Thanks.
Re: Please help WA#1
Posted by Nisarg Shah 31 Dec 2008 14:37
I have used getc(stdin), but if I give input from file by <<, I have to put an extra getc(stdin), whereas if I write it on command prompt, that is not required. Why is this so? Why input from file has an extra character at end of line?
Re: Please help WA#1
Posted by Taras Vasylyshyn 5 Jan 2010 23:39
I thought that in the end of n-th line it is EOF. But this line finishes by '\n' similarly as another lines. That's why I got WA#1.