#include <stdio.h>
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <sstream>
#include <set>
#include <map>
#include <stack>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <string>
using namespace std;
struct data {
int x,y,id;
data() {}
bool operator < (const data &rhs) const {
if(x == rhs.x) return y < rhs.y;
else return x < rhs.x;
}
}D[333];
int n;
int x[333],y[333];
int main() {
scanf("%d",&n);
for(int i=0;i<3*n;++i) scanf("%d%d",&D[i].x,&D[i].y), D[i].id = i+1;
sort(D, D+n);
for(int i=0;i<n;++i) {
printf("%d %d %d\n",D[3*i].id,D[3*i+1].id,D[3*i+2].id);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1684 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |