# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
3523 | arine | Divide into triangle (kriii1_D) | C++98 | 0 ms | 1676 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 <iostream>
#include <algorithm>
using namespace std;
typedef struct _point {
int x, y;
int num;
bool operator<(const _point& A) const { return x<A.x || x==A.x && y<A.y; }
} point;
int N;
point data[305];
int main() {
cin >> N;
for(int i=0; i<3*N; ++i) {
cin >> data[i].x >> data[i].y;
data[i].num=i+1;
}
sort(data, data+3*N);
for(int i=0; i<3*N; i+=3)
cout << data[i].num << " " << data[i+1].num << " " << data[i+2].num << endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |