# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
987231 | AdamGS | Sky Walking (IOI19_walk) | C++17 | 2918 ms | 229812 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 "walk.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
const ll INF=1e18+7;
const int LIM=1e5+7;
vector<ll>T, H;
vector<pair<ll,ll>>V[20*LIM];
set<pair<ll,ll>>S;
map<pair<ll,ll>,ll>mp;
ll tr[4*LIM], odl[20*LIM], n, N=1, akt;
void upd(int l, int r, ll x) {
l+=N; r+=N;
tr[l]=max(tr[l], x);
tr[r]=max(tr[r], x);
while(l/2!=r/2) {
if(l%2==0) tr[l+1]=max(tr[l+1], x);
if(r%2==1) tr[r-1]=max(tr[r-1], x);
l/=2; r/=2;
}
}
ll cnt(int v) {
v+=N;
ll ans=tr[v];
while(v) {
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... |