제출 #1265028

#제출 시각아이디문제언어결과실행 시간메모리
1265028lopkusA Difficult(y) Choice (BOI21_books)C++20
0 / 100
3 ms1196 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 /** if (skim(2) == 42) { impossible(); } else { answer({1, 3}); }**/ std::vector<long long> w(n + 1); for(int i = 1; i <= n; i++) { w[i] = skim(i); } for(int i = 1; i + 2 <= n; i++) { if(w[i] + w[i + 1] + w[i + 2] >= a && w[i] + w[i + 1] + w[i + 2] <= 2LL * a) { answer( {i, i + 1, i + 2} ); } } 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...