当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

BZOJ4255:Keep Fit!

题目描述
You’re designing  a game console with a special  board which can evaluate how balance people  are. 
After the user stands on the board, it can record the movement of the user's "center of gravity". 
Technically,  the record is a sequence of  n  points  on  the  2D plane  (the user's "center of gravity" 
projected to the game board), where the origin (0,0) is the center of the game board. Samples are taken 
every 0.01 second, so if the user stands on it for one minute, your database gets 6000 sample points.  
In order to know better about his balancing status, the user can ask the game console some questions. 
Each question (i,j) means: count how many pairs of sample points, chosen from the interval between 
the i-th sample and the j-th sample (inclusive), whose Manhattan distance is no more than d, where d 
is the preset balance threshold parameter in the system. 
Your task is to write a program that can answer the questions. Note that you don't have to answer the 
questions one by one. You can read all the questions first, and then answer them. 

输入解释
There are no more than 3 test cases. The first line contains three integers n, d, q(1<=n<=200000, 
1<=d<=10^8, 1<=q<=10000), the number of points, the balance threshold and the number of queries. 
The next n lines contain the coordinates (x,y) (|x|,|y|<=10^8) of the sample points, in order. The points 
are numbered 1~n. The next q lines contain the questions (i,j) (1<=i<=j<=n). 

输出解释
For each test case, print the case number in the first line, then the answers of the questions, one on 
each line. 

输入样例
5 1 2 
0 0 
1 0 
3 0 
2 1 
2 0 
2 4 
1 5 
5 2 2 
0 0 
1 0 
3 0 
2 1 
2 0 
2 4 
1 5 
输出样例
Case 1: 
0 
4 
Case 2: 
3 
8 
提示

 2015年湖南省大学生程序设计竞赛

BZPRO Powered by Remmina.
Github Repository
来自acmore.cc的附加信息
bzoj_id 4255
import_source_sha256 b6004efa7716ed838b461d4f6b6a977d39636a622cd01d16004868637f64b2ce
bzoj_checker_pending False

该题目包含在题集 大视野(八中)OJ 中

题目来源 BZOJ 4255

源链接: LOCAL-BZOJ4255

共提交 0 次

通过率 --%
时间上限 内存上限
30000 MS 128 MB