Submission #950366

#TimeUsernameProblemLanguageResultExecution timeMemory
950366ezzzayMagic Tree (CEOI19_magictree)C++14
3 / 100
35 ms7136 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define inf LLONG_MAX #define ff first #define ss second const int N=1e6+5; int arr[N]; vector<int>ans; int par[N]; signed main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,m,k; cin>>n>>m>>k; for(int i=2;i<=n;i++){ cin>>par[i]; } int s=0; for(int i=1;i<=m;i++){ int v,w,d; cin>>v>>d>>w; s+=w; } cout<<s; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...