Submission #12735

#TimeUsernameProblemLanguageResultExecution timeMemory
12735ainu7Divide into triangle (kriii1_D)C++98
1 / 1
0 ms1680 KiB
#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 timeMemoryGrader output
Fetching results...