# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
3425 | mjy0503 | Divide into triangle (kriii1_D) | C++98 | 0 ms | 1204 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>
#include <string.h>
#include <vector>
int n;
struct q{
int x,y,no;
bool operator() (q a,q b){
return a.x<b.x || (a.x==b.x && a.y<b.y);
}
}su[10001];
int main(){
scanf("%d",&n);
int i;
for(i=0;i<3*n;i++){
scanf("%d %d",&su[i].x,&su[i].y);
su[i].no=i+1;
}
std::sort(su,su+n*3,q());
for(i=0;i<n;i++){
printf("%d %d %d\n",su[i*3].no,su[i*3+1].no,su[i*3+2].no);
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |