|
|
вернуться в форумWhy crash(access violation) on test 9 ? Послано yazh 21 сен 2011 19:53 program qwerty; var a,b,c:array [1..200] of string; n,i,j,m,k,h,x:integer; begin m:=0; readln (n); for i:=1 to n do readln (a[i]); for i:=1 to n-1 do for j:=I+1 to n do if a[i]=a[j] then begin m:=m+1; b[m]:=a[i]; end; c[1]:=b[1]; k:=1; for i:=1 to m do if b[i]<>c[k] then begin h:=0; for x:=1 to k do if b[i]=c[x] then h:=1; If h<>1 then begin k:=k+1; c[k]:=b[i]; end; end; for i:=1 to k do writeln (c[i]); end. This is my code. I don't know why crash. Help me please. |
|
|