Submission #523821

#TimeUsernameProblemLanguageResultExecution timeMemory
52382179brueFirefighting (NOI20_firefighting)C++14
3 / 100
271 ms25156 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++) printf("%d ", i); }

Compilation message (stderr)

Firefighting.cpp: In function 'int main()':
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);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
#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...