# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
966762 | PM1 | Sprinkler (JOI22_sprinkler) | C++17 | 3913 ms | 129028 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;
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2")
const int mxn=2e5+5;
int n,M,q,st[mxn],fn[mxn],cnt,dis[mxn],par[mxn],w;
pair<int,int> fnd[mxn][42];
vector<int>v[mxn],d[mxn];
struct segment{
vector<long long>val;
int sz=0;
void build(){
while(__builtin_popcount(sz)!=1){
sz++;
}
val.resize(sz*2,1);
}
void add(int i,int l,int r,int tl,int tr){
if(l>r||l>tr||r<tl||tl>tr){
return ;
}
if(l>=tl&&r<=tr){
val[i]*=w;
val[i]%=M;
return ;
}
int m=(l+r)>>1;
add((i<<1),l,m,tl,tr);
add((i<<1)^1,m+1,r,tl,tr);
return ;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |