Submission #3650

#TimeUsernameProblemLanguageResultExecution timeMemory
3650The_KMJ_GodDivide into triangle (kriii1_D)C++98
1 / 1
0 ms1096 KiB
#include<stdio.h> #include<algorithm> using namespace std; class xy { public: int x,y,ind; bool operator<(const xy &in)const{ return y<in.y; } }; int n; xy num[910]; int main() { int i,ind2[3]; scanf("%d",&n); for(i=0;i<n*3;i++) { scanf("%d",&num[i].x); scanf("%d",&num[i].y); num[i].ind=i+1; } sort(num,num+n*3); for(i=0;i<n;i++) { ind2[0]=num[i*3].ind; ind2[1]=num[i*3+1].ind; ind2[2]=num[i*3+2].ind; sort(ind2,ind2+3); printf("%d %d %d\n",ind2[0],ind2[1],ind2[2]); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...