Submission #708799

#TimeUsernameProblemLanguageResultExecution timeMemory
708799KiprasA Difficult(y) Choice (BOI21_books)C++17
0 / 100
10 ms448 KiB
#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 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...