Submission #996972

#TimeUsernameProblemLanguageResultExecution timeMemory
9969723omar_ahmedSpeedrun (RMI21_speedrun)C++17
21 / 100
24 ms1152 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(node); } } } 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...