# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
8089 | gs14004 | 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 <cstdio>
#include <algorithm>
using namespace std;
struct pt{int x,y,o;}a[907];
int cmp(pt a, pt b){return a.x < b.x;}
int n;
int main(){
scanf("%d",&n);
for (int i=0; i<3*n; i++) {
scanf("%d %d",&a[i].x,&a[i].y);
a[i].o = i+1;
}
sort(a,a+3*n,cmp);
for (int i=0; i<n; i++) {
printf("%d %d %d\n",a[3*i].o,a[3*i+1].o,a[3*i+2].o);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |