|
|
back to boardWA#10 (without overflow). Help. For x:=0 to p-1 do For y:=0 to p-1 do Begin t1:=x*x; t2:=y*y; If (t1+t2) mod p=k mod p then ... Before, t1,t2:int64. There is no Overflow and no TLE. Help, If you can. Thanks a lot. Re: WA#10 (without overflow). Help. Send me you code maybe I help you. tolik-tol@inbox.ru Re: WA#10 (without overflow). Help. oh i find. t1:=x*x it is overflov but t1:=x; t1:=t1*x; not overflow. or t1:=sqr(x) too not overflow. sqr=64bit x*x=32bits but i think you got TLE. good luck. Thanks!! Thanks a lot! I've got AC. I'll take it in! |
|
|