# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
575013 | m_fenais | A Difficult(y) Choice (BOI21_books) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "books.h"
using namespace std;
void solve(int N, int K, long long A, int S) {
vector<long long> v;
v.push_back(0);
for(int i=1; i<=N; i++){
v.push_back(skim(i));
}
for(int i=1; i<=v.size()-2; i++)
{
for(int j=i+1; j<=v.size()-1; j++)
{
for(int z=j+1; z<=v.size(); z++)
{
ll cnt = v[i] + v[j] + v[z];
if(cnt <= A*2 && cnt >= A)
{
vector<int> ans;
ans.push_back(i);
ans.push_back(j);
ans.push_back(z);
answer(ans);
}
}
}
}
impossible();
}