# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
991581 | snpmrnhlol | Sprinkler (JOI22_sprinkler) | C++17 | 427 ms | 60756 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>
using namespace std;
const int N = 2e5;
const int D = 40;
vector <int> e[N];
vector <int> path;
int pr[N];
int bonus[N][D];
int v[N];
void dfs(int node, int p){
pr[node] = p;
for(auto i:e[node]){
if(i == p)continue;
dfs(i, node);
}
}
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
int n,mod;
cin>>n>>mod;
for(int i = 0;i < n - 1;i++){
int u,w;
cin>>u>>w;
e[u - 1].push_back(w - 1);
e[w - 1].push_back(u - 1);
}
for(int i = 0;i < n;i++){
cin>>v[i];
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |