magictree.cpp:5:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
#pragma warning (disable: 4996)
magictree.cpp: In function 'int main()':
magictree.cpp:26:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int k = 0; k <= Y.size(); k++) dp[i][k] += dp[j][k];
~~^~~~~~~~~~~
magictree.cpp:32:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 1; j <= Y.size(); j++) dp[i][j] = max(dp[i][j], dp[i][j - 1]);
~~^~~~~~~~~~~
magictree.cpp:14:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld%lld%lld", &N, &M, &K);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
magictree.cpp:15:36: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (int i = 2; i <= N; i++) scanf("%lld", &P[i]);
~~~~~^~~~~~~~~~~~~~~
magictree.cpp:16:36: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (int i = 1; i <= M; i++) scanf("%lld%lld%lld", &A[i], &B[i], &C[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~