TouchStone
  Please Login
Login Sign Up
距离明年CSP第一轮: ??天 距离CSP第二轮: ??天 距离NOIP还有: ??天
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P5405
  • Problem
  • P5405魔法树
    Limits : Time Limit : - MS   Memory Limit : - KB
    Judgment Tips : 1s,128m
    Description

    Input Format

    Output Format

    Sample Input

    4
    0 1
    1 2
    2 3
    4
    Add 1 3 1
    Query 0
    Query 1
    Query 2

    Sample Output

    3
    3
    2