|
|
вернуться в форумWhy crash(access violation) on test #20? Послано Pascy 16 дек 2006 23:29 Var a,b: array[0..10000] of integer; i,j: integer; n: integer; k: integer; Begin read(n); a[0]:=0; for k:=1 to n do begin read(a[k]); a[k]:=a[k]+a[k-1]; end; read(n); for k:=1 to n do begin read(i,j); b[k]:=a[j]-a[i-1]; end; for k:=1 to n do writeln(b[k]); End. Re: Why crash(access violation) on test #20? 1 <= N <= 10000 = 10^4 0 <= Q <= 100000 = 10^5 !!! Really you don't need second array. Just read query and write result for it. Edited by author 18.12.2006 03:37 |
|
|