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) {
int l = 1, r = n - k + 1;
while (r - l > 1) {
int m = (l + r) / 2;
if (skim(m + k - 1) >= A)
r = m;
else
l = m;
}
int ind = -1;
if (skim(l + k - 1) >= A) {
ind = l;
} else if (skim(r + k - 1) >= A) {
ind = r;
}
if (ind != -1) {
vector<int> ans;
for (int i = ind; i < ind + k; i++) ans.emplace_back(i);
answer(ans);
} else {
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... |