# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
676506 | penguin133 | Osumnjičeni (COCI21_osumnjiceni) | C++17 | 806 ms | 118076 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;
#define int long long
#define pi pair<int, int>
#define pii pair<int, pair<int, int> >
#define fi first
#define se second
int n, k, q;
int pos[200005], P[200005], L[200005], R[200005], vis[200005];
const int mod = 1e9 +7;
struct node{
int s,e,m,val,lazy;
node *l = nullptr, *r = nullptr;
node(int _s, int _e){
s = _s, e = _e, m = (s + e)/2;
val = lazy =0 ;
if(s != e)l = new node(s, m), r = new node(m+1, e);
}
void propo(){
if(lazy){
val = lazy;
if(s != e)l->lazy = lazy, r->lazy = lazy;
lazy = 0;
}
}
void upd(int a, int b,int c){
if(s == a && e == b)lazy = c;
else{
if(b <= m)l->upd(a,b,c);
else if(a > m)r->upd(a,b,c);
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... |