Submission #711086

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7110862023-03-16 08:28:20zeta7532Crossing (JOI21_crossing)C++17
0 / 100
416 ms7468 KiB
#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;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...