Submission #3523

#TimeUsernameProblemLanguageResultExecution timeMemory
3523arineDivide into triangle (kriii1_D)C++98
0 / 1
0 ms1676 KiB
#include <iostream> #include <algorithm> using namespace std; typedef struct _point { int x, y; int num; bool operator<(const _point& A) const { return x<A.x || x==A.x && y<A.y; } } point; int N; point data[305]; int main() { cin >> N; for(int i=0; i<3*N; ++i) { cin >> data[i].x >> data[i].y; data[i].num=i+1; } sort(data, data+3*N); for(int i=0; i<3*N; i+=3) cout << data[i].num << " " << data[i+1].num << " " << data[i+2].num << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...