Submission #242314

# Submission time Handle Problem Language Result Execution time Memory
242314 2020-06-27T08:43:27 Z SomeoneUnknown Magic Tree (CEOI19_magictree) C++14
3 / 100
55 ms 768 KB
#include <bits/stdc++.h>
using namespace std;

int main(){
    int V, f, md;
    scanf("%d %d %d", &V, &f, &md);
    int par[V+1];
    for(int i = 2; i <= V; i++){
        scanf("%d", &par[i]);
    }
    long long tal = 0;
    for(int i = 0; i < f; i++){
        int v, d, w;
        scanf("%d %d %d", &v, &d, &w);
        tal += w;
    }
    printf("%lld", tal);
}

Compilation message

magictree.cpp: In function 'int main()':
magictree.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d %d", &V, &f, &md);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
magictree.cpp:9:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d", &par[i]);
         ~~~~~^~~~~~~~~~~~~~~
magictree.cpp:14:14: 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 time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 31 ms 640 KB Output is correct
2 Correct 26 ms 768 KB Output is correct
3 Correct 55 ms 640 KB Output is correct
4 Correct 51 ms 640 KB Output is correct
5 Correct 54 ms 640 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 53 ms 640 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 8 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -