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 1257. Hyphenation

For all who get WA on test #2 (+)
Posted by Victor Barinov (TNU) 17 Nov 2005 16:40
This test was VERY useful for me:

0
abcabcabcabcabcabcabcabcabcabcabcabcabca
hello

Correct Answer:

abcabcabcabcabcabcabcabcabcabcabcabcabca
hello


But my old programs gave:

abcabcabcabcabcabcabcabcabcabcabcabcabca

hello


And it was the reason of WA(2).

Good Luck!
Re: For all who get WA on test #2 (+)
Posted by svr 18 Aug 2007 17:06
For debugging use parameter Len=2,3..
which later may be established in 40.
You will generate tests mush more simply.
My serous bug was what I was readind text
string by string  using getline. But last symbol in text
may not be equal to 10 and last part of text will be lost.
For AC very important to work with last symbol of
text rightly. If it=10- new line,in other case-no.
After recognizing these problems I got AC very quickly
without automats and other hard methods.
TLE probles was absent and it means that tests are simple
and doubtly achive max characteristics- 1000*255.
Re: For all who get WA on test #2 (+)
Posted by Edric Mao 24 Oct 2011 18:53
Thanks