|
|
вернуться в форумCould anybody help me?My program always get WA! var a:array[1..8000]of 0..1; n,m,i,j,k,max,b:integer; begin fillchar(a,sizeof(a),0); readln(n);b:=0; for i:=1 to n do begin read(m);max:=0; for j:=1 to m do begin read(k); if a[k]=0 then max:=max+1; end; if max>1 then begin a[i]:=1;b:=b+1;end; end; if n-b<=b then begin writeln(n-b); for i:=1 to n do if a[i]=0 then write(i,' '); end else begin writeln(b); for i:=1 to n do if a[i]=1 then write(i,' '); end; end. Re: Could anybody help me?My program always get WA! test 3? my program looks quite the same no answer:( |
|
|