Impostos pokemon P14748


Statement
 

pdf   zip

Public test cases
  • Input

    4 3
    0 2 0
    3 0 3
    1 2 2
    
    4 4
    0 1 1
    0 2 1
    0 3 1
    2 3 1
    
    4 6
    3 1 5
    2 1 3
    0 2 2
    0 3 4
    1 0 0
    2 3 1
    
    5 6
    2 3 3
    3 1 9
    2 0 6
    0 3 4
    0 1 0
    0 4 10
    

    Output

    5
    0
    4
    16
    
  • Information
    Author
    Víctor Conchello
    Language
    Catalan
    Official solutions
    C++
    User solutions
    C++