ACM-计算几何之Pick-up sticks——poj2653

这篇博客探讨了ACM竞赛中的计算几何问题——Pick-up sticks(poj2653)。题目要求找出所有未被覆盖的棍子序号,作者分享了两种解题方法:一种是通过两层循环判断棍子相交,另一种是利用STL的set数据结构动态判断并更新最上面的棍子。文章提到,虽然初始的循环方法已经能通过,但作者计划后续研究使用set的方法来优化解决方案。
摘要由CSDN通过智能技术生成
Pick-up sticks

题目:http://poj.org/problem?id=2653

Description

Stan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to find the top sticks, that is these sticks such that there is no stick on top of them. Stan has noticed that the last thrown stick is always on top but he wants to know all the sticks that are on top. Stan sticks are very, very thin such that their thickness can be neglected.


Input

Input consists of a number of cases. The data for each case sta
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值