Submission #991675

#TimeUsernameProblemLanguageResultExecution timeMemory
991675AbitoSpeedrun (RMI21_speedrun)C++17
0 / 100
8 ms768 KiB
#include "speedrun.h" #include <bits/stdc++.h> using namespace std; const int NN=1005; bool vis[NN]; int n; void dfs(int x,int p){ //cout<<x<<' '<<p<<endl; vis[x]=1; for (int i=1;i<=n;i++){ if (vis[i]) continue; if (!getHint(i)) continue; goTo(i); dfs(i,x); } if (p) goTo(p); return; } void assignHints(int subtask, int N, int A[], int B[]) { n=N; setHintLen(n); for (int i=1;i<n;i++){ setHint(A[i],B[i],1); setHint(B[i],A[i],1); }return; } void speedrun(int subtask, int N, int start) { dfs(start,0); return; }
#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...