Submission #574747

#TimeUsernameProblemLanguageResultExecution timeMemory
574747birthdaycakeA Difficult(y) Choice (BOI21_books)C++17
0 / 100
1 ms292 KiB
#include <bits/stdc++.h> #include "books.h" using namespace std; long long b[200001]; void idk(int x, int y){ vector<int>fin; for(int i = x; i <= y; i++) fin.push_back(i); answer(fin); } void solve(int n, int k, long long a, int s) { int j = 0; for(int i = 0; i < n; i++) { b[i] = skim(i); if(i) b[i] += b[i - 1]; } if(b[k - 1] >= a && b[k - 1] <= 2 * a){ idk(1,k); return; } for(int i = k; i < n; i++, j++){ if(b[i] - b[j] >= a && b[i] - b[j] <= 2 * a){ idk(j + 1, i + 1); 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...