Submission #982264

# Submission time Handle Problem Language Result Execution time Memory
982264 2024-05-14T05:05:55 Z Aiperiii Art Collections (BOI22_art) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define all(x) x.begin(),x.end()
using namespace std;
void solve(int N){
    vector <int> v;
    for(int i=1;i<=N;i++)v.pb(i);
    do{
        if(!publish(v)){
            answer(v);
            return;
        }
    }while(next_permutation(all(v)));
}




Compilation message

art.cpp: In function 'void solve(int)':
art.cpp:11:13: error: 'publish' was not declared in this scope
   11 |         if(!publish(v)){
      |             ^~~~~~~
art.cpp:12:13: error: 'answer' was not declared in this scope
   12 |             answer(v);
      |             ^~~~~~
interface.cpp: In function 'int publish(std::vector<int>)':
interface.cpp:20:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   20 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
interface.cpp: In function 'void answer(std::vector<int>)':
interface.cpp:36:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   36 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~