|
|
вернуться в форумWhat's wrong with my program?? WA at 10# Послано boats 6 ноя 2008 11:50 program t1220; var i,k,m,n:longint; st:array[1..1000] of longint; a:array[0..100000] of longint; f:array[0..100000] of word; s:char; begin readln(n); for i:=1 to n do begin read(s,s,s,s); if s='H' then begin readln(k,a[i]); f[i]:=st[k]; st[k]:=i; end else begin readln(k); writeln(a[st[k]]); st[k]:=f[st[k]]; end; end; end. Re: What's wrong with my program?? WA at 10# Послано Atik 17 фев 2009 01:07 I think this is wrong in this program: f:array[0..100000] of word; WORD type too small, but array[0..100000] of longword is too large... I've used this strange array: morethen50k:array[0..100000] of byte; ;) Edited by author 17.02.2009 01:08 Edited by author 17.02.2009 01:08 |
|
|