#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <string>
#include <vector>
#include <sstream>
#include <iostream>
#include <algorithm>
using namespace std;
struct point{
int x;
int y;
int i;
point(int a, int b, int c)
: x(a), y(b), i(c)
{}
};
vector<point> ls;
bool ss(point a, point b )
{
if( a.x == b.x)
return a.y < b.y;
return a.x < b.x;
}
int main(void){
int n;
scanf("%d",&n);
ls.clear();
for(int i = 0 ;i <3 * n ;i++)
{
int a, b;
scanf("%d %d",&a,&b);
ls.push_back(point(a,b,i));
}
sort(ls.begin(),ls.end(),ss);
for(int i = 0 ;i < 3*n;i++)
{
printf("%d ", ls[i].i);
if( i %3 == 2 )printf("\n");
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1676 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |