# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
3650 | The_KMJ_God | Divide into triangle (kriii1_D) | C++98 | 0 ms | 1096 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;
class xy
{
public:
int x,y,ind;
bool operator<(const xy &in)const{
return y<in.y;
}
};
int n;
xy num[910];
int main()
{
int i,ind2[3];
scanf("%d",&n);
for(i=0;i<n*3;i++)
{
scanf("%d",&num[i].x);
scanf("%d",&num[i].y);
num[i].ind=i+1;
}
sort(num,num+n*3);
for(i=0;i<n;i++)
{
ind2[0]=num[i*3].ind;
ind2[1]=num[i*3+1].ind;
ind2[2]=num[i*3+2].ind;
sort(ind2,ind2+3);
printf("%d %d %d\n",ind2[0],ind2[1],ind2[2]);
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |