# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
3099 | ainta | Divide into triangle (kriii1_D) | C++98 | 0 ms | 1100 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |