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