Submission #536948

#TimeUsernameProblemLanguageResultExecution timeMemory
536948squiddySpeedrun (RMI21_speedrun)C++17
21 / 100
47 ms844 KiB
#include "speedrun.h" #include <bits/stdc++.h> #define FOR(v, s, e) for (int v = s; v < e; v++) using namespace std; void assignHints(int subtask, int N, int A[], int B[]) { if (subtask == 1) { setHintLen(N); FOR(i, 1, N) { setHint(A[i], B[i], 1); setHint(B[i], A[i], 1); } } } void dfs(int nd, int par, int n) { vector<int> possible; FOR(i, 0, n) { if (getHint(i + 1) == 1) { possible.push_back(i + 1); } } for(int node : possible) { if (node == par) continue; goTo(node); dfs(node, nd, n); } if (par != -1) goTo(par); } void speedrun(int subtask, int N, int start) { if (subtask == 1) { dfs(start, -1, 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...