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 1427. SMS

Is test 7 valid?
Posted by Ionel Corneliu Gog 11 Feb 2006 14:47
Please check test 7. I submitted 8 times and I can pass it. I read with gets,fgets.. I think it doesn't have EOLN('\n').
No, it has (-)
Posted by Dmitry 'Diman_YES' Kovalioff 11 Feb 2006 14:50
Re: No, it has (-)
Posted by Ionel Corneliu Gog 11 Feb 2006 15:08
That's crappy. If you read like this: scanf("%d%d\n",&n,&m)... it doesn't work and if you read like this scanf("%d%d",&n,&m);gets(line);.. is working.. Can explain me why is this difference?
About test generation (-)
Posted by Dmitry 'Diman_YES' Kovalioff 11 Feb 2006 15:14
All the tests:
1) were typed in Windows Notepad manually
or
2) were generated by Delphi program via Writeln() procedure
Re: No, it has (-)
Posted by Fly [Yaroslavl_SU] 11 Feb 2006 15:38
It's true. Input is BAD!!!
No, it has (-)
Posted by pavlodar_lyceum8_5 11 Feb 2006 15:40
Input is correct. It is the problem of C++ if the code works wrong (-)
Posted by Dmitry 'Diman_YES' Kovalioff 11 Feb 2006 15:41
i know it's a tricky case. but i got stuck on case18. i don't know why.
Re: Input is correct. It is the problem of C++ if the code works wrong (-)
Posted by Fly [Yaroslavl_SU] 11 Feb 2006 22:12
Is "scanf( "\n" );" == "gets( line );"???
Why not?
Re: Input is correct. It is the problem of C++ if the code works wrong (-)
Posted by Igor E. Tuphanov 12 Feb 2006 05:40
I've not very much exp. in C, but see this bug first time. Maybe, it would be better to read by streams?
completely not.
Posted by Safe Bird 12 Feb 2006 14:41
it is NOT a bug, but a TRICKY case
Posted by Safe Bird 12 Feb 2006 14:41
what is more, if i remove"if (feof(Fin)) break;" i will get TLE on 17!! i think case17 must be wrong...
Posted by Safe Bird 12 Feb 2006 14:47