| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1365007 | lucasdmy | A Difficult(y) Choice (BOI21_books) | C++20 | 2 ms | 1204 KiB |
#include <bits/stdc++.h>
#include "books.h"
using namespace std;
void solve(int n, int books, long long int a, int s){
vector<long long int>v(n);
for(int k=1;k<=n;k++){
v[k-1]=skim(k);
}
for(int k=0;k<n-1;k++){
for(int i=k+1;i<n;i++){
int aux=lower_bound(v.begin(), v.end(), 2*a-v[k]-v[i])-v.begin();
int aux2=lower_bound(v.begin(), v.end(), a-v[k]-v[i])-v.begin();
if(aux2==n){
aux2--;
}
for(int j=aux2;j<=aux;j++){
if(j!=k and j!=i and v[j]+v[k]+v[i]<=2*a){
vector<int>resp={k+1, i+1, j+1};
answer(resp);
}
}
}
}
impossible();
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
