Common BoardNew anti-(N*N*M) test was added. TL was decreased to 1 second (this TL better corresponds to original 3 seconds in 2006). About 100 authors lost AC. TL was corrected to 1.5 seconds why do you always speak and write english? aren't you Russian? please, give the Russian version of this problem!!!!! English is necessary, Russian is optional I'm not english i'm kazakh so, can you explain me how to do this write me to input.txt@mail.ru Есть вещь такая, как переводчик google. Попробуй ;) Marat Bakirov speak right. I'm Vietnamese. I don't speak English. But I want play on the Timus Online Judge. Why?
Because, I want learn English from the problem and the conversion on forum of discuss. Thank. I think have some mirror gramar of these sentence. Edited by author 30.03.2010 17:18 this is not a good place to learn english from... the problem statements have lots of grammar and lexical mistakes, and most of the people on forums don't speak english so well either. I'm Turkish. I don't know russian. if you don't know english that's your problem. by the way there's a russian version of this site on the left cornere of the page; if you click on RUS you can solve all the problems ;-) Edited by author 10.03.2013 20:15 fuck you son of a bitch turkish Can anyone give some test cases? #include<bits/stdc++.h> using namespace std; int i, j, k, l, x, y, z, m, n, ans; string first, second; int dp[1010][1010][3][4], dir[1010][1010]; int make_way(int first_pile, int second_pile, char c, int state) { //cout << first_pile << ' ' << second_pile << endl; if(first_pile == n && second_pile == n){ if(state > 1) return 0; else return 1; } if(state > 1) return 0; int p = 0, q = 0, r = 0; char d; if(c == '0') d = '1'; else d = '0'; if(first_pile < n){ if(first[first_pile] == c){ p = make_way(first_pile + 1, second_pile, c, state + 1); } else{ p = make_way(first_pile + 1, second_pile, d, 1); } } if(second_pile < n){ if(second[second_pile] == c){ q = make_way(first_pile , second_pile + 1, c, state + 1); } else{ q = make_way(first_pile , second_pile + 1, d, 1); } } if(p == 1){ dir[first_pile][second_pile] = 1; } else if(q == 1) dir[first_pile][second_pile] = 2; dp[first_pile][second_pile][c - '0'][state] = p | q; return dp[first_pile][second_pile][c - '0'][state]; } int main() { cin >> n >> first >> second; ans = make_way(0, 0, '0', 0); if(!ans){ cout << "Impossible" ; return 0; } for(i = 0, j = 0; i < n || j < n; ){ cout << dir[i][j]; if(dir[i][j] == 1) i++; else j++; } return 0; } I guess input for test #10 is larger than 9. According to my understanding of problem statement, output is always 1 or 2 or 3. The algorithm is pretty straightforward: if all the digits of input except first one, is 9 then print 3. If one among them is 8 and remaining is 9 then print 2, otherwise 1. Any thoughts? I thought Vasya has to stay in his place, maybe that's where it confused me. But now I read statement again and it says "But Vasya found it very boring as he was the first in the line and didn’t have to change his place." Hello, I got WA#6 But for few days I'm unable to find a test that fails for my algorithm. Does anyone has any hints? I would really appreciate any help. Help me please! min base for 123 is 4 not 3. so for 123 the correct answer is 4. min base for 123 is 4 not 3. so for 123 the correct answer is 4. Thank u so much... ^_^ I had wa28 when in dfs-search visited each string ony once, but we must visit strings more than once if coming to this person post became shorter. So Dijkstra looks like is needed. I used many dfs call from v=1 until stabilization("seismic waves from v=1") I use bfs but I also get WA 28. You are using standard bfs, when once formed vertex skipped after, but in this problem we must do processing of each event of vertex echivement on subject of string length. This test help me to solv WA28 10 0000000000000000000000000 2 444444444444444444444444 777777 11111111111111111111111 3 55 777777 8888 22222222 3 11111111111111111111111 444444444444444444444444 8888 3333 1 444444444444444444444444 444444444444444444444444 3 2 55 8888 55 3 3333 444444444444444444444444 6 6 2 22222222 444444444444444444444444 777777 3 444444444444444444444444 6 55 8888 3 11111111111111111111111 22222222 777777 999999999999999999999999 2 444444444444444444444444 55 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX answer 9 0000000000000000000000000 22222222 3333 444444444444444444444444 55 6 777777 11111111111111111111111 8888 Please note that falicos's test is incorrect; the line "444444444444444444444444 3 2 55 8888" implies there is a user named "2", which is not specified by the input and hence illegal. If you remove the "3" from that line you get legally formatted input with the given answer correct. If you interpret the above test to mean there is a user named "2" with no followers, the answer would be 10 0000000000000000000000000 11111111111111111111111 2 22222222 3333 444444444444444444444444 55 6 777777 8888 i also got wa on 5 and then found out i considered room and floor both can be at most 100. but problem says floor is 100 and room can be at most 500. My answers are fully identical to the given one. But I have WA#1. Maybe, are there some format-specified features? Try this: 1 1 -1 ans: 1 3 Edited by author 05.09.2010 15:36 Edited by author 22.09.2012 19:16 Edited by author 22.09.2012 19:16 Thanks very much... It's really help me. Why are not correct 12 4 6 3 1 1 1) (())(())(()) =>3 2) (())(()))))(() =>0 3) )))(()(()))((( =>2 4) )))))((()))))((((((( =>1 5) )()()()()()()()(())( =>9 6) ))(()( =>1 I get WA 13 again and again and I can not find a mistake. My main logic looks like this: for(j=0;j<n;j++) {l=(x[j]-X)*(x[j]-X)+(y[j]-Y)*(y[j]-Y)+(z[j]-Z)*(z[j]-Z); if (l-D<1e-10) D=l;} printf("%0.6f\n",acos((2-D)/2.0)*r); I believe it is correct..So can anybody help me with finding a bug, please? Does anyone have a same problem? I had exactly this kind of problem. WA13. then I wrote: double tmp= (2 - minL)/2.0; tmp-=0.00000000001; if (tmp<-1) tmp=-1; return r*Math.acos(tmp); and AC. It is problem with precision, of course. Please, somebody, give the 4th test What an amusing problem! Now it seems to be easy - in contrast to prima facie :^) Special thanks to Vorokh Sergey and Mamonov Anton, who proved correctness of my solution. And some test data input #1: 0 0 90 5 5 4.9 output #1: 28.2176 input #2: 0 0 90 5 0 -0.000001 output #2: 31.4159 Can you explain the answer to the input#1? I can't understand why. Can anybody help me? Try these two tests: 5 10 -5 3 -1 15 ---- 5 15 -1 3 -5 10 In both right answer is 22. try this: aaaba is 2 aa aba not 3 aaa b a |
|