|
|
вернуться в форумWhy WA 2??? ALL FORUM TESTS ARE RIGHT ANSWER!!! program ytr; var n,i,p,d,t,min:longint; a:array[1..100000] of longint; b:boolean; begin readln(n); t:=-1; b:=true; p:=1; for i:=1 to n do begin read(a[i]); if b then begin min:=a[i]; b:=false; end; inc(t); if a[i]<min then begin p:=i-t; d:=t; t:=0; min:=a[i]; end; if (i=n) and (t>d) then p:=i-t; end; write(p); end. |
|
|