摘要:
http://poj.org/problem?id=3525https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=1891&mosmsg=Submission+received+with+ID+1236113 一直不会半平面交,今天看了半平面交的做法,发现半平面交需要注意的细节还真是太多了,要仔细分析才能写对代码。半平面交较快的做法是用双向队列来维护半平面区域中的点和有向直线。 这道题 阅读全文
摘要:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4199https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=2729&mosmsg=Submission+received+with+ID+1236098 依然是《训练指南 阅读全文
摘要:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=14&page=show_problem&problem=1197 题意是给出两堆点,问是否能找到一条直线将这两堆点分开,有就输出“Yes”,否则输出“No”。 构建两个凸包,如果存在这样的一条直线,那么这两个凸包必然不相交。构建完凸包以后,就是枚举每条边,判断两个凸包是否有相交的部分。代码如下:View Code 1 #include <cstdio> 2 #include <cstrin 阅读全文