Submission #3719

# Submission time Handle Problem Language Result Execution time Memory
3719 2013-08-31T07:50:25 Z zzapcoder Divide into triangle (kriii1_D) C++
1 / 1
0 ms 1672 KB
#include<iostream>
#include<vector>
#include<algorithm>
#include<utility>

using namespace std;

#define pox pair<pair<int,int>,int>
#define x first
#define y second

int main(){
	int n; cin >> n;
	vector<pox > vp(3*n, make_pair(make_pair(0,0),0));
	for(int i=0;i<3*n;++i){
		cin>>vp[i].x.x>>vp[i].x.y;
		vp[i].y = i+1;
	}
	sort(vp.begin(), vp.end());
	for(int i=0;i<vp.size();++i){
		cout<<vp[i].y<<' ';
		if(i%3 == 2) cout<<endl;
	}
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1672 KB Output is correct
2 Correct 0 ms 1672 KB Output is correct
3 Correct 0 ms 1672 KB Output is correct
4 Correct 0 ms 1672 KB Output is correct
5 Correct 0 ms 1672 KB Output is correct
6 Correct 0 ms 1672 KB Output is correct
7 Correct 0 ms 1672 KB Output is correct
8 Correct 0 ms 1672 KB Output is correct
9 Correct 0 ms 1672 KB Output is correct
10 Correct 0 ms 1672 KB Output is correct
11 Correct 0 ms 1672 KB Output is correct
12 Correct 0 ms 1672 KB Output is correct
13 Correct 0 ms 1672 KB Output is correct
14 Correct 0 ms 1672 KB Output is correct
15 Correct 0 ms 1672 KB Output is correct
16 Correct 0 ms 1672 KB Output is correct
17 Correct 0 ms 1672 KB Output is correct
18 Correct 0 ms 1672 KB Output is correct
19 Correct 0 ms 1672 KB Output is correct
20 Correct 0 ms 1672 KB Output is correct