# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
18596 | eaststar | Divide into triangle (kriii1_D) | C++14 | 0 ms | 1092 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 data{
int x,y,i;
bool operator<(const data&r)const{
return x<r.x;
}
}a[910];
int main(){
int i,n;
scanf("%d",&n);
n*=3;
for(i=1;i<=n;++i)scanf("%d%d",&a[i].x,&a[i].y),a[i].i=i;
sort(a+1,a+n+1);
for(i=1;i<=n;i+=3)printf("%d %d %d\n",a[i].i,a[i+1].i,a[i+2].i);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |