# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
112236 | nxteru | Construction of Highway (JOI18_construction) | C++14 | 507 ms | 89296 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 double D;
typedef pair<ll,ll> P;
#define M 1000000007
#define F first
#define S second
#define PB push_back
#define INF 100000000000000000
struct BIT{
int n;
ll bit[100005];
void ini(int x){
n=x;
for(int i=0;i<=n;i++)bit[i]=0;
}
void add(int a,ll x){
a++;
while(a<=n){
bit[a]+=x;
a+=(a&-a);
}
}
ll sum(int a){
a++;
ll res=0;
while(a>0){
res+=bit[a];
a-=(a&-a);
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... |