Problem 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 notic...
分类:
其他好文 时间:
2015-03-10 12:09:02
阅读次数:
166
题目意思:
但顺序给出n个小木棍(线段),取走在最顶上的木棍。
http://acm.hdu.edu.cn/showproblem.php?pid=1147
题目分析:
仔细想想此题还是判断线段是否相交,只是需要注意顺序,只能判断每个线段(木棍)后面放的木棍。类似于hdu1108。
AC代码:
/**
*判断后面的线段是否与前面的线段相交,
*此题还是一个判...
分类:
其他好文 时间:
2014-11-04 22:51:07
阅读次数:
215