Submission #575013

#TimeUsernameProblemLanguageResultExecution timeMemory
575013m_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<=v.size()-2; i++) { for(int j=i+1; j<=v.size()-1; j++) { for(int z=j+1; z<=v.size(); z++) { ll cnt = v[i] + v[j] + v[z]; if(cnt <= A*2 && cnt >= A) { vector<int> ans; ans.push_back(i); ans.push_back(j); ans.push_back(z); answer(ans); } } } } impossible(); }

Compilation message (stderr)

books.cpp: In function 'void solve(int, int, long long int, int)':
books.cpp:9:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |   for(int i=1; i<=v.size()-2; i++)
      |                ~^~~~~~~~~~~~
books.cpp:11:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |     for(int j=i+1; j<=v.size()-1; j++)
      |                    ~^~~~~~~~~~~~
books.cpp:13:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |       for(int z=j+1; z<=v.size(); z++)
      |                      ~^~~~~~~~~~
books.cpp:15:9: error: 'll' was not declared in this scope
   15 |         ll cnt = v[i] + v[j] + v[z];
      |         ^~
books.cpp:16:12: error: 'cnt' was not declared in this scope; did you mean 'int'?
   16 |         if(cnt <= A*2 && cnt >= A)
      |            ^~~
      |            int