# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
530303 | Nghes | Palembang Bridges (APIO15_bridge) | C++14 | 223 ms | 15160 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;
#define FOR(i,a,b) for(int i=(a);i<=(int)(b);++i)
#define FORB(i,a,b) for(int i=(a);i>=(int)(b);--i)
#define E '\n'
#define name "main"
#define X first
#define Y second
#define int ll
#define ii pair<int,int>
const ll oo = 1e18+19;
const int N = 1e5;
multiset<int> low;
multiset<int> up;
int numBrigde, numPeople;
int pre[N+13];
int suf[N+13];
int sameside;
int sumLow;
int sumUp;
vector<ii> people;
bool minimize(ll &x, ll y){
return x > y ? x = y,1 : 0;
}
void ins(int x){
if (low.size() && *low.rbegin() < x) up.insert(x),sumUp += x;
else low.insert(x), sumLow += x;
while(up.size() > low.size()){
# | 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... |