Submission #857689

# Submission time Handle Problem Language Result Execution time Memory
857689 2023-10-06T15:35:21 Z Vanio Speedrun (RMI21_speedrun) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.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);
}

Compilation message

speedrun.cpp: In function 'void assignHints(int, int, int*, int*)':
speedrun.cpp:6:5: error: 'setHintLen' was not declared in this scope
    6 |     setHintLen(n);
      |     ^~~~~~~~~~
speedrun.cpp:8:9: error: 'setHint' was not declared in this scope; did you mean 'setns'?
    8 |         setHint(a[i],b[i],1);
      |         ^~~~~~~
      |         setns
speedrun.cpp: In function 'void rec(int, int)':
speedrun.cpp:18:15: error: 'n' was not declared in this scope
   18 |     for(i=1;i<n;i++){
      |               ^
speedrun.cpp:19:12: error: 'getHint' was not declared in this scope; did you mean 'getline'?
   19 |         if(getHint(i) && !f[i]){
      |            ^~~~~~~
      |            getline
speedrun.cpp:20:13: error: 'goTo' was not declared in this scope
   20 |             goTo(i);
      |             ^~~~
speedrun.cpp:24:5: error: 'goTo' was not declared in this scope
   24 |     goTo(p);
      |     ^~~~