Submission #966959

#TimeUsernameProblemLanguageResultExecution timeMemory
966959AtabayRajabliSpeedrun (RMI21_speedrun)C++17
0 / 100
1 ms768 KiB
#include "speedrun.h" #include <bits/stdc++.h> using namespace std; const int sz = 2005; int cnt = 0, used[sz]; vector<int> g[sz]; void dfs(int v, int p) { used[v] = 1; for(int i : g[v]) { if(!used[i]) { goTo(i); dfs(i, v); } } if(p > 0 ) { goTo(p); } } void assignHints(int subtask, int N, int A[], int B[]) { for(int i = 1; i <= N - 1; i++) { g[A[i]].push_back(B[i]); g[B[i]].push_back(A[i]); } setHintLen(1); } void speedrun(int subtask, int N, int start) { dfs(start, -1); }
#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...