|
|
back to boardTo test makers What 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" Re: To test makers In test#42 n = 1 then print Yes Re: To test makers 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 :-) Re: To test makers I add this code to my last solution and got AC... if (n * (n - 1) == 0) { cur = e; ok = 1; // Yes } Re: To test makers 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 Re: N=2 in test 42 (-) I got wrong answer at test 33. does it enough to use long long as data type. Re: N=2 in test 42 (-) Use 0 or 1 to present matrix value's Re: N=2 in test 42 (-) 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 And perhaps it's also good to use & for multiplying and | for summing...(-) Posted by SPIRiT 3 Nov 2006 16:18 Time Lmit Exceeded Posted by Hayk 4 Nov 2006 02:10 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... Re: Time Lmit Exceeded Try use express method (for example A^5 = (A^2)^2*A THANK YOU Posted by Hayk 12 Nov 2006 22:57 Thank you my Friend! AC. Ti daril mne RADOST' (I eto v jizni glavnoe)...:) Re: Time Lmit Exceeded 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 Re: To test makers 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 |
|
|