#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <cstdlib>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <list>
#include <string>
#include <sstream>
#include <cstring>
#include <ctime>
#include <set>
#include <cstdio>
#include <stack>
#include <climits>
#include <functional>
#include <locale>
using namespace std;
#define LL long long
#define LD long double
#define FOR(i, l) for(int i = 0; i < l; i++)
#define pb push_back
#define SWAP(a, b), {int temp = a; a = b; b = temp;}
#define parsestr(from, findtar) substr(from, distance(in.begin()+from, find(in.begin()+from, in.end(), findtar)))
#define PI acos(0.0) * 2.0
#define undefined -1
#define MOD 2552
#define MAXSIZE (1<<15)+1
int main(){
int p_num;scanf("%d", &p_num);
vector<pair<pair<int, int>, int> > dot(3*p_num);
FOR(i, 3*p_num){
scanf("%d %d", &dot[i].first.first, &dot[i].first.second);
dot[i].second = i+1;
}
sort(dot.begin(), dot.end());
FOR(i, p_num){
printf("%d %d %d\n", dot[i*3].second, dot[i*3+1].second, dot[i*3+2].second);
}
}
/*
2
1 0
2 0
3 1
2 2
1 2
0 1
*/
# |
Verdict |
Execution time |
Memory |
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 |
Correct |
0 ms |
1676 KB |
Output is correct |
7 |
Correct |
0 ms |
1676 KB |
Output is correct |
8 |
Correct |
0 ms |
1676 KB |
Output is correct |
9 |
Correct |
0 ms |
1676 KB |
Output is correct |
10 |
Correct |
0 ms |
1676 KB |
Output is correct |
11 |
Correct |
0 ms |
1676 KB |
Output is correct |
12 |
Correct |
0 ms |
1676 KB |
Output is correct |
13 |
Correct |
0 ms |
1676 KB |
Output is correct |
14 |
Correct |
0 ms |
1676 KB |
Output is correct |
15 |
Correct |
0 ms |
1676 KB |
Output is correct |
16 |
Correct |
0 ms |
1676 KB |
Output is correct |
17 |
Correct |
0 ms |
1676 KB |
Output is correct |
18 |
Correct |
0 ms |
1676 KB |
Output is correct |
19 |
Correct |
0 ms |
1676 KB |
Output is correct |
20 |
Correct |
0 ms |
1676 KB |
Output is correct |