Submission #574998

#TimeUsernameProblemLanguageResultExecution timeMemory
574998m_fenaisA Difficult(y) Choice (BOI21_books)C++14
Compilation error
0 ms0 KiB
#include "books.h"
using namespace std;
void solve(int N, int K, long long A, int S) {
  vector<long long> v;
  v.push_back(0);
  for(int i=1; i<=N; i++){
    v.push_back(skim(i));
  }
  for(int i=1; i<=N-2; i++)
  {
    long long cnt = v[i] + v[i+1] + v[i+2];
    if(cnt <= A*2 && cnt >= A)
    {
      vector<long long> ans;
      ans.push_back(i);
      ans.push_back(i+1);
      ans.push_back(i+2);
      answer(ans);
    }
  }
  impossible();
}

Compilation message (stderr)

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