# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
918432 | vjudge1 | A Difficult(y) Choice (BOI21_books) | C++17 | 1 ms | 964 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"
#define ll long long
using namespace std;
const int MAX = 1e5 + 5;
ll arr[MAX];
ll ask(int i){
if(!arr[i]) arr[i] = skim(i);
return arr[i];
}
void solve(int N, int K, long long A, int S) {
int l = 1, r = N + 1;
while(l < r){
int mid = (l + r) / 2;
if(ask(mid) < A){
l = mid + 1;
}
else{
r = mid;
}
}
if(l < K) impossible();
if(l != N + 1){
ll sum = 0;
vector<int> ans;
for(int i = 1; i < K; i++){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |