|
|
вернуться в форумCrash Test 10 Why crash tell me please? program My; var n,k,i,i2,en,j,count:longint; a,b:array [1..4000] of longint; block:array[1..3,1..4000]of longint; ready:boolean; begin en:=1; for i:=1 to 3 do begin readln(n); for i2:=1 to n do begin read(k); ready:=true; for j:=1 to en do begin if k=a[j] then begin ready:=false; if block[i,j]=0 then begin inc(b[j]); block[i,j]:=1; end; end; end; if ready = true then begin a[en]:=k; b[en]:=1; block[i,en]:=1; inc(en); end; end; end;
for i:=1 to en do begin if b[i]=3 then inc(count); end; writeln(count); end. |
|
|