|
|
My solution is 20 lines. Easy problem. 14 lines solution with using recursive function. I have recursive function too. Whatever, Good Job! 7 lines with recursive func in python 3. Or 14 with normal look a code. My solution in Python 3 took 0.078 seconds and 516 KB with recursion. Can you do it faster? you can try to to it with stack instead of recursion Test 15 is a space or multispace!! Be careful!! Test : abcdefgh Answer : dbacfeg Is this answer correct? no, correct answer is "cbdafegh" Does anybody has any idea? Me too and I dont think I'm wrong Send your email. I help you. Test : abcdefgh Answer : dbacfeg Is this answer correct? нет! как минимум, в первом слове букв больше :D Edited by author 01.05.2012 15:15 Edited by author 01.05.2012 15:15 Oh, of course :D I want to say, is answer dbacfegh is correct. But now I already know, that my old algorithm hadn't been correct and here is just recursion. My program passes tests "kyaVs alisse uop." and "gtorhoprahy" but get WA1. Please help. Now AC. The problew was that I used getchar() instead of gets(). With array of 20001 chars (with '\0') I got wa17, but of 20002 I got AC. So the input string can contain 20001 chars, can't it? And in the statement has been said "The text is no longer than 20000"... please smb send me the solution or the idea my mail is vgvavlad@gmail.com [code deleted] Edited by moderator 19.11.2019 23:23 Thank you very much for this algoritm! This is exellent program! Mods, send input data for test1 please. Trying to solve the problem second day already. Thx vanvector@mail.ru If using Java BufferedReader pay attention on number of symbols read. While testing in eclipse I used N-1. But on Timus server N-2 was accepted Edited by author 06.10.2009 16:13 What is "г рковоаззи- аул лаывгвдяыеат"? I have no desire to suffer with Russian letters in the console. Answer: "корова из-за угла выглядывает". Translated by Google: "cow from behind a corner peeps". Sorry for my bad English :) orthography gives gtorhoprahy but “one eye, one horn, but not a rhino” gives “reo ac wpeosr tu fdbmo heinoa cnrer” where are the comma's gone??? somebody please help me understand the problem Edited by author 10.08.2009 12:02 Edited by author 10.08.2009 12:02 Edited by author 10.08.2009 12:02 Why Crash (stack overflow)#8 ???? Help,please =) Use directive somelike #pragma comment(linker, "/STACK:16777216") This is described in the FAQ to this site. |
|
|