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"
using namespace std;
void solve(int n, int k, long long a, int s) {
if (s == n) {
vector<long long> d(n + 1);
for (int i = 1; i <= n; ++i) d[i] = skim(i);
for (int i = 1; i <= n; ++i) d[i] += d[i - 1];
vector<int> ret;
for (int i = k; i <= n; ++i) {
if (a <= d[i] - d[i - k] && d[i] - d[i - k] <= 2 * a) {
for (int j = i - k + 1; j <= i; ++j) ret.push_back(j);
answer(ret);
return;
}
}
}
answer({0});
}
# | 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... |