随笔分类 -  stl

摘要:两种解法: 1.计数排序 //计数排序#include#include#include#includeusing namespace std;const int maxn=10001;int v[maxn], s[maxn];int main() { int N, Q; int Kase=0; while(cin>>N>>Q && N && Q) { ... 阅读全文
posted @ 2014-06-10 16:46 katago 阅读(159) 评论(0) 推荐(0)
摘要:自己按照stl实现了一个: http://www.cplusplus.com/reference/algorithm/binary_search/ 这里有个注释,如何判断两个元素相同: Two elements, a and bare considered equivalent if (!(a bool binary_search (ForwardIterator first, For... 阅读全文
posted @ 2014-03-24 14:59 katago 阅读(232) 评论(0) 推荐(0)