Submission #575515

#TimeUsernameProblemLanguageResultExecution timeMemory
575515birthdaycakeA Difficult(y) Choice (BOI21_books)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
 
#include "books.h"
 
using namespace std;
 
long long b[200001], vs[200001];
 
 
void idk(int x, int y){
    vector<int>fin;
    for(int i = x; i <= y; i++) fin.push_back(i);
    answer(fin);
}
void solve(int n, int k, long long a, int s) {
    long long tot = 0;
    vector<int>fin;
    for(int i = 1; i <= n; i++) {
        b[i] = skim(i);
        if(i < k)  {
            tot += b[i];
            fin.push_back(i);
        }
        vs[i] = 0;
    }
    for(int i = k; i <= n; i++){
        if(b[i] > a){
            tot += b[i];
            fin.push_back(i);
            if(tot >= a && tot <= 2 * a){
                answer(fin);
            }
            break;
        }
    }
    for(int i = 1; i + k - 1 <= n; i++){
        tot = 0;
        vector<int>fin;
        for(int j = i; j <= i + k - 1; j++){
            tot += b[j];
            fin.push_back(j);
        }
        if(tot >= a && tot <= 2 * a){
            answer(fin);
        }
    }
    impossible();
    
}
v

Compilation message (stderr)

books.cpp:50:1: error: 'v' does not name a type; did you mean 'vs'?
   50 | v
      | ^
      | vs