# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
678995 | lunchbox1 | Bulldozer (JOI17_bulldozer) | C++17 | 728 ms | 63068 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 <array>
#include <iostream>
#include <numeric>
using namespace std;
#define ar array
#define ll long long
const int N = 2e3, N_ = 1 << 11;
ar<int, 2> norm(ar<int, 2> a) {
int g = gcd(a[0], a[1]);
a[0] /= g, a[1] /= g;
if (a[1] < 0)
a[0] *= -1, a[1] *= -1;
return a;
}
bool comp(const ar<int, 2>& a, const ar<int, 2>& b) {
return 1LL * a[0] * b[1] < 1LL * b[0] * a[1];
}
ar<ll, 4> operator+(const ar<ll, 4>& u, const ar<ll, 4>& v) {
return {u[0] + v[0], max(u[1], u[0] + v[1]), max(v[2], u[2] + v[0]), max(u[2] + v[1], max(u[3], v[3]))};
}
int n_;
ar<ll, 4> t[N_ * 2];
void update(int i, int w) {
# | 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... |