# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1129054 | OI_Account | Cake 3 (JOI19_cake3) | C++20 | 4093 ms | 10052 KiB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 200'000;
const ll INF = 100'000'000'000;
int n, m;
ll v[N + 10], c[N + 10], ans;
pair<ll, ll> p[N + 10];
void readInput() {
cin >> n >> m;
for (int i = 1; i <= n; i++)
cin >> p[i].second >> p[i].first;
sort(p + 1, p + n + 1);
for (int i = 1; i <= n; i++) {
c[i] = p[i].first;
v[i] = p[i].second;
}
}
ll calc(ll sum, int l, int r) {
return sum - 2ll * (c[r] - c[l]);
}
void solve() {
ans = -INF;
for (int i = 1; i + m - 1 <= n; i++) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |