제출 #1115260

#제출 시각아이디문제언어결과실행 시간메모리
1115260Dan4LifeA Difficult(y) Choice (BOI21_books)C++17
0 / 100
4 ms2384 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, a[N]; ll 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...