Advertisement
Guest User

Untitled

a guest
May 26th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.39 KB | None | 0 0
  1. var a, b, count, d, e, i, n, ch: longint;
  2. begin
  3. a:=0;
  4. d:=0;
  5. e:=0;
  6. count:=0;
  7. b:=-$80000000;
  8. readln (n);
  9. for i:=1 to n do
  10.     begin
  11.     readln (ch);
  12.     if ch=0 then a:=i;
  13.     if (ch>=b) and (ch<0) then
  14.        begin
  15.        b:=ch;
  16.        d:=i;
  17.        end;
  18.     if (ch<0) then inc (count);
  19.     end;
  20. if count mod 2=0 then e:=d;
  21. for i:=1 to n do
  22. if (i<>a) or (i<>e) then writeln (i);
  23. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement