# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1096573 | AlgorithmWarrior | Mousetrap (CEOI17_mousetrap) | C++14 | 879 ms | 158548 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define MAX 1000005
using namespace std;
vector<int>tree[MAX];
bool on_path[MAX];
int dp[MAX];
int h[MAX];
int tata[MAX];
int n,t,m;
void read(){
cin>>n>>t>>m;
int i;
for(i=1;i<n;++i){
int a,b;
cin>>a>>b;
tree[a].push_back(b);
tree[b].push_back(a);
}
}
void dfs(int nod){
for(auto fiu : tree[nod])
if(fiu!=tata[nod]){
h[fiu]=h[nod]+1;
tata[fiu]=nod;
dfs(fiu);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |