Light of Stars
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld

题目描述

There are n shining stars on an infinite two-dimensional plane. The i-th star can be seen as a point located at (x_i,y_i). It's guaranteed no two stars occupy the same place.

Each star emits the same regions of light that don't intersect. Every region of light is given in the form of an angle. Now you want to know, for every star, the number of times it is lightened by other stars. Note that stars will not block the light.

输入描述:

The first line contains two integers n,k () - the number of stars and the number of light regions.

The following n lines describe all the stars on the plane. The i-th of these lines contains two integers x_i, y_i (), describing the coordinates.

The following k lines describe all light regions. The i-th of these lines contains two integers l_i, r_i (), describing an illuminated region. The evaluation of degree starts from the positive x-axis and rotates clockwise.

It is guaranteed that any two different angle intervals do not intersect.

输出描述:

One line contains n integers, denoting the number of times each star is lightened.
示例1

输入

复制
4 2
0 0
4 5
2 4
1 5
0 45
120 150

输出

复制
1 1 1 0