# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
622063 | M_W | Jousting tournament (IOI12_tournament) | C++17 | 922 ms | 16704 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>
#define ii pair<int, int>
using namespace std;
int a[100001], t[400004], lazy[400004], k[100001];
int t2[400004];
void build(int v, int tl, int tr){
if(tl == tr){
t[v] = 1; t2[v] = k[tl];
return;
}
int tm = (tl + tr) >> 1;
build(v * 2, tl, tm); build(v * 2 + 1, tm + 1, tr);
t[v] = t[v * 2] + t[v * 2 + 1];
t2[v] = max(t2[v * 2], t2[v * 2 + 1]);
}
void push(int v){
if(lazy[v] != 1) return;
t[v * 2] = 0;
lazy[v * 2] = lazy[v];
t[v * 2 + 1] = 0;
lazy[v * 2 + 1] = lazy[v];
lazy[v] = 0;
}
void ins(int v, int tl, int tr, int l, int r, int val){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |