• [1591] How many Points

  • 时间限制: 3000 ms 内存限制: 65535 K
  • 问题描述

  • Welcome to NBUT Summer Trainning For ACM, I want you guys will enjoy this experiment.

    But firstly, your foolish captain Alex is

    thinking about an easy problem(to others), but he can't solve it, so

    he asks you for help. Maybe you will suspect how can he become the captain?

    Givn n points and m segments in X-Axes, for

    each segment, I want to know how many points in this segment.

    A point Pi wil lie in a segment AB, if Ai <=Pi <= Bi.


  • 输入
  • Input starts with an integer T (≤ 5), denoting the number of test cases.
    Each test case starts with two integers n (n <= 100000) and m (m <= 100000)
  • 输出
  • For each case, print the case number in a single line.
    Then for each segment, print the number of points that lie in that segment.
  • 样例输入
  • 1
    5 3
    1 3 4 5 6
    0 7
    1 2
    1 6
  • 样例输出
  • Case 1:
    5
    1
    5
  • 提示
  • 来源
  • Alex@NBUT
  • 操作

显示春菜