답안 #959461

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
959461 2024-04-08T08:53:48 Z Bidoneczek11 Art Collections (BOI22_art) C++17
컴파일 오류
0 ms 0 KB
#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

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) {
      |        ~~~~~~~~~^~~~