Submission #947802

#TimeUsernameProblemLanguageResultExecution timeMemory
947802willychanA Difficult(y) Choice (BOI21_books)C++17
5 / 100
112 ms356 KiB
#include <bits/stdc++.h> #include "books.h" using namespace std; typedef long long ll; // // --- 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) { if(K!=3) return; vector<ll> v(N); for(int i=1;i<=N;i++) v[i-1] = skim(i); for(int i=0;i<N;i++){ for(int j=i+1;j<N;j++){ for(int k=j+1;k<N;k++){ if(v[i]+v[j]+v[k]<=2*A && v[i]+v[j]+v[k]>=A){ answer({i+1,j+1,k+1}); } } } } impossible(); return ; }
#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...