This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "speedrun.h"
#include <bits/stdc++.h>
//#define int long long
#define pii pair<int, int>
#define ti3 tuple<int, int, int>
#define ti4 tuple<int, int, int, int>
// This is like my secret account; yes it's like that ~ Baek Jiheon, Feel Good (Secret Code)
using namespace std;
void assignHints(int subtask, int N, int A[], int B[]) { /* your solution here */
setHintLen(N);
for (int i = 1; i < N; i++){
setHint(A[i], B[i], 1);
setHint(B[i], A[i], 1);
}
}
bool vis[1001];
int N;
void dfs(int x){
if (vis[x]) return;
vis[x] = true;
for (int i = 1; i <= N; i++){
if (getHint(i)){
goTo(i);
dfs(i);
goTo(x);
}
}
}
void speedrun(int subtask, int N, int start) { /* your solution here */
::N = N;
int l = getLength();
dfs(start);
}
Compilation message (stderr)
speedrun.cpp: In function 'void speedrun(int, int, int)':
speedrun.cpp:33:9: warning: unused variable 'l' [-Wunused-variable]
33 | int l = getLength();
| ^
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |