Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var n,k0,km,x,i,min,c : integer;
- begin
- readln(n);
- c:=0;
- min:= 10000;
- km:=0;
- k0:=0;
- for i:=1 to n do begin
- readln(x);
- if x=0 then k0:=i;
- if x<0 then begin
- inc(c);
- if abs(x)<min then begin
- min:= abs(x);
- km:=i;
- end;
- end;
- end;
- writeln(c);
- writeln(k0);
- writeln(km);
- for i:=1 to n do
- if ((c mod 2 = 1) and (i<> k0)) then if (i<> km) then write(i,' ')
- else if (i<> k0) then write(i,' ');
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement