제출 #697761

#제출 시각아이디문제언어결과실행 시간메모리
697761Sandarach151A Difficult(y) Choice (BOI21_books)C++17
0 / 100
3 ms1056 KiB
#include <bits/stdc++.h> #include "books.h" using namespace std; void solve(int n, int k, long long a, int s) { long long arr[n]; vector<int> ans; for(int i=0; i<n; i++){ arr[i] = skim(i+1); } long long cur = 0; for(int i=0; i<k; i++){ cur+=arr[i]; } for(int i=0; i<=n-k; i++){ if(a<=cur && cur<=2*a){ for(int j=i; j<i+k; j++){ ans.push_back(i+1); } answer(ans); return; } if(i!=n-k){ cur-=arr[i]; cur+=arr[i+k]; } } impossible(); return; }
#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...