Submission #1115261

#TimeUsernameProblemLanguageResultExecution timeMemory
1115261Dan4LifeA Difficult(y) Choice (BOI21_books)C++17
0 / 100
19 ms2504 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...