#include <cstdio> using namespace std; const int N = 100001; bool vis[N]; int main(void) { int n, x; scanf("%d", &n); int now = 1; for ( int i = 0; i < n; ++i ) { scanf("%d", &x); &...