# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
12735 | ainu7 | Divide into triangle (kriii1_D) | C++98 | 0 ms | 1680 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 <math.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <sstream>
#include <set>
using namespace std;
int main()
{
int N;
cin >> N;
vector<pair<long long, int> > V;
for (int i=0; i<3*N; i++) {
int x, y;
cin >> x >> y;
V.push_back(pair<long long, int>(x*9328932855LL+y*953287581LL, i+1));
}
sort(V.begin(), V.end());
for (int i=0; i<3*N; i+=3)
printf("%d %d %d\n", V[i].second, V[i+1].second, V[i+2].second);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |