Submission #8089

#TimeUsernameProblemLanguageResultExecution timeMemory
8089gs14004Divide into triangle (kriii1_D)C++98
1 / 1
0 ms1096 KiB
#include <cstdio> #include <algorithm> using namespace std; struct pt{int x,y,o;}a[907]; int cmp(pt a, pt b){return a.x < b.x;} int n; int main(){ scanf("%d",&n); for (int i=0; i<3*n; i++) { scanf("%d %d",&a[i].x,&a[i].y); a[i].o = i+1; } sort(a,a+3*n,cmp); for (int i=0; i<n; i++) { printf("%d %d %d\n",a[3*i].o,a[3*i+1].o,a[3*i+2].o); } }
#Verdict Execution timeMemoryGrader output
Fetching results...