# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
106657 | popovicirobert | Palembang Bridges (APIO15_bridge) | C++14 | 580 ms | 14740 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>
#define lsb(x) (x & (-x))
#define ll long long
#define ull unsigned long long
// 217
// 44
using namespace std;
const ll INF = 1e18;
inline ll getmin(ll a, ll b) {
return a < b ? a : b;
}
inline void solve(vector < pair <int, int> > &arr, vector <ll> &sol) {
int sz = arr.size();
sol.resize(sz);
multiset <int> mst1, mst2;
ll sum1 = 0, sum2 = 0;
for(int i = 0; i < sz; i++) {
mst2.insert(arr[i].first);
sum2 += arr[i].first;
mst2.insert(arr[i].second);
sum2 += arr[i].second;
while(mst1.size() < i + 1) {
mst1.insert(*mst2.begin());
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... |