제출 #1353070

#제출 시각아이디문제언어결과실행 시간메모리
1353070lukaye_19Art Collections (BOI22_art)C++20
컴파일 에러
0 ms0 KiB
#include "art.h"
#include <bits/stdc++.h>
using namespace std;

vector<int>valid;

void perm(int N,int D,vector<int>t)
{
    if (valid.size()) return;
    
    for (int i = 0; i < N; i++)
    {
        if (t.find(N) != t.end())
        {
            t.push_back(N);
            
            perm(N,D - 1,t);
        }
    }
    
    if (N == 0)
    {
        int complaints = publish(t);
        
        if (!complaints) valid = t;
    }
}

void solve(int N)
{
    perm(N,H,{});
    
    answer(valid);
}

컴파일 시 표준 에러 (stderr) 메시지

art.cpp: In function 'void perm(int, int, std::vector<int>)':
art.cpp:13:15: error: 'class std::vector<int>' has no member named 'find'
   13 |         if (t.find(N) != t.end())
      |               ^~~~
art.cpp: In function 'void solve(int)':
art.cpp:31:12: error: 'H' was not declared in this scope
   31 |     perm(N,H,{});
      |            ^