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) {
long long arr[n];
vector<int> ans;
for(int i=0; i<n; i++){
arr[i] = skim(i+1);
}
long long cur = 0;
for(int i=0; i<k; i++){
cur+=arr[i];
}
for(int i=0; i<=n-k; i++){
if(a<=cur && cur<=2*a){
for(int j=i; j<i+k; j++){
ans.push_back(i+1);
}
answer(ans);
return;
}
if(i!=n-k){
cur-=arr[i];
cur+=arr[i+k];
}
}
impossible();
return;
}
# | 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... |