|
|
back to boardShow all messages Hide all messagesWhat is test 42? please, give me some hint 10 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 In my WA 42 programm output "No" In test#42 n = 1 then print Yes Thanks, but I think you are wrong. I checked it: int n; ... int main() { cin >> n; if(n == 1) { double *f = new double[0xfffffff]; cout << "Yes"; return 0; } ... } And this code has WA (on test 42), but not Crash or Memory limit. Therefore n is no 1 in test 42. I need some hints as before :-) please :-) I add this code to my last solution and got AC... if (n * (n - 1) == 0) { cur = e; ok = 1; // Yes } It's strange, but I have WA 42 as before. :-( Who was need rejudge? It's so strange. My desicion was AC (2 day ago), but now I don't know what can I do with this problem. WA 42 I got wrong answer at test 33. does it enough to use long long as data type. Use 0 or 1 to present matrix value's Thank u very much Anton , I got accepted. I don't know why i didn't think about that Still i am quite a stupid. Edited by author 03.11.2006 09:37 Edited by author 03.11.2006 09:37 Hello collegues ! :) Can you tell me ... are you geting matrix B (with 0 1). I tried that way and got TLE. it comes about n*(n+1)*n^3 operatons. Maybe there are more soft methods... Try use express method (for example A^5 = (A^2)^2*A Thank you my Friend! AC. Ti daril mne RADOST' (I eto v jizni glavnoe)...:) But erection of a matrix in a square borrows n^3. => O(2n*(n^2)*n^3) and this had TL((( Maybe erection of a matrix in a square can work more quickly? Edited by author 16.09.2007 14:32 I add this code to my last solution and got AC... if (n * (n - 1) == 0) { cur = e; ok = 1; // Yes } It's strange becanse N>=2 according to problem statement |
|
|