Submission #721551

# Submission time Handle Problem Language Result Execution time Memory
721551 2023-04-11T04:18:13 Z kas_s Art Collections (BOI22_art) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;

void solve() {
    int n; cin >> n;
    vector<int> a;
    for (int i = 1; i <= n; i++) a.push_back(i);
    do {
        if (publish(a)) {
            answer(a);
            return;
        }
    } while(next_permutation(a.begin(), a.end()));
}

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    solve();    
    return 0;
}

Compilation message

art.cpp: In function 'void solve()':
art.cpp:10:13: error: 'publish' was not declared in this scope
   10 |         if (publish(a)) {
      |             ^~~~~~~
art.cpp:11:13: error: 'answer' was not declared in this scope
   11 |             answer(a);
      |             ^~~~~~
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) {
      |        ~~~~~~~~~^~~~