Submission #18596

#TimeUsernameProblemLanguageResultExecution timeMemory
18596eaststarDivide into triangle (kriii1_D)C++14
1 / 1
0 ms1092 KiB
#include <stdio.h> #include <algorithm> using namespace std; struct data{ int x,y,i; bool operator<(const data&r)const{ return x<r.x; } }a[910]; int main(){ int i,n; scanf("%d",&n); n*=3; for(i=1;i<=n;++i)scanf("%d%d",&a[i].x,&a[i].y),a[i].i=i; sort(a+1,a+n+1); for(i=1;i<=n;i+=3)printf("%d %d %d\n",a[i].i,a[i+1].i,a[i+2].i); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...