| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1364920 | julia_08 | A Difficult(y) Choice (BOI21_books) | C++20 | 2 ms | 448 KiB |
#include <bits/stdc++.h>
#include "books.h"
using namespace std;
using ll = long long;
void solve(int n, int k, ll a, int s){
vector<pair<int, ll>> x;
for(int i=1; i<=n; i++){
ll cur = skim(i);
x.push_back({i, cur});
}
vector<int> ans;
ll sum = 0;
for(int i=0; i<(k - 1); i++) sum += x[i].second;
int l = 0;
for(int i=(k - 1); i<x.size(); i++){
sum += x[i].second;
if(a <= sum && sum <= 2 * a){
for(int j=l; j<=i; j++) ans.push_back(x[j].first);
answer(ans);
return;
}
sum -= x[l].second;
l ++;
}
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... | ||||
