Submission #3600

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
36002013-08-31 06:50:53jihoonDivide into triangle (kriii1_D)C++98
1 / 1
0 ms1096 KiB
#include<stdio.h>
#define swap(aa,bb) {int cc;cc=aa;aa=bb;bb=cc;}
int a[900][3]={0};
int main(){
int n;
int i,j;
scanf("%d",&n);
for(i=1;i<=3*n;i++){
scanf("%d %d",&a[i][0],&a[i][1]);
a[i][2]=i;
}
for(i=1;i<=3*n;i++){
for(j=i+1;j<=3*n;j++){
if(a[i][0]>a[j][0]){
swap(a[i][0],a[j][0]);
swap(a[i][1],a[j][1]);
swap(a[i][2],a[j][2]);
}else if(a[i][0]==a[j][0]){
if(a[i][1]>a[j][1]){
swap(a[i][0],a[j][0]);
swap(a[i][1],a[j][1]);
swap(a[i][2],a[j][2]);
}
}
}
}
/*
for(i=1;i<=3*n;i++){
for(j=0;j<3;j++){
printf("%d ",a[i][j]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...