|
|
вернуться в форумTime limit exceeded Послано david 7 фев 2013 21:57 What's wrong? var n,p,k,i:longint; m:array [1..65535] of longint; begin readln(n); p:=1; k:=0; for i:=1 to n do readln(m[i]); for i:=1 to n do begin while m[i]>p do begin p:=p+k; k:=k+1; end; if p=m[i] then write(1,' ') else write(0,' '); p:=1; k:=0; end; end. Re: Time limit exceeded Послано Aguero 11 фев 2013 02:49 you shold use maths method, maths formula |
|
|