摘要: 简单的说nth_element算法仅排序第nth个元素(从0开始的索引)如iarray [first,last) 元素区间排序后 iarray[nth] 就是第nth大的元素(从0开始)要注意的是[first,nth) [nth,last)内的大小循序还不一定只能确定iarray[nth]是第nth... 阅读全文
posted @ 2015-07-08 12:57 111qqz 阅读(106) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3278bfs,用到了stl的queue#include #include #include #include #include #include #include #include #include using namespace std;typ... 阅读全文
posted @ 2015-07-08 10:25 111qqz 阅读(152) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1028#include #include #include #include #include #include #include #include #include using namespace std;typedef long long L... 阅读全文
posted @ 2015-07-08 10:08 111qqz 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=2643在考stl的map...我是定义了一个string 指向string的,表示参选人和党派的关系,和一个string 指向int的,表示某个党派被投票的次数。需要注意的是!!!需要注意的是!!!需要注意的是!!!字符串读入部分...... 阅读全文
posted @ 2015-07-08 09:27 111qqz 阅读(283) 评论(0) 推荐(0) 编辑