|
|
вернуться в форумWA 16, or how I lost 13 tries Hi all. I tried to solve this problem with standart method. I devide all numbers on GCD, and calculate all x in A*x + B*y and I tried find the maximum T, T <= N. In cicle I write something like this: if ( max < T ) { max = T; //something too } and have WA16. After WA16 I tried fix my program, but don't find anything global. Fix something right on wrong, I 13 times get WA 1 - 16. Then I changed ( max < T ) on ( max <= T ), and don't send, because did not think, what that will be changed WA16 on AC. I was wrong. I don't know why that fix is right, can someone explain me? Thanks. Sorry for bad English. Re: WA 16, or how I lost 13 tries Test 2 2 1 Re: WA 16, or how I lost 13 tries Ouch... Thanks, I understood my problem. I am write int q, w; instead of int q = 0, w = 0; |
|
|