TouchStone
  Please Login
Login Sign Up
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P3016
  • Problem
  • P3016【CQ Training 2014 Day5】使者
    Limits : Time Limit : 30000 MS   Memory Limit : 524288 KB
    Judgment Tips : 3s,512MB
    Description


    Input Format


    Output Format


    Sample Input

    13
    1 2
    1 3
    1 4
    2 5
    5 9
    5 10
    5 11
    10 13
    3 6
    4 7
    4 8
    7 12
    6
    2 4
    10 12
    9 8
    6 7
    3 11
    7 10
    5
    1 1 5
    3 5 4
    2 7 10
    2 10 12
    3 5 4

    Sample Output

    3
    1

    Hint

    数据范围: