Submission #799504

#TimeUsernameProblemLanguageResultExecution timeMemory
799504TFFA Difficult(y) Choice (BOI21_books)C++17
5 / 100
144 ms976 KiB
#include <bits/stdc++.h> #include "books.h" using namespace std; // // --- Sample implementation for the task books --- // // To compile this program with the sample grader, place: // books.h books_sample.cpp sample_grader.cpp // in a single folder and run: // g++ books_sample.cpp sample_grader.cpp // in this folder. // void solve(int N, int K, long long A, int S) { // TODO implement this function long long books[N + 1]; for (int i = 1; i <= N; i++) books[i] = skim(i); for (int i = 1; i <= N - 2; i++) { for (int j = i + 1; j <= N - 1; j++) { for (int k = j + 1; k <= N; k++) { if (books[i] + books[j] + books[k] >= A && books[i] + books[j] + books[k] <= 2 * A) { answer({i, j, k}); 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...