shunfurh 于 2017.08.30 12:25 提问

Trail Walk

FatMouse is busy organizing the coming trail walk. After the route for the trail walk has been determine, the next important task is to set the location of CPs(check point).

The route is composed by n line segments which only intersect on their endpoints. Set the starting point of the trail walk as origin, the coordinate of the endpoints are p1 p2 p3 ... pn, in the order of walking direction.

Now FatMouse wants to set m CPs on the route in such way that the walking distance between adjacent CPs are all equal. You can treat the starting point as the CP0 and the end as CPm+1.

Input

There are multiple test cases. The first line of each case contains two integer n, m(1 <= n, m <= 1000). Then n pairs of integer followed, giving the coordinate of pi.

Output

The first line of each case, output "Route case_number", Then m lines followed, the ith line contains "CPcase_num: (xi, yi)" where (xi, yi) represent the coordinate of the CPi. Always keep three number after the decimal point.

Sample Input

3 3
1 1
2 3
3 5
Sample Output

Route 1
CP1: (1.026, 1.051)
CP2: (1.684, 2.368)
CP3: (2.342, 3.684)

1个回答

caozhy      2017.09.14 23:49

Unity3D C#学习小结（六）[使用TrailRender做漂亮的特效]

Unity3D学习记录——TrailRenderer
1.TrailRenderer拖痕渲染器 2.创建空物体 3.添加TrailRenderer组件 4.创建材质球，添加材质，并修改渲染器 5.把修改后的材质添加到物体

OGG-01044 错误

Trail Renderer Colors [C#]

Leetcode 514. Freedom Trail

Oracle GoldenGate Trail文件
Trail文件介绍   To support the continuous extraction and replication of database changes, Oracle GoldenGate stores records of the captured changes temporarily on disk in a series of files called a tr
golang walk界面库 最小化事件

GoldenGate Trail File Sequence Number Does Not Properly Reset after 999999 (Doc ID 1453979.1) What Happens When The Maximum Number Of Trail Files (999999) Is Exceeded? (文档 ID 1060554.1) Extract Aben
Trail Renderer（拖尾）层级显示问题