Submission #959461

#TimeUsernameProblemLanguageResultExecution timeMemory
959461Bidoneczek11Art Collections (BOI22_art)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "art.h" using namespace std; #define int long long #define ll long long #define ld long double #define pb push_back #define nd second #define st first #define sz size #define forr(i, n) for(int i=1;i<=n;i++) const ll infl=1e18+90; const int inf=1e9+90; vector<int> wek; void solve(int n) { for(int i=1;i<=n;i++) { wek.pb(i); } while(true) { int x=publish(wek); if(x==0) { answer(wek); return; } else { next_permutation(wek.begin(), wek.end()); } } }

Compilation message (stderr)

art.cpp: In function 'void solve(long long int)':
art.cpp:27:23: error: could not convert 'wek' from 'vector<long long int>' to 'vector<int>'
   27 |         int x=publish(wek);
      |                       ^~~
      |                       |
      |                       vector<long long int>
art.cpp:30:20: error: could not convert 'wek' from 'vector<long long int>' to 'vector<int>'
   30 |             answer(wek);
      |                    ^~~
      |                    |
      |                    vector<long long int>
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) {
      |        ~~~~~~~~~^~~~