|
|
back to boardTime limit exceeded #9 Posted by Intro 29 Nov 2008 01:22 why Time limit exceeded? program P1028; {$APPTYPE CONSOLE} uses SysUtils; var x,k,i,n,u:word; zx:array[0..32000]of word; z:array[0..15000]of word; begin {$IFNDEF ONLINE_JUDGE} assignfile(input,'C:\Интро\Проэкты\EXE/input.txt'); assignfile(output,'C:\Интро\Проэкты\EXE/output.txt'); reset(input); rewrite(output); {$ENDIF} readln(n); k:=0; repeat inc(k); readln(x); i:=x; inc(z[zx[x]]); repeat inc(zx[x]); inc(x); until (x=32001); until k=n; for i := 0 to n-1 do writeln(z[i]); {$IFNDEF ONLINE_JUDGE} close(input); close(output); {$ENDIF} end. |
|
|