# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
892526 | MilosMilutinovic | Bulldozer (JOI17_bulldozer) | C++14 | 996 ms | 35652 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 <bits/stdc++.h>
using namespace std;
struct pt {
int x, y;
};
bool same(int x1, int y1, int x2, int y2) {
// y1 / x1 = y2 / x2
return x1 * 1LL * y2 == y1 * 1LL * x2;
}
long long cross(pt a, pt b) {
return a.x * 1LL * b.y - a.y * 1LL * b.x;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<int> x(n), y(n), w(n);
for (int i = 0; i < n; i++) {
cin >> x[i] >> y[i] >> w[i];
}
vector<int> order(n);
iota(order.begin(), order.end(), 0);
sort(order.begin(), order.end(), [&](int i, int j) {
if (y[i] != y[j]) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |