#include<stdio.h> int main() { int n,i,j,t; int a[1000]; int val; int fal=0; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&a[i]); for (j = 0; j < n - 1; j+...