c java python #include <stdio.h> int main(){ int N,n,a[1001]; while(scanf("%d",&N) != EOF){ a[0] = 0; for(int i = 1; i < N+1; i++){ scanf("%d",&n); a[i] = n; if(a[i] < a[i-1]){ //后面的都与前一位比一次,形成由小到大的顺序 ...