# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
4109 | jays | Divide into triangle (kriii1_D) | C++98 | 0 ms | 1096 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 <algorithm>
#include <cstdio>
using namespace std;
struct Stake {
int x, y, id;
bool operator < (const Stake& s) const {
return x != s.x ? x < s.x : y < s.y;
}
};
int N;
Stake s[901];
int main() {
scanf("%d", &N);
for (int i = 0; i < 3 * N; ++i) {
scanf("%d%d", &s[i].x, &s[i].y);
s[i].id = i + 1;
}
sort(s, s + 3 * N);
for (int i = 0; i < N; ++i)
printf("%d %d %d\n", s[3*i].id, s[3*i+1].id, s[3*i+2].id);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |