#include #include #include using namespace std; struct v{ int a,b,c,i; bool operator <(const v &t)const{ if (a != t.a) return a < t.a; if (b != t.b) return b < t.b; if (c != t.c) return c < t.c; return i < t.i; } }V[100100]; map > hi; bool chk[100100]; void push(int x, int y, int i) { auto I = hi.lower_bound(x); if (I != hi.end()){ if (y <= I->second.first){ chk[i] = 1; return; } } while (I != hi.begin()){ auto J = I; J--; if (J->second.first <= y){ hi.erase(J); } else break; } hi[x] = {y,i}; } int main() { int N; scanf ("%d",&N); for (int i=0;i=0;i--){ push(V[i].b,V[i].c,V[i].i); } for (int i=1;i<=N;i++) if (!chk[i]) printf ("%d\n",i); return 0; }