Submission #242250

#TimeUsernameProblemLanguageResultExecution timeMemory
242250shenxyMagic Tree (CEOI19_magictree)C++11
3 / 100
57 ms384 KiB
#include <cstdio> #include <algorithm> using namespace std; int n, m, k; int main() { scanf("%d %d %d", &n, &m, &k); if (k <= 20) { } else { for (int i = 1; i < n; ++i) scanf("%d", &k); int v, d, w; long long ans = 0; for (int i = 0; i < m; ++i) { scanf("%d %d %d", &v, &d, &w); ans += w; } printf("%lld", ans); } return 0; }

Compilation message (stderr)

magictree.cpp: In function 'int main()':
magictree.cpp:6: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:10:36: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   for (int i = 1; i < n; ++i) scanf("%d", &k);
                               ~~~~~^~~~~~~~~~
magictree.cpp:14:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    scanf("%d %d %d", &v, &d, &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...