제출 #1304853

#제출 시각아이디문제언어결과실행 시간메모리
1304853cansu_mutluPresent (RMI21_present)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
//#include "speedrun.h"
using namespace std;
int n = 0,cnt = 0;
vector<int> vis;
void assignHints(int subtask, int N, int A[], int B[])
{
    n = N;
    setHintLen(n);
    for(int i=1;i<n;i++)
    {
        int u = A[i],v = B[i];
        setHint(u,v,true);
        setHint(v,u,true);
    }
    //return;
}
void dfs(int s,int anne)
{
    vis[s] = 1;
   
    for(int x=1;x<=n;x++)
    {
        if(x!=anne && vis[x]== 0 && getHint(x))
        {
            vis[x] = 1;
            goTo(x);
            dfs(x,s);
            goTo(s);
        }
    }
}
void speedrun(int subtask, int N, int start)
{
    n = N;
    vis.resize(n+1,0);
    getLength();
    dfs(start,0);
    //return;
}

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

Main.cpp: In function 'void assignHints(int, int, int*, int*)':
Main.cpp:9:5: error: 'setHintLen' was not declared in this scope
    9 |     setHintLen(n);
      |     ^~~~~~~~~~
Main.cpp:13:9: error: 'setHint' was not declared in this scope; did you mean 'stdin'?
   13 |         setHint(u,v,true);
      |         ^~~~~~~
      |         stdin
Main.cpp: In function 'void dfs(int, int)':
Main.cpp:24:37: error: 'getHint' was not declared in this scope; did you mean 'getline'?
   24 |         if(x!=anne && vis[x]== 0 && getHint(x))
      |                                     ^~~~~~~
      |                                     getline
Main.cpp:27:13: error: 'goTo' was not declared in this scope
   27 |             goTo(x);
      |             ^~~~
Main.cpp: In function 'void speedrun(int, int, int)':
Main.cpp:37:5: error: 'getLength' was not declared in this scope
   37 |     getLength();
      |     ^~~~~~~~~