TouchStone
  Please Login
Login Sign Up
距离明年CSP第一轮: ??天 距离CSP第二轮: ??天 距离NOIP还有: ??天
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P5840
  • Problem
  • P5840百鸽笼
    Limits : Time Limit : 400000 MS   Memory Limit : 262144 KB
    Description

    hdhdTQL

    Input Format

    

    Output Format

    

    Sample Input

    6 8
    2 7 4 3 5 9
    3 2 5 3
    1
    2 4
    3 1 4 2
    2 6
    3 1 7 5
    1
    3 3 6 4

    Sample Output

    5
    4
    6
    9

    Hint

    hdhdAKIOI


    Source  PIgēON