# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
932513 | andrei_boaca | Worst Reporter 4 (JOI21_worst_reporter4) | C++17 | 459 ms | 109600 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;
typedef pair<ll,ll> pll;
const ll INF=1e17;
map<ll,ll> nrm;
ll nr;
vector<ll> muchii[400005];
vector<ll> edges[400005];
ll to[400005];
ll n,par[400005],v[400005],cost[400005];
set<pll> setik[400005];
ll ans,retard;
ll aib[400005];
ll lsb(ll x)
{
return x&(-x);
}
void update(ll poz,ll val)
{
for(ll i=poz;i<=nr+1;i+=lsb(i))
aib[i]+=val;
}
ll suma(ll poz)
{
ll rez=0;
for(ll i=poz;i>=1;i-=lsb(i))
rez+=aib[i];
return rez;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |