Submission #1066931

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