# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
503440 | DanerZein | Crossing (JOI21_crossing) | C++14 | 625 ms | 23416 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;
typedef long long ll;
const int MAX_N=8e5+10;
const int mod=1e9+9;
string sa,sb,sc,t;
vector<int> x;
int n;
ll tr[MAX_N],la[MAX_N],spot[MAX_N];
map<char,int> dic;
vector<ll> pot;
void init(int node,int a,int b){
if(a==b){
tr[node]=(x[a]*pot[a]);
la[node]=-1;
spot[node]=pot[a];
return;
}
int mid=(a+b)/2,le=2*node+1,ri=2*node+2;
init(le,a,mid);
init(ri,mid+1,b);
tr[node]=tr[le]+tr[ri]; tr[node]%=mod;
spot[node]=spot[le]+spot[ri]; spot[node]%=mod;
la[node]=-1;
}
void propagar(int node){
if(la[node]==-1) return;
int le=2*node+1,ri=2*node+2;
# | 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... |