The 2009 ACM-ICPC Asia Ningbo Regional Online Contest - D

来源:百度知道 编辑:UC知道 时间:2024/09/20 02:49:36
Diamonds

--------------------------------------------------------------------------------

Time Limit: 1 Second Memory Limit: 32768 KB Special Judge

--------------------------------------------------------------------------------

Task

Formally, a diamond with radius r, centered at (x,y), is the set of points whose manhattan distance to (x,y) is no more than r. Given n points p1, p2, ..., pn on the plane, your task is to draw n diamonds, so that pi lies in the interior or on the border of the i-th diamond, and each diamond, except the first one, encloses the previous one.

Input

The first line contains a single integer T (T <= 50), the number of test cases. Each case begins with a single integers n (1 <= n <= 200), the number of diamonds. Each of the following n lines contains three integers x, y, r (1 <= x, y <= 100000, 1 <= r <= 10000), indicating that the i-th diamond should co

呵呵……我也在做,交流一下吧,就是用一个菱形(被定义成曼哈顿距离的菱形),就是旋转45度的正方形,一个嵌套一个,求圆心

。。。楼主要参加acm英语过不去可不行啊~~~我就帮你大概翻译一下好了~...程序的化貌似很难。。。你加油~

画菱形,范围为r(菱形最远点到中心距离不超过r),中心坐标为x,y
input给你n个点,要你画n个菱形,第i个菱形要包含第i个点(点在菱形上或内),并且,除了第一个菱形以外,后一个菱形要要包含前一个菱形

input:第一行是测试用例的个数,有T组
第二行是菱形的个数n,
接下来n行是x,y,r,其中第i组x,y是要被第i个菱形包含的,r是那个菱形的范围
接下来是下一组测试用例

output:先写测试用例编号,然后接下来n行是菱形的中心坐标。
如果有不止一种答案,写任何一种就可以。每一个测试用例都是可解的。

the question’s mean is the actitiutixve tiyybs act。