| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 846784 | Ahmed57 | A Difficult(y) Choice (BOI21_books) | C++17 | 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>
using namespace std;
#include "books.h"
void solve(int N,int K,long long A,int S){
long long arr[N];
for(int i = 0;i<N;i++){
arr[i] = skim(i+1);
}
for(int i = 0;i<N;i++){
for(int j = i+1;j<N;j++){
int it = lower_bound(arr+j+1,arr+N,A-arr[i]-arr[j])-arr;
if(it==N)continue;
if(arr[i]+arr[j]+arr[it]<=2*A){
answer({v[i].second,v[j].second,v[it].second});
}
}
}
impossible();
}
