# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
711086 | zeta7532 | Crossing (JOI21_crossing) | C++17 | 416 ms | 7468 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;
using ll = long long;
const ll mod = 1e9+7;
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define rep(i,x) for(ll i=0;i<x;i++)
#define faster ios::sync_with_stdio(false);cin.tie(nullptr)
template <typename T>
struct RMQ{
const T INF = 0;
ll N;
vector<T> dat,lazy;
RMQ(ll N_,vector<ll> &rui):N(),dat(N_*4,INF),lazy(N_*4,INF){
ll x=1;
while(N_>x) x*=2;
N=x;
}
void eval(ll k,ll l,ll r,vector<ll> &rui){
if(lazy[k]==-1) return;
if(k<N-1){
lazy[k*2+1]=lazy[k];
lazy[k*2+2]=lazy[k];
}
dat[k]=lazy[k]*((rui[r-l]-1+mod*((rui[r-l]+1)%2))/2);
dat[k]%=mod;
lazy[k]=-1;
}
# | 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... |