Show all threads Hide all threads Show all messages Hide all messages |
WA#12???? | zhangjx | 1257. Hyphenation | 8 May 2023 12:07 | 3 |
Who can tell me………… Why got WA#12? 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. Following test helped me to pass test #12: 0 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa. |
A very strange thing (may be WA#9 skip) | Neznakomec | 1257. Hyphenation | 23 Jul 2013 03:13 | 1 |
A bug or feature the situation that last <ENTER> does not count as an error?? For example on test " 12 un-usual for-ced re-al sum-mer N-ED home-work sec-ret ho-lidays Wi-zard th-Er L-so Holi-days Harry Potter was a highly unusual boy in many ways. For one thing, he hated the summer holidays more than any other time of year. For another, he really wanted to do his homework but was forced to do it in secret, in the dead of night. And he also happened to be a wizard. " my program gives away " Harry Potter was a highly unusual boy in many ways. For one thing, he hated the summer holi- days more than any other time of year. For another, he really wanted to do his homework but was for- ced to do it in secret, in the dead of night. And he al- so happened to be a wizard.<ENTER> " (All the attention on line carry after "wizard.") I've done it to pass WA#9, cause understood that output: " " (nothing) on input like " <ENTER> " not good... Edited by author 23.07.2013 03:14 Edited by author 23.07.2013 03:14 |
Why "really"??? | Korotkevich Piotr | 1257. Hyphenation | 17 Feb 2012 23:58 | 4 |
Why??? >other time of year. For another, he >really I think: >other time of year. For another, he re- >ally Edited by author 29.09.2004 15:59 """""Данная запись означает, что если слово оканчивается!!! строкой строка1строка2, то строка2 может быть перенесено на другую строку, а после строка1 должен появиться символ переноса ‘-’.""""" Т.к. слово "really" не оканчивается на "real". """""This record means that if a word is ended with a substring string1string2, then string2 may be carried to the next line and after string1 appears a hyphen-mark ‘-‘"""""" Because word "really" isn't ended with a substring "real". Edited by author 17.02.2012 23:58 Edited by author 18.02.2012 00:01 |
For all who get WA on test #2 (+) | Victor Barinov (TNU) | 1257. Hyphenation | 24 Oct 2011 18:53 | 3 |
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! 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. |
If you have WA#6 | Aleksander | 1257. Hyphenation | 14 Jul 2011 23:06 | 1 |
I've sought this bug for an hour) I was just printing words not in the same case, that was in tests) - when I was doing transfer, I printed only lowercase letters Good Luck Edited by author 14.07.2011 23:08 |
WA #13 | Vedernikoff Sergey | 1257. Hyphenation | 20 Aug 2009 20:50 | 2 |
WA #13 Vedernikoff Sergey 7 Sep 2007 03:58 If there are several rules that can be used the the word is to be carried to the next line according to the rule that provides the minimal length of the carried part of the word. |
WA #7 | partisan | 1257. Hyphenation | 13 Jun 2009 23:15 | 2 |
WA #7 partisan 13 Jun 2009 21:57 Does anyone know, what can be in it? My program passes all the tests from the forum on other cases. WA #7 also is very rarely WA. I read char by char using while(c!=EOF) and getchar(). The trouble was printing redundant "Enter" when the 40th symbol is not the symbol of word. |
Test for you!!! (+) | Pio | 1257. Hyphenation | 28 Dec 2008 19:51 | 4 |
::---:: if yuo got Wa4: {1}1 {2}Jk-lk {3}abc {4} {5}abs ::---:: ::---:: if yuo got Wa9: {01}15 {02}un-usual {03}for-ced {04}re-al {05}sum-mer {06}A-Ys {07}N-ED {08}home-work {09}a-aa {10}sec-ret {11}ho-lidays {12}Wi-zard {13}th-Er {14}L-so {15}A-lso {16}Holi-days {17}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa- {18}Harry Potter was a highly unusual boy in many ways. {19}For one thing, he hated the summer holidays more than any {20}other time of year. For another, he really {21} wanted to do his homework but was forced to do it in {22}secret, in the dead of night. And he also happened {23}to be a wizard. {24}idays holidays holidays holidays holidays holidays holidays holidays holidays holidays holidays holidays holidays holidays holidays olidays, holidays,,, ho,,lidays holidays holidays holidays holidays holidays {25}......................................also................................................................................................................................ ::---:: Edited by author 23.08.2005 21:41 what's the right answer for the test? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa- Harry Potter was a highly unusual boy in many ways. For one thing, he hated the summer holi- days more than any other time of year. For another, he really wanted to do his homework but was for- ced to do it in secret, in the dead of night. And he al- so happened to be a wizard. idays holidays holidays holidays holida- ys holidays holidays holidays holidays holidays holidays holidays holidays ho- lidays holidays olidays, holidays,,, ho, ,lidays holidays holidays holidays holi- days holidays ......................................a- lso..................................... ........................................ ........................................ ........... |
Hints | Denis Koshman | 1257. Hyphenation | 19 Aug 2008 16:04 | 1 |
Hints Denis Koshman 19 Aug 2008 16:04 (for C++) read 1st part using gets() read the text using getc() don't put 2 line breaks if '\n' happens to be 41th character in a line. |
AC hardly!Poor my knowledge!HINT,come in | Love SJC | 1257. Hyphenation | 22 Mar 2008 17:32 | 1 |
I think this problem is terrible,but it's good for you to be careful. I hve tried to readln(String) and read(char). I WA at 10 when I used string,I don't know why.But now I have ACed with char,I can help you who want to AC this problem. TEST2 when the line has 40 symbol,don't write a carriage return at once,because there may be one in the input text. sample 0 aaaaa...(forty a) test4 you may WA at this test when you use char there maybe no carriage return in the end of test, so you shoule write the last word sample 0 abc ab(with no carriage return) test8 you must use seekeof be careful,there may be empty lines in the end,use eof please sample 0 aaa
test13 I think it's the best helpful test. it had say that if S1S2 in the end of a word,you can carry the s2 to the next line with a '-' behind s1. do you use POS? POS only returned the first place when a string appeared. plese have a munual check. sample 1 cc-cc ccccccccc...(41 c) good luck.poor for my english.I'm new. Edited by author 22.03.2008 17:45 |
Something strange... | Loky_Yuri [USTU] | 1257. Hyphenation | 16 May 2007 21:24 | 4 |
I now that the first test for this problem is the sample (I check it with a stupid programm which output the strings of sample, and this programm has WA#2). And for this test my REAL program give the corret answer, but when I try to submit it I have ACCESS VIOLATION. I try even do all my arrays [1..1000] and replace string on ansistring (i write in PASCAL), but all my attempts was failed. Can anybody help me? PS If you want I can show my program [Code deleted by author] Edited by author 16.05.2007 21:22 You call CutString(str); with str='' ant it fails while dl <> length(str) do begin dl := length(str); //if dl=0 then break; CutString(str); //162 string end; Kirill Edited by author 16.05.2007 20:51 |
Please. I have WA#3! | {AESC USU} Evgeny Kurpilyanskij | 1257. Hyphenation | 7 Feb 2007 16:35 | 2 |
Please help me. Edited by author 06.02.2007 19:54 |
Why word 'unusual' wasn't changed in example? | Денис | 1257. Hyphenation | 8 Sep 2006 21:41 | 1 |
|
A question. | VC15 | 1257. Hyphenation | 20 Feb 2005 01:46 | 2 |
If I have a rule "im-mi", may I break the word "swimming"? Sorry, I wasn't attentive when I was read the problem description. The answer to my question is "NO". |
Could you give me more examples of punctuations? (+) | Maigo Akisame (maigoakisame@yahoo.com.cn) | 1257. Hyphenation | 23 Oct 2004 18:52 | 3 |
e.g. 1. Is there always a space after a punctuation? 2. Can hyphenating rules contain punctuations? 3. What should I do if a line has length 41 and only 1 comma at the end? Can I carry the comma to the next line? 1. No 2. No (only "-" and latin letters) 3. Yes But in my solution i don't consider this cases. |
Problem 1257 was rejudged (-) | Vladimir Yakovlev (USU) | 1257. Hyphenation | 17 Oct 2004 13:42 | 2 |
|