Submission #996979

#TimeUsernameProblemLanguageResultExecution timeMemory
9969793omar_ahmedSpeedrun (RMI21_speedrun)C++17
21 / 100
25 ms1012 KiB
#include "speedrun.h" // #include "grader.cpp" #include <bits/stdc++.h> using namespace std; void assignHints(int subtask, int n, int A[], int B[]) { setHintLen(n); for(int i = 1 ; i < n ; i++) { int u = A[i], v = B[i]; setHint(u, v, true); setHint(v, u, true); } } void solve(int node, int par, int &n) { for(int i = 1 ; i <= n ; i++) { if(i == par) continue; if(getHint(i)) { goTo(i); solve(i, node, n); } } goTo(par); } void speedrun(int subtask, int N, int start) { solve(start, start, N); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...