# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
3099 | ainta | Divide into triangle (kriii1_D) | C++98 | 0 ms | 1100 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |