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>
#include "books.h"
#define all(v) v.begin(), v.end()
#define sz(x) (int)x.size()
#define pb push_back
#define pii pair<int, int>
#define chmin(x, v) x = min(x, v)
#define chmax(x, v) x = max(x, v)
#define print(x) cout << #x << " est " << x << endl;
#define x first
#define y second
#define int long long
using namespace std;
void solve(signed nLivres, signed aPrendre, long long borneInf, signed S) {
map<int, int> vals;
int sum = 0;
for (int i = 0; i < aPrendre; ++i)
vals[i] = skim(i + 1), sum += vals[i];
if (sum > 2 * borneInf)
impossible();
vector<signed> ans = {};
if (sum >= borneInf){
for (int i = 1; i <= aPrendre; ++i)
ans.pb(i);
answer(ans);
return;
}
for (int i = aPrendre; i < nLivres; ++i){
vals[i] = skim(i + 1);
/* sum += vals[i] - vals[i - aPrendre];
if (sum >= borneInf){
if (sum > 2 * borneInf){
for (int j = 0; j < aPrendre - 1; ++j)
ans.pb(i - 1 - j);
ans.pb(i + 1);
answer(ans);
}
else {
for (int j = 0; j < aPrendre; ++j)
ans.pb(i + 1 - j);
answer(ans);
}
}*/
}
impossible();
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |