# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
378258 | Nima_Naderi | Martian DNA (BOI18_dna) | C++14 | 659 ms | 36064 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.
///In the name of GOD
//#pragma GCC optimize("O2")
#include<bits/stdc++.h>
using namespace std;
//typedef long long ll;
typedef int ll;
const ll MXN = 2e5 + 10;
const ll LOG = 19;
ll n, k, q, ans, ml, mr, ts;
ll A[MXN], T[MXN], B[MXN], Id[MXN], Fen[MXN], come[MXN];
ll rem[MXN], Idq[MXN], low[MXN], hig[MXN], ith[MXN];
vector<pair<ll, ll>> Q, Qry[MXN];
vector<ll> Pos[MXN];
bool ANS[MXN];
void Upd(ll p, ll x){
for(; p < MXN; p += p & -p) Fen[p] += x;
}
void Upd(ll l, ll r, ll x){
Upd(l, +x), Upd(r + 1, -x);
}
ll Get(ll p){
ll s = 0;
for(; p; p -= p & -p) s += Fen[p];
return s;
}
void Solve(){
memset(Fen, 0, sizeof Fen), memset(ANS, 0, sizeof ANS);
for(int i = 0; i < ts; i ++){
ll l, r; tie(l, r) = Q[i];
# | 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... |