Submission #871870

#TimeUsernameProblemLanguageResultExecution timeMemory
871870Mr_PhSpeedrun (RMI21_speedrun)C++17
21 / 100
24 ms1648 KiB
#include "speedrun.h" #include <bits/stdc++.h> //#include "grader.cpp" using namespace std; int lol,st; void assignHints(int subtask, int n, int a[], int b[]) { setHintLen(n); // cout<<"HI"<<endl; for(int i=1;i<n;i++) { setHint(a[i],b[i],1); setHint(b[i],a[i],1); } lol=n; } void dfs(int node,int parent,int start,int n) { //cout<<node<<endl; for(int i=1;i<=n;i++) { if(i==parent)continue; if(getHint(i)) { goTo(i); dfs(i,node,start,n); } } if(node!=start) goTo(parent); } void speedrun(int subtask, int n, int start) { /* your solution here */ st=start; dfs(st,0,st,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...