Submission #850066

# Submission time Handle Problem Language Result Execution time Memory
850066 2023-09-15T17:07:59 Z divad Speedrun (RMI21_speedrun) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;

const int NMAX = 1002;
vector<int> v[NMAX];
int n,l,vf[NMAX];

void assignHints (int subtask , int N, int A[], int B[]){
    setHintLen(N);
    for(int i = 1; i < N; i++){
        v[A[i]].push_back(B[i]);
        setHint(a[i], b[i], 1);
        v[B[i]].push_back(B[i]);
        setHint(b[i], a[i], 1);
    }
}

void dfs(int nod, int tata = -1){
    vf[nod] = 1;
    for(int i = 1; i <= n; i++){
        if(getHint(i) && vf[i] == 0){
            goTo(i);
            dfs(fiu, nod);
        }
    }
    if(tata != -1){
        goTo(tata);
    }
}

void speedrun(int subtask , int N, int start){
    n = N;
    l = getLength();
    dfs(start);
}

Compilation message

speedrun.cpp: In function 'void assignHints(int, int, int*, int*)':
speedrun.cpp:9:5: error: 'setHintLen' was not declared in this scope
    9 |     setHintLen(N);
      |     ^~~~~~~~~~
speedrun.cpp:12:17: error: 'a' was not declared in this scope
   12 |         setHint(a[i], b[i], 1);
      |                 ^
speedrun.cpp:12:23: error: 'b' was not declared in this scope
   12 |         setHint(a[i], b[i], 1);
      |                       ^
speedrun.cpp:12:9: error: 'setHint' was not declared in this scope; did you mean 'setns'?
   12 |         setHint(a[i], b[i], 1);
      |         ^~~~~~~
      |         setns
speedrun.cpp: In function 'void dfs(int, int)':
speedrun.cpp:21:12: error: 'getHint' was not declared in this scope; did you mean 'getline'?
   21 |         if(getHint(i) && vf[i] == 0){
      |            ^~~~~~~
      |            getline
speedrun.cpp:22:13: error: 'goTo' was not declared in this scope
   22 |             goTo(i);
      |             ^~~~
speedrun.cpp:23:17: error: 'fiu' was not declared in this scope
   23 |             dfs(fiu, nod);
      |                 ^~~
speedrun.cpp:27:9: error: 'goTo' was not declared in this scope
   27 |         goTo(tata);
      |         ^~~~
speedrun.cpp: In function 'void speedrun(int, int, int)':
speedrun.cpp:33:9: error: 'getLength' was not declared in this scope
   33 |     l = getLength();
      |         ^~~~~~~~~