답안 #653557

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
653557 2022-10-27T09:06:06 Z erto Art Collections (BOI22_art) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "art.h"
typedef long long int ll;
typedef long double ld;
#define INF (int)(1e9 + 7)
#define INF2 998244353
#define N (ll)(2e5 + 5)
//#define f first
//#define s second
//#define int ll
#define lsb(x) (x & (-x))
using namespace std;


void solve(int N){
    vector<int> v;
    for(int i=1; i<=N; i++)v.push_back(i);
    v.resize(N);
    do{
        int t = publish(v);
        if(t)break;
    }
    while(next_permutation(v.begin(), v.end()));
    answer(v);
}

Compilation message

art.cpp:15:6: error: variable or field 'solve' declared void
   15 | void solve(int N){
      |      ^~~~~
art.cpp:15:12: error: expected primary-expression before 'int'
   15 | void solve(int N){
      |            ^~~
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) {
      |        ~~~~~~~~~^~~~