#include <algorithm>
#include <fstream>
#include <vector>
#include <queue>
#include <stack>
#include <iostream>
#include <cmath>
#include <queue>
#include <set>
#include <cstring>
#include <map>
#include <unordered_map>
//#include <bits/extc++.h>
#define F first
#define S second
#define PB push_back
using namespace std;
//using namespace __gnu_pbds;
//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ost;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<pair<int, ii>> viii;
typedef vector<vii> vvii;
typedef vector<ll> vll;
typedef vector<vll> vvll;
void setHintLen (int l);
void setHint(int i, int j, bool b);
int getLength ();
bool getHint(int j);
bool goTo(int x);
vvi al;
int par;
int findPar(int n){
int ans=1;
for(int i=1;i<=n;i++)
if(al[i].size()>1)
ans=i;
return ans;
}
void assignHints(int subtasks, int n, int a[], int b[]){
al.resize(n+1, vi());
for(int i=1;i<n;i++){
al[a[i]].PB(b[i]);
al[b[i]].PB(a[i]);
}
par=findPar(n);
setHintLen(1);
}
void speedrun(int subtasks, int n, int start){
if(subtask!=2) return;
bool vis[n+1];
memset(vis, false, n+1);
vis[start]=true;
if(start!=par){
goTo(par);
vis[par]=true;
}
for(int i=1;i<=n;i++){
if(!vis[i]){
vis[i]=true;
goTo(i);
goTo(par);
}
}
}
Compilation message
speedrun.cpp: In function 'void speedrun(int, int, int)':
speedrun.cpp:59:4: error: 'subtask' was not declared in this scope; did you mean 'subtasks'?
59 | if(subtask!=2) return;
| ^~~~~~~
| subtasks