#include #include #include #include #include #include #include #include #include #include #include //#include //#include using namespace std; using ll = unsigned long long; typedef pair P; map dp; vector X; vector Y; vector Z; int main(void){ string a; getline(cin, a); string lineF; getline(cin, lineF); vector N; istringstream iss(lineF); int k; while(iss >>k){ N.push_back(k); } vector ansb(N.size(),false); for(int m=N.size()-1;m>=0;m--){ if(ansb[m])continue; int j=0; for(int r=m;r