| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 4210 | zorrapower | Divide into triangle (kriii1_D) | C++98 | 0 ms | 1088 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
typedef struct pointType{
	int x;
	int y;
	int index;
	int sumXY;
}pointType;
int main(void){
	int N;
	int currentIndex=0;
	pointType point[900]={0,};
	scanf("%d", &N);
	for(int i=0; i<3*N; i++){
		scanf("%d %d", &point[i].x, &point[i].y);
		point[i].index=++currentIndex;
		point[i].sumXY=point[i].x + point[i].y;
	}
	for(int i=0; i<3*N; i++){
		for(int j=i; j<3*N; j++){
			if(point[i].sumXY > point[j].sumXY){
				pointType tmp;
				tmp=point[i];
				point[i]=point[j];
				point[j]=tmp;
			}
		}
	}
	for(int i=0; i<3*N; i++){
		printf("%d ", point[i].index);
		if(i%3==2)
			printf("\n");
	}
	return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
