Submission #523820

# Submission time Handle Problem Language Result Execution time Memory
523820 2022-02-08T08:41:14 Z 79brue Firefighting (NOI20_firefighting) C++14
0 / 100
227 ms 23304 KB
#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

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 time Memory Grader output
1 Incorrect 217 ms 23304 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 7372 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 7336 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 227 ms 23272 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 7364 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 224 ms 22556 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -