|
|
back to boardWA24 who can give me tests or say where was mistake in you? this is my general code: Procedure Solve; var L,R,M : LongInt; BeGiN L:=0; R:=10000001; While R - L > 1 do Begin M:=(L + R) shr 1; if Can(M) then L:=M else R:=M; End; While (Can(L + 1)) and (L < 10000000) do Inc(L); Answer:=L; EnD; Who see mistake??? --- Sorry my English is Bad:) AC 0.625 2 891 КБ [code deleted] Edited by moderator 05.12.2023 19:55 Re: WA24 who can give me tests or say where was mistake in you? Posted by maksay 23 Apr 2008 20:12 My reason for WA # 24 was a bug in code of reading data You need to change a(i,j) AND a(j,i). I didn't do that and had WA. What's more, here are some tests if anebody needs: 4 5 1 4 1000 3001000 1 2 440 3001200 1 3 449 3001500 3 2 1 3001500 2 4 990 3001500 answer 15 4 5 1 4 1000 3001000 1 2 440 3001200 1 3 450 3001500 3 2 1 3001500 2 4 990 3001500 answer 12 |
|
|