Submission #863490

#TimeUsernameProblemLanguageResultExecution timeMemory
863490Cyber_WolfA Difficult(y) Choice (BOI21_books)C++17
0 / 100
5 ms1232 KiB
#include <bits/stdc++.h> #include "books.h" #ifdef CYBER #include "grader.cpp" #endif #define lg long long using namespace std; void solve(int N, int K, long long A, int S) { vector<lg> v(N); for(int i = 1; i <= N; i++) { v[i] = skim(i); v[i] += v[i-1]; } vector<int> ans; for(int i = K; i <= N; i++) { if(v[i]-v[i-K] >= A && v[i]-v[i-K] <= 2*A) { for(int j = i-K+1; j <= i; j++) ans.push_back(j); break; } } if(ans.empty()) impossible(); answer(ans); }
#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...