Submission #211241

#TimeUsernameProblemLanguageResultExecution timeMemory
211241LawlietMagic Tree (CEOI19_magictree)C++14
3 / 100
58 ms2808 KiB
#include <bits/stdc++.h> using namespace std; typedef long long int lli; int n, m, k; int main() { scanf("%d %d %d",&n,&m,&k); lli ans = 0; for(int i = 2 ; i <= n ; i++) scanf("%d",&k); for(int i = 1 ; i <= m ; i++) { int w; scanf("%d %d %d",&k,&k,&w); ans += w; } printf("%lld\n",ans); }

Compilation message (stderr)

magictree.cpp: In function 'int main()':
magictree.cpp:10:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d %d",&n,&m,&k);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~
magictree.cpp:15:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&k);
   ~~~~~^~~~~~~~~
magictree.cpp:20:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d %d",&k,&k,&w);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~
#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...