Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program 5375;
- var i, n, k_oz, a, i_oz, i0, m_oz: integer;
- Begin
- readln(n);
- k_oz := 0;
- i_oz := 0; i0 := 0;
- for i := 1 to n do
- begin
- readln(a);
- if (a < 0) then
- begin
- if (k_oz = 0) then
- begin
- m_oz := a;
- i_oz := i;
- end;
- if (a > m_oz) then
- begin
- m_oz := a;
- i_oz := i;
- end;
- inc(k_oz);
- end;
- if (a = 0) then i0 := i;
- end;
- for i:= 1 to n do
- begin
- if (not((k_oz mod 2 <> 0) and (i = i_oz) or (i = i0))) then
- writeln(i);
- end;
- End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement