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

WA#12????
Posted by zhangjx 21 Aug 2009 12:27
Who can tell me…………
Why got WA#12?
Re: WA#12????
Posted by KALO 3 Feb 2010 19:50
if you have to cut a word, the word must end with string1+string2 (without '-'). Therefore I used:
String h=word.toUpperCase();
String s=(string1+string2).toUpperCase();
if (h.endsWith(s)){
int z=h.lastIndexOf(s) //<-- !!!
...

This helped me (in Java) to avoid WA#12.
Re: WA#12????
Posted by 107th 8 May 2023 12:07
Following test helped me to pass test #12:

0
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.