Submission #850068

#TimeUsernameProblemLanguageResultExecution timeMemory
850068divadSpeedrun (RMI21_speedrun)C++14
21 / 100
28 ms2352 KiB
#include <bits/stdc++.h> #include "speedrun.h" using namespace std; const int NMAX = 1002; vector<int> v[NMAX]; int n,l,vf[NMAX]; void assignHints (int subtask , int N, int A[], int B[]){ setHintLen(N); for(int i = 1; i < N; i++){ v[A[i]].push_back(B[i]); setHint(A[i], B[i], 1); v[B[i]].push_back(B[i]); setHint(B[i], A[i], 1); } } void dfs(int nod, int tata = -1){ vf[nod] = 1; for(int i = 1; i <= n; i++){ if(getHint(i) && vf[i] == 0){ goTo(i); dfs(i, nod); } } if(tata != -1){ goTo(tata); } } void speedrun(int subtask , int N, int start){ n = N; l = getLength(); dfs(start); }
#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...