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 1027. D++ Again

How can i find the end of data?(c++)
Posted by Gelioscope 24 Jun 2011 05:05
When i use "while((sym=getchar())!=EOF)", i get WA#1
When i use "while((scanf("%c",&sym)>0)", without changing the rest of the program, i don't get WA#1, but scanf is very slow! I get TL#2.
"while(!feof(stdin))" also give me WA#1.
How can i find the end of data?!
Re: How can i find the end of data?(c++)
Posted by Gelioscope 24 Jun 2011 17:55
Tell me, please! How to do this? In FAQ written "while ((c = getchar()) != EOF)", but it doesn't work!!