I've noticed this too ... I try also to solve this problem , but got WA of course I see only two possibilities:
1. Exist one or more tricks, which are not discovered by noone.
2. Judge data has a mistake.
I have one question also: In description says about special treating hyphen if it very last character in line. What means this? If after hyphen exeists only spaces, it's very last character ? I don't think so
Best regards
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)
I also got WA. I wrote a lot of asserts into my program, so I can say there exists no input where hyphen is the last non-space character in a line, but spaces follow. There exists also no input where hyphen is last character in a line, but there is no word with alphabet characters before it. And the next line following a hyphen always begins with non-space characters and has at least one alphabet character inside.
As there seems to be no tricky or invalid input, I fear that judge output has a mistake.
Here are the test cases that I used to check my program:
thi-s .i.s. a test-
#case. #
twenty-
one twenty-
two stop
#
If I correct understand you, you test judges output very well
I am faced with the same problem like you - I think that my program should be correct , but I got WA as all others
Adrian, I think, that you lost one space is last line of your output. I think that this line should be "_stop" where "_" means space, but this should only cause PE ...
Best regards
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)
I wanna to make a comment about this problem ... hope it will be help to others....
1. this is a very simple problem
2. though only problem is that what will u do when u encounter a
'-' (hypen) at the end of a line.....
3. the word containing hypen will go to the next line
and a space is included in the place of a hypen.
4. and do the same as stated in the problem.....
Hope this time u will solve the problem wink:
Every line will be terminated by a character which isn't whitespace (which will be followed immediately by an end-of-line character). The input will be terminated by a line consisting of a single `#'.