Submission #708796

#TimeUsernameProblemLanguageResultExecution timeMemory
708796KiprasA Difficult(y) Choice (BOI21_books)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "books.h" typedef long long ll; using namespace std; void solve(ll n, ll k, ll c, ll s){ vector<ll> a; a.push_back(0); for(int i = 0; i < n; i++){ a.push_back(skim(i+1)); } vector<ll> pref; pref.push_back(0); for(int i = 1; i <= n; i++){ pref[i]=pref[i-1]+a[i]; } for(int i = 0; i <= n-k; i++){ if(pref[i+k]-pref[i]>=c&&pref[i+k]-pref[i]<=2*c){ vector<ll> aa; for(int x = i+1; x <= i+k; x++){ aa.push_back(x); } answer(aa); return; } } impossible(); }

Compilation message (stderr)

books.cpp: In function 'void solve(ll, ll, ll, ll)':
books.cpp:32:20: error: could not convert 'aa' from 'vector<long long int>' to 'vector<int>'
   32 |             answer(aa);
      |                    ^~
      |                    |
      |                    vector<long long int>