#include <bits/stdc++.h>
#include "books.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
typedef long long ll;
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
void solve(int N, int K, ll A, int S) {
vector<ll> a(N+1);
for(int i=1; i<=N; ++i) a[i] = skim(i);
vector<ll> pref(N+1);
for(int i=1; i<=N; ++i) pref[i] = pref[i-1] + a[i];
for(int i=0; i+K<=N; ++i) {
if(pref[i+K] - pref[i] >= A && pref[i+K] - pref[i] <= 2*A) {
vector<int> ans;
for(int x=i+1; x<=i+K; ++x) ans.push_back(x);
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... |