답안 #1007273

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1007273 2024-06-24T14:30:07 Z christinelynn Art Collections (BOI22_art) C++17
컴파일 오류
0 ms 0 KB
#include "art.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define ld long double
#define pb push_back
#define endl '\n'
#define all(v) v.begin(), v.end()
#define all1(v) v.begin() + 1, v.end()
#define rall(v) v.rbegin(), v.rend()
#define rall1(v) v.rbegin(), v.rend()-1
#define fr(m,n,k) for(int m=n;m<=k;m++)
#define frr(m,n,k) for(int m=n;m>=k;m--)
#define yes cout << "YES"
#define no cout << "NO"
#define yesm cout << "Yes"
#define nom cout << "No"
#define inf 1e18
#define ext {cout << -1; return;}
#define zxt {cout << 0; return;}
#define noxt {no;return;}
#define yesxt {yes;return;}
#define fill(x,s) memset(x, s, sizeof(x));
#define lb lower_bound
#define ub upper_bound
#define pi pair<int,int>
#define vi vector<int>
#define vvi vector<vi>
#define vs vector<string>
#define vpi vector<pi>
#define mii map<int,int>
#define si set<int>
#define fi first
#define se second
#define sz size()
#define el cout<<endl

bool id, id1, id2;
int n, m, k, l, r, a, b, c, d, e, x, y, z, i, j, q, t, o, w;
int mi = inf, ma, sum, ans, num, tp;
string s, p;

void solve(int N) {
    n = n;
    vi v; fr(i, 1, n) v.pb(i);
    x = publish(v);
    if (x == 0) {
        answer(v); return;
    }
    while (next_permutation(all(v))) {
        x = publish(v);
        if (x == 0) {
            answer(v); return;
        }
    }
}

Compilation message

art.cpp: In function 'void solve(long long int)':
art.cpp:47:17: error: could not convert 'v' from 'vector<long long int>' to 'vector<int>'
   47 |     x = publish(v);
      |                 ^
      |                 |
      |                 vector<long long int>
art.cpp:49:16: error: could not convert 'v' from 'vector<long long int>' to 'vector<int>'
   49 |         answer(v); return;
      |                ^
      |                |
      |                vector<long long int>
art.cpp:52:21: error: could not convert 'v' from 'vector<long long int>' to 'vector<int>'
   52 |         x = publish(v);
      |                     ^
      |                     |
      |                     vector<long long int>
art.cpp:54:20: error: could not convert 'v' from 'vector<long long int>' to 'vector<int>'
   54 |             answer(v); return;
      |                    ^
      |                    |
      |                    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) {
      |        ~~~~~~~~~^~~~