Submission #991691

#TimeUsernameProblemLanguageResultExecution timeMemory
991691AbitoSpeedrun (RMI21_speedrun)C++17
12 / 100
49 ms1328 KiB
#include "speedrun.h" #include <bits/stdc++.h> using namespace std; #define pb push_back void dfs(int x,int p){ for (int i=1;i<=250;i++){ if (!getHint(i)) continue; for (int j=(i-1)*4+1;j<=i*4;j++){ if (j==p || j==x) continue; if (goTo(j)) dfs(j,x); } }if (p) goTo(p); return; } void assignHints(int subtask, int n, int A[], int B[]) { setHintLen(250); for (int i=1;i<n;i++){ setHint(A[i],(B[i]/4)+bool(B[i]%4),1); setHint(B[i],(A[i]/4)+bool(A[i]%4),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...