2 shunfurh 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.


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.


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)


caozhy   Ds   Rxr 2017.09.14 23:49
Csdn user default icon
Unity3D C#学习小结(六)[使用TrailRender做漂亮的特效]
大家都知道在游戏中很多很炫的技能,人物发出技能后,一道光过去了,是不是很有型?那怎么做这个特效呢?   1、首先创建一个Sphere,然后选中这个Sphere,然后为它添加Component->Effect->Trail Render 添加后可以看到    2、为它的Material选择一个材质,然后为该Sphere添加重力效果,看下效果, 3、游戏中应用只需要给这个球加个碰撞检测和
1.TrailRenderer拖痕渲染器 2.创建空物体 3.添加TrailRenderer组件 4.创建材质球,添加材质,并修改渲染器 5.把修改后的材质添加到物体
OGG-01044 错误
今天在给客户安装 OGG 的时候,PUMP 进程无法启动。 GGSCI (ycods1) 21> start PUMPBAM Sending START request to MANAGER ... EXTRACT PUMPBAM starting GGSCI (ycods1) 22> info all Program     Status      Group  
Trail Renderer Colors [C#]
修改Trail Renderer的Colors属性
Leetcode 514. Freedom Trail
问题描述: In the video game Fallout 4, the quest “Road to Freedom” requires players to reach a metal dial called the “Freedom Trail Ring”, and use the dial to spell a specific keyword in order to
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界面库 最小化事件
示例图:package mainimport ( "fmt" "log" "syscall" "github.com/lxn/walk" . "github.com/lxn/walk/declarative" "github.com/lxn/win" )var ( libuser32 *syscall.DLL isIconic *sys
关于OGG trail file 到999999之后的处理方法
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(拖尾)层级显示问题
一个2D游戏,在战斗中用Trail Renderer(拖尾)组件做 激光,但是一直被其他物体精灵挡住,不能显示在上层,而检查拖尾组件参数,没有设定 layer层级的选项。 但trail renderer继承自renderer,而renderer中的sortingOrder的大小可以控制渲染顺序,在它和你的精灵上加一个脚本,修改他们的sortingOrder的大小,越大越晚渲染。