제출 #857694

#제출 시각아이디문제언어결과실행 시간메모리
857694VanioSpeedrun (RMI21_speedrun)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> #include "speedrun.h" using namespace std; void assignHints(int st, int n, int a[], int b[]){ int i; setHintLen(n); for(i=1;i<n;i++){ setHint(a[i],b[i],1); setHint(b[i],a[i],1); } } bool f[1001]; void rec(int k, int p){ int i; f[k]=1; for(i=1;i<n;i++){ if(getHint(i) && !f[i]){ goTo(i); rec(i,k); } } goTo(p); } void speedrun(int st, int n, int start){ rec(start,0); }

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

speedrun.cpp: In function 'void rec(int, int)':
speedrun.cpp:19:15: error: 'n' was not declared in this scope
   19 |     for(i=1;i<n;i++){
      |               ^