# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
875870 | awu | Construction of Highway (JOI18_construction) | C++14 | 1433 ms | 30104 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/extc++.h>
using namespace __gnu_pbds;
using namespace std;
// #define int long long
#define ll long long
// #define double long double
#define all(x) x.begin(), x.end()
#define debug(x) do{auto _x = x; cerr << #x << " = " << _x << endl;} while(0)
#define f first
#define s second
// #define endl '\n'
using pii = pair<int, int>;
const int inf = 1 << 30;
// const ll inf = 1ll << 62;
struct maxtree {
vector<pii> t;
int n;
maxtree(int s) {
n = 1;
while(n < s) n *= 2;
t.resize(n * 2, {-1, -1});
}
void update(int i, pii v) {
for(t[i += n] = v; i > 1; i /= 2) {
t[i / 2] = max(t[i], t[i ^ 1]);
}
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... |