|
|
вернуться в форумAfter rejudge I had WA42 and Crash on #41. Hints are here (+) I had crash because of trivial stack overflow, my recursion never ended. Check the recursion exit condition. Hint for WA42: Power 0 of M(nxn) matrix is a matrix 1 0 .. 0 0 1 .. 0 ........ 0 0 .. 1 Good luck and have fun :) Re: After rejudge I had WA42 and Crash on #41. Hints are here (+) As i can understand from changes i did to make my solution work, 42th test was --------- 1 0 --------- And it's considered that [0]^0 = [1] But Power 0 of [0]-Matrix is undefined, isn't it? Re: But Power 0 of [0]-Matrix is undefined, isn't it? Sorry, there may be different definitions. But you may be sure that [0]^0 = [1] in this problem. Re: After rejudge I had WA42 and Crash on #41. Hints are here (+) My program keeps getting WA in the test 42 but works fine for the input: 1 0 whose output is Yes In fact my exponentation is ok when the exponent is 0. Any possible explanation? N >= 2 now (+) I agree, that test 1 0 is not correct, because [0]^0 in not defined in problem statements. New tests 41 and 42 have been modified. N >= 2 now for this problem. Submissions have been rejudged back. Re: N >= 2 now (+) After second rejudge all my attempts (except one or two with silly mistakes) were accepted =) |
|
|