| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 3449 | wurikiji | Divide into triangle (kriii1_D) | C++98 | 0 ms | 1676 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 <cstdio>
#include <cstring>
#include <cstdlib>
#include <string>
#include <vector>
#include <sstream>
#include <iostream>
#include <algorithm>
using namespace std;
struct point{
	int x;
	int y;
	int i;
	point(int a, int b, int c)
		: x(a), y(b), i(c)
	{}
};
vector<point> ls;
bool ss(point a, point b )
{
	if( a.x == b.x)
		return a.y < b.y;
	return a.x < b.x;
}
int main(void){
	int n;
	scanf("%d",&n);
	ls.clear();
	for(int i = 0 ;i <3 * n ;i++)
	{
		int a, b;
		scanf("%d %d",&a,&b);
		ls.push_back(point(a,b,i));
	}
	sort(ls.begin(),ls.end(),ss);
	for(int i = 0 ;i < 3*n;i++)
	{
		printf("%d ", ls[i].i + 1);
		if( i %3 == 2 )printf("\n");
	}
	return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
