#include #include #include using namespace std; #define NMAX 1000 vector vi[NMAX]; bool use[NMAX]; int search(int n); int main(){ int N; long long x[NMAX],y[NMAX],z[NMAX]; int ans=0; cin>>N; for(int i=0;i>x[i]; cin>>y[i]; cin>>z[i]; } for(int i=0;ix[j]&&y[i]>y[j]&&z[i]>z[j])||(x[i]>x[j]&&y[i]>z[j]&&z[i]>y[j])||(x[i]>y[j]&&y[i]>x[j]&&z[i]>z[j])||(x[i]>y[j]&&y[i]>z[j]&&z[i]>x[j])||(x[i]>z[j]&&y[i]>y[j]&&z[i]>x[j])||(x[i]>z[j]&&y[i]>x[j]&&z[i]>y[j])){ vi[i].push_back(j); } } } for(int i=0;i