#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1676 KB |
Output is correct |
2 |
Correct |
0 ms |
1676 KB |
Output is correct |
3 |
Correct |
0 ms |
1676 KB |
Output is correct |
4 |
Correct |
0 ms |
1676 KB |
Output is correct |
5 |
Correct |
0 ms |
1676 KB |
Output is correct |
6 |
OK |
0 ms |
1676 KB |
|
7 |
Halted |
0 ms |
0 KB |
- |