# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
414736 | milleniumEeee | 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 <bits/stdc++.h>
#include "books.h"
// start my defines
#define fr first
#define sc second
#define pii pair<int, int>
#define pb push_back
#define szof(s) (int)s.size()
#define all(s) s.begin(), s.end()
//#define ll long long
template<class T>void umax(T &a,T b){if(a < b)a = b;}
template<class T>void umin(T &a,T b){if(b < a)a = b;}
// finish my defines
#ifndef EVAL
#include "grader.cpp"
#endif
using namespace std;
// answer(vector <int> v)
// skim(int i)
const int MAXN = (int)1e5 + 5;
ll arr[MAXN];
void solve(int N, int K, ll A, int S) {
for (int i = 1; i <= N; i++) {
arr[i] = skim(i);
}
int cur = 0;
for (int i = 1; i <= N; i++) {
for (int j = i + 1; j <= N; j++) {
for (int k = j + 1; k <= N; k++) {
cur = arr[i] + arr[j] + arr[k];
if (A <= cur && cur <= A + A) {
answer({i, j, k});
return;
}
}
}
}
impossible();
}