摘要: 为了说明C++定义比较函数的几种方法,下面将以sort函数为例进行说明。 1.默认的内置比较函数,将按照对象内定义的#include #include #include #include using namespace std;int main(){ vector vec{"Hello",... 阅读全文
posted @ 2015-02-04 14:20 Popco 阅读(1068) 评论(0) 推荐(0) 编辑
摘要: 这道题仍然是按照书上的思路来做,从上往下以DFS来搜索判断上下是否连通。根据圆与左右两边的下交点来判断出入点。 #include using namespace std;struct dot{ double x, y, r;}all[1024];int n, vis[1024], ok;d... 阅读全文
posted @ 2015-02-04 11:21 Popco 阅读(153) 评论(0) 推荐(0) 编辑