# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
871876 |
2023-11-11T18:42:28 Z |
Mr_Ph |
Speedrun (RMI21_speedrun) |
C++14 |
|
6 ms |
1968 KB |
#include "speedrun.h"
#include <bits/stdc++.h>
//#include "grader.cpp"
using namespace std;
int lol,st;
vector<vector<int>>adj;
void assignHints(int subtask, int n, int a[], int b[]) {
setHintLen(20);
adj.resize(n+1);
// cout<<"HI"<<endl;
for(int i=1;i<n;i++)
{
adj[a[i]].push_back(b[i]);
setHint(a[i],1,1);
adj[b[i]].push_back(a[i]);
}
lol=n;
}
void dfs(int node,int parent,int start,int n)
{
//cout<<node<<endl;
for(auto i:adj[node])
{
if(i==parent)continue;
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 time |
Memory |
Grader output |
1 |
Runtime error |
5 ms |
1416 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
1460 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
1676 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
1968 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
6 ms |
1240 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |