Submission #3099

#TimeUsernameProblemLanguageResultExecution timeMemory
3099aintaDivide into triangle (kriii1_D)C++98
1 / 1
0 ms1100 KiB
#include<stdio.h> #include<algorithm> using namespace std; struct A{ int x,y,num; bool operator <(const A &p)const{ return x!=p.x?x<p.x:y<p.y; } }w[1001]; int N,i; int main() { scanf("%d",&N); for(i=0;i<3*N;i++){ scanf("%d%d",&w[i].x,&w[i].y); w[i].num=i+1; } sort(w,w+3*N); for(i=0;i<N;i++)printf("%d %d %d\n",w[3*i].num,w[3*i+1].num,w[3*i+2].num); }
#Verdict Execution timeMemoryGrader output
Fetching results...