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;
#define pb push_back
#define sz(a) (int)a.size()
#define all(a) begin(a),end(a)
using ll = long long;
using vi = vector<int>;
const int N = (int)2e5+10;
int n;
ll a[N], pref[N];
void solve(int _N, int K, ll A, int S) {
n = _N;
for(int i = 1; i <= n; i++)
a[i] = skim(i), pref[i]=pref[i-1]+a[i];
for(int i = 1; i <= n-K+1; i++){
if(pref[i+K-1]-pref[i-1]>=A and pref[i+K-1]-pref[i-1]<=2*A){
vi ans(K,0); iota(all(ans),i); 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... |