# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
242296 | 2020-06-27T08:25:39 Z | dantoh000 | Magic Tree (CEOI19_magictree) | C++14 | 75 ms | 4728 KB |
#include <bits/stdc++.h> using namespace std; int n,m,k; int p[100005]; vector<int> G[100005]; long long ans; int dp1[100005], dp2[100005]; int main(){ scanf("%d%d%d",&n,&m,&k); for (int i = 2; i <= n; i++){ scanf("%d",&p[i]); G[p[i]].push_back(i); } int ans = 0; for (int i = 0; i < m; i++){ int v,d,w; scanf("%d%d%d",&v,&d,&w); ans += w; } printf("%lld",ans); //dfs(1,-1); //printf("%d",dp1[]; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 2688 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 43 ms | 4472 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 2664 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 75 ms | 4728 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 2688 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 11 ms | 3072 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 2688 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 2688 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |