# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
805374 | nonono | Palembang Bridges (APIO15_bridge) | C++14 | 225 ms | 16112 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 int long long
using namespace std;
const int INF = 1e18;
const int mxN = 1e5 + 10;
int n, k;
char p[mxN], q[mxN];
int s[mxN], t[mxN];
namespace full {
multiset<int> L, R;
int sumL = 0, sumR = 0;
int f1[mxN], f2[mxN];
int calc() {
int tmp = INF;
if(L.size() > 0) {
int l = *(-- L.end());
tmp = min(tmp, l * (long long)L.size() - sumL + sumR - l * (long long)R.size());
}
if(R.size() > 0) {
int r = *R.begin();
tmp = min(tmp, r * (long long)L.size() - sumL + sumR - r * (long long)R.size());
}
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... |