题目链接:http://codeforces.com/problemset/problem/835/C点击打开链接
C. Star sky
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
The Cartesian coordinate system is set in the sky. There you can see n stars, the i-th has coordinates (xi, yi), a maximum brightness c, equal for all stars, and an initial brightness si (0 ≤ si ≤ c).
Over time the stars twinkle. At moment 0 the i-th star has brightness si. Let at moment t some star has brightness x. Then at moment