Submission #523820

#TimeUsernameProblemLanguageResultExecution timeMemory
52382079brueFirefighting (NOI20_firefighting)C++14
0 / 100
227 ms23304 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n; ll k; vector<pair<int, ll> > link[300002]; int main(){ scanf("%d %lld", &n, &k); for(int i=1; i<n; i++){ int x, y; ll v; scanf("%d %d %lld", &x, &y, &v); link[x].push_back(make_pair(y, v)); link[y].push_back(make_pair(x, v)); } printf("%d\n", n); for(int i=1; i<=n; i++) scanf("%d ", i); }

Compilation message (stderr)

Firefighting.cpp: In function 'int main()':
Firefighting.cpp:20:37: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=]
   20 |     for(int i=1; i<=n; i++) scanf("%d ", i);
      |                                    ~^    ~
      |                                     |    |
      |                                     int* int
Firefighting.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |     scanf("%d %lld", &n, &k);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~
Firefighting.cpp:14:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |         scanf("%d %d %lld", &x, &y, &v);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Firefighting.cpp:20:34: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   20 |     for(int i=1; i<=n; i++) scanf("%d ", i);
      |                             ~~~~~^~~~~~~~~~
#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...