| Show all threads Hide all threads Show all messages Hide all messages |
| why WA10 ? | Lev_Kireenko 🐬 | 1226. esreveR redrO | 29 Jul 2016 18:24 | 1 |
python 3 my code : import sys for t in sys.stdin : s = '' for i in range(len(t)): if (ord(t[i]) >=97 and ord(t[i]) <= 122) or (ord(t[i])>=65 and ord(t[i])<=90): s += t[i] else : if len(s) > 0 : print(s[len(s)-1:0:-1]+s[0], end='') s = '' print(t[i], end='') print(s, end='') Edited by author 29.08.2016 01:57 |
| WA test 10 |: | havij4 | 1073. Square Country | 29 Jul 2016 10:33 | 2 |
Hi I got WA on test 10 |: I need some testcase! PLZ HELLLLLP MEEEE! :D |
| WA#10 help? please! | Insaf | 1038. Spell Checker | 29 Jul 2016 01:22 | 6 |
Please help me with WA#10. Can you give me the test in which my program outputs this WA. program Project1; {$LONGSTRINGS ON} {$APPTYPE CONSOLE} uses SysUtils; var c,lc:char; ans:longint; b:boolean; begin {$IFNDEF ONLINE_JUDGE} reset(input,'input.txt'); rewrite(output,'output.txt'); {$ENDIF} ans := 0; b := false; c := #1; while not eof(input) do begin lc := c; read(c); if (c in ['a'..'z']) and (not b) then inc(ans); if (c in ['A'..'Z']) and (lc in (['A'..'Z'] + ['a'..'z'])) then inc(ans); if not (c in ['.','?','!',' ',#10,#13]) then b := true; if c in ['.','?','!'] then b := false; end; write(ans); end. -a. Answer is 1, but your program gives 0. My program give rigth answer for test : input: -a. output: 1 WHY I HAVE WA10????????!!!!!!!!!!!!!!! if you failed on test 10,try the follwing data or see the item Posted by Alam Md Mahabub September 27, 2001 14:23 ****************************************** Re: Can you give any judge data for which this code gives WA. Posted by SHMAK November 05, 2007 05:17 /*************************************** strange... but there are 5 mistakes: The old va[R]sag my Antonesgh..%[s]g4mahng 35tsavx 3mnkxb o o oo A[A] gfsd . [s]dgw a a[A] Aa ********************************* the weild part is that the last sentence doesnot contain a full stop, a question-mark or an exclamation mark
for me WA10 got away after i added check for digits in my condition to start new word. e.g. "A0B" have 0 errors |
| WA 31 (help) | Combatcook | 1198. Jobbery | 28 Jul 2016 14:51 | 1 |
Hello! If you have WA 31 (I haven't seen these yet, but all is possible:D), try these test: 5 2 0 3 0 1 0 3 5 0 4 0 -- 4 5 0 Maybe it will help you. Edited by author 28.07.2016 14:58 |
| What do I need to do for notinvertible functions? | Dumpty Humpty | 1554. Multiplicative Functions | 28 Jul 2016 14:49 | 3 |
My AC solution outputs 0. Apparently, the problem statement is incomplete. It should guarantee that for the given tests a solution always exists. It is told that F is a multiplicative function. So F(1)=1 by definition. |
| WA20 | Lev_Kireenko 🐬 [SESC 17] | 1795. Husband in a Shop | 27 Jul 2016 17:25 | 1 |
WA20 Lev_Kireenko 🐬 [SESC 17] 27 Jul 2016 17:25 What it is test 20 ? Edited by author 27.07.2016 17:35 Edited by author 27.07.2016 17:35 Edited by author 27.07.2016 18:36 |
| Why WA4? | Ivan11Start | 2015. Zhenya moves from the dormitory | 27 Jul 2016 17:20 | 3 |
Please, give me some tests. I can't understand why i get WA4. Please make sure your solution meet the requirement "If two people share an apartment, each pays half of the rent." This is that I missed in my first solution. I did this, but it's still WA4. |
| WA26 and some tests :) | pperm | 1384. Goat in the Garden 4 | 27 Jul 2016 09:04 | 4 |
Why wa26?) Tests help me to pass test 2 and test 3. 9 1 -1 2 1 1 0 2 2 0 1 -2 2 -1 0 -2 1 -1 -1 1.00 12 2 1 1 1 1 2 -1 2 -1 1 -2 1 -2 -1 -1 -1 -1 -2 1 -2 1 -1 2 -1 1.41 AC 6 0 0 0 -3 1 -2 2 -2 3 -3 3 0 1.00 Test help me WA15 MarX 27 Jul 2016 09:04 ThankU for the tests, they were useful to me, but I still having WA on test 15, any help will be apreciated. |
| C++ Test | Qussy | 1083. Factorials!!! | 26 Jul 2016 12:05 | 1 |
never mind... Edited by author 28.07.2016 07:32 |
| Always WA1 what am i doing wrong? | newcomer | 1837. Isenbaev's Number | 25 Jul 2016 18:13 | 1 |
class Node: def __init__(self, name, number): self.name = name self.number = number self.children = [] def d(self, name): for i in self.children: if i.name == name: self.children.remove(i) for i in self.children: i.d(name)
def fnc(cmds, item, isenb, root): for c in cmds: if item.name in c: for n in c: if not n in isenb: isenb[n] = item.number + 1 item.children.append(Node(n, item.number + 1)) elif isenb[n] > (item.number + 1): isenb[n] = item.number + 1 root.d(n) item.children.append(Node(n, item.number + 1)) for i in item.children: fnc(cmds, i, isenb, root)
import sys if __name__=='__main__': n_command = input() if(int(n_command) > 0): isenb = {} cmds = [] for i in range(0,int(n_command)): cmds.append(input().split()) flag = False for c in cmds: if "Isenbaev" in c: flag = True break if flag: root = Node("Isenbaev", 0) isenb["Isenbaev"] = 0 fnc(cmds, root, isenb, root) for c in cmds: for i in c: if not i in isenb: isenb[i] = "underfined" s = '' for key,value in sorted(isenb.items()): if s == '': s += (str(key) + ' ' + str(value)) else: s += ('\n' + str(key) + ' ' + str(value)) sys.stdout.write(s) else: sys.stdout.flush() |
| TLE#5, how can i solv this with fibonachchi, | Bobur | 1081. Binary Lexicographic Sequence | 25 Jul 2016 13:18 | 7 |
i solved, but my algo so slow, how can i solve this problem faster, sorry for my english. thx! Lets consider the sequence for n=4: 0000 0001 0010 0100 0101 1000 1001 1010 Try to find a connection between the number of all sequences with length 4, those which begin with 0 and those which begin with 1. After that look "deeper" and "deeper" into each sequence and try to find a way to generate the k-th sequence. Sorry that I'm not telling you the algorithm directly, but the feeling when you discover it yourself is great :) (it's even greater when you get Acc from 1-st submition :P). I hope that you find this helpful. thanks a lot, i think i can find it!! wow i feel good ¬¬_.'[smoke] ty for the idea Tnk u. Ur hint is very helpful. I got AC! Lets consider the sequence for n=4: 0000 0001 0010 0100 0101 1000 1001 1010 Try to find a connection between the number of all sequences with length 4, those which begin with 0 and those which begin with 1. After that look "deeper" and "deeper" into each sequence and try to find a way to generate the k-th sequence. Sorry that I'm not telling you the algorithm directly, but the feeling when you discover it yourself is great :) (it's even greater when you get Acc from 1-st submition :P). I hope that you find this helpful. Thank u so much.... :) It really feels wow... :D |
| What is Test 6? | Sherxon WIUT | 1081. Binary Lexicographic Sequence | 25 Jul 2016 13:09 | 2 |
Please give me test 6? Try these Tests: Test 1: 43 999999999 Ans=>1010000100100001010101000001000101000100101 Test 2: 42 999999999 Ans=> -1 Test 3: 40 100000000 Ans=>0010101001010100001010000010101010000010 |
| Giving WA #35 | paarth | 1354. Palindrome. Again Palindrome | 24 Jul 2016 09:35 | 3 |
Can anyone please suggest the test case which might give me WA35... I have used string , also tried with character array... and KMP algorithm ..... please do reply My solution was rejudged and I got WA 35 :) They added tests against hashes modulo 2^64. |
| if you have wa#1 | Baurzhan | 1542. Autocompletion | 22 Jul 2016 19:32 | 3 |
don't print endline symbol after last query: for(int i=0;i<queries;i++){ answer_the_query(); if(i!=queries-1) printf("\n") //without this line it got wa#1! } Edited by author 15.09.2010 08:42 Your solution works.Thanks a lot!!! |
| Add charts to Timus profiles using a browser extension | Alexander Borzunov FT-16 {koλ} [UrFU] | | 20 Jul 2016 22:45 | 1 |
I've made a browser extension that adds charts of count of solved problems to Timus profiles. You can find screenshots, installation instructions, and source code here: http://github.com/borzunov/timus-charts/blob/master/README.md The extension is available for Chrome, Firefox (with Greasemonkey) and Opera. Edited by author 20.07.2016 22:47 |
| 22-ой тест не пошёл, помогите мне пожалуйста, уже и не знаю какие тесты вводить | Platt96 | 1786. Sandro's Biography | 20 Jul 2016 17:11 | 3 |
#include<iostream> #include<list> using namespace std; bool in_the_range(char a) { if (a >= 'a'&&a <= 'z') { return true; } else { return false; } } int chance_one_symb(char in_symbol, char out_sybmbol) { if ((in_the_range(in_symbol) && in_the_range(out_sybmbol)) || !(in_the_range(in_symbol)) && !(in_the_range(out_sybmbol))) { if (in_symbol == out_sybmbol) { return 0; } else { return 5; } } else { if (((int)in_symbol + 32) == out_sybmbol || ((int)in_symbol - 32) == out_sybmbol) { return 5; } else { return 10; } }
} int main() { char str[200] = { NULL }; const char word[6] = { 'S', 'a', 'n', 'd', 'r', 'o' }; int final_cost = 60, temp_cost = 0; cin.get(str, 200); list<char> temp; list<char>::iterator ptr; for (size_t i = 0; i < 6; i++) { temp.push_back(str[i]); } int j = 0; for (size_t i = 6; i <= strlen(str); i++) { for (ptr=temp.begin(); ptr!=temp.end(); ptr++) { temp_cost += chance_one_symb(*ptr, word[j]); if (temp_cost>=final_cost) { break; } j++; } j = 0; if (temp_cost < final_cost) { final_cost = temp_cost; } temp_cost = 0; temp.pop_front(); temp.push_back(str[i]); } cout << final_cost; return 0; } Edited by author 14.07.2016 22:33 Seeing a similar code on other tasks previously, i can already tell the problem by intuition. Try something like <194 symbols>Sandro. |
| dont know russian :P | shweta | | 20 Jul 2016 16:49 | 2 |
i came to know about this very good russian site, e-maxx.ru... but i dont know russian, can anybody help how to read the content in english ? |
| Java как обычно | Chernobuk | 1068. Sum | 19 Jul 2016 19:26 | 3 |
import java.util.*; public class N1068 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); if ((n>=1)&&(n<10000)) System.out.print(n *(n + 1) / 2); if ((n<1)&&(n>-10000)) System.out.print(-((-n) *(1 -n) / 2) + 1); } } что здесь не так? "Не превосходит" означает "меньше либо равно, но не больше" Edited by author 19.07.2016 19:08 |
| WA #5 | Landsknecht | 1083. Factorials!!! | 19 Jul 2016 15:32 | 1 |
WA #5 Landsknecht 19 Jul 2016 15:32 Could anybody give me this test please? Other tests are welcome as well :) Edited by author 19.07.2016 15:33 |
| Note: a can be greater than n | Otrebus | 1132. Square Root | 17 Jul 2016 23:41 | 1 |
|