update
This commit is contained in:
parent
f8a3eb88d8
commit
8e805915d6
23
src/P1352/P1352.cpp
Normal file
23
src/P1352/P1352.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
using std::cin, std::cout;
|
||||
using ll = int64_t;
|
||||
const ll max_n = 6e3+5;
|
||||
ll n, r[max_n];
|
||||
std::vector<ll> sons[max_n];
|
||||
|
||||
|
||||
|
||||
int main(){
|
||||
cin>>n;
|
||||
for(ll i{1};i<=n;i++){
|
||||
cin>>r[i];
|
||||
}
|
||||
for(ll i{1};i<n;i++){
|
||||
ll l, k;
|
||||
cin>>l>>k;
|
||||
sons[k].emplace_back(l);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user