답안 #3099

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
3099 2013-08-25T06:36:44 Z ainta Divide into triangle (kriii1_D) C++
1 / 1
0 ms 1100 KB
#include<stdio.h>
#include<algorithm>
using namespace std;
struct A{
	int x,y,num;
	bool operator <(const A &p)const{
		return x!=p.x?x<p.x:y<p.y;
	}
}w[1001];
int N,i;
int main()
{
	scanf("%d",&N);
	for(i=0;i<3*N;i++){
		scanf("%d%d",&w[i].x,&w[i].y);
		w[i].num=i+1;
	}
	sort(w,w+3*N);
	for(i=0;i<N;i++)printf("%d %d %d\n",w[3*i].num,w[3*i+1].num,w[3*i+2].num);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1100 KB Output is correct
2 Correct 0 ms 1100 KB Output is correct
3 Correct 0 ms 1100 KB Output is correct
4 Correct 0 ms 1100 KB Output is correct
5 Correct 0 ms 1100 KB Output is correct
6 Correct 0 ms 1100 KB Output is correct
7 Correct 0 ms 1100 KB Output is correct
8 Correct 0 ms 1100 KB Output is correct
9 Correct 0 ms 1100 KB Output is correct
10 Correct 0 ms 1100 KB Output is correct
11 Correct 0 ms 1100 KB Output is correct
12 Correct 0 ms 1100 KB Output is correct
13 Correct 0 ms 1100 KB Output is correct
14 Correct 0 ms 1100 KB Output is correct
15 Correct 0 ms 1100 KB Output is correct
16 Correct 0 ms 1100 KB Output is correct
17 Correct 0 ms 1100 KB Output is correct
18 Correct 0 ms 1100 KB Output is correct
19 Correct 0 ms 1100 KB Output is correct
20 Correct 0 ms 1100 KB Output is correct