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 1567. SMS-spam

Something is wrong with this problem!!!
Posted by Varduhy 9 Feb 2008 20:56


Edited by author 12.02.2008 22:20
Re: Something is wrong with this problem!!!
Posted by CHIDEMYAN SERGEY 11 Feb 2008 02:22
Try such test:
pokupaite gvozdi tolko v kompanii gvozdederov i tovarischi!#9654

My AC program output:119
Your program output:113
Good luck!
Re: Something is wrong with this problem!!!
Posted by Varduhy 12 Feb 2008 19:08


Edited by author 12.02.2008 22:20
Re: Something is wrong with this problem!!!
Posted by CHIDEMYAN SERGEY 12 Feb 2008 20:45
Maybe cin.getline() works uncorrectly.
Try such way:
[code deleted]
and you'll get AC.


Edited by author 13.02.2008 18:36
Re: I finally got AC!!!
Posted by Varduhy 12 Feb 2008 22:18
Thank you very much, as while studying your solution I understood what was wrong with my program! My program readed only one line! But yours could read more.
I changed  mine :
from
cin.getline(a,1000)
...

to
while(cin.getline(a,1000))
{
...
}
and got AC!

There is a wrong sentence in the text of the problem:
"The single line of input contains the slogan. "
"The single" had made me think that way.

So thank you one more time! :)