# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
14914 | ainta | Palembang Bridges (APIO15_bridge) | C++98 | 316 ms | 22228 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<stdio.h>
#include<algorithm>
#define SZ 262144
using namespace std;
int K, n;
long long Res, SS, D1[101000], D2[101000];
struct A{
int b, e, num;
bool operator<(const A &p)const{
return b+e<p.b+p.e;
}
}w[101000];
int Num[101000];
struct AA{
int x, num;
bool operator<(const AA &p)const{
return x<p.x;
}
}ord[201000];
long long IT[SZ+SZ+1][4];
void Ins(int pv, int a, int b){
a+=SZ;
while(a){
IT[a][pv]+=b;
a>>=1;
}
}
int Findx(int node, int g){
if(node >= SZ)return node-SZ;
if(IT[node*2][0] + IT[node*2][1] < g)return Findx(node*2+1,g-IT[node*2][0] - IT[node*2][1]);
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |