TouchStone
  Please Login
Login Sign Up
距离CSP第一轮: ??天 距离CSP第二轮: ??天 距离NOIP还有: ??天
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P3104
  • Problem
  • P3104【NOIP2014 Day1 T2】联合权值
    Limits : Time Limit : 10000 MS   Memory Limit : 131072 KB
    Judgment Tips : 1s
    Description


    Input Format


    Output Format


    Sample Input

    5
    1 2
    2 3
    3 4
    4 5
    1 5 2 3 10

    Sample Output

    20 74

    Hint