
STL
晨识草
同样都是碳
展开
-
List With Iterator(STL)
实现标准模板库中的功能#include<iostream>#include<string>#include<cassert>using namespace std;template<class T>class list { public: struct listelem; // forward declarations // 也可将struct和iterator的定义直接放在前原创 2016-05-15 16:37:34 · 452 阅读 · 0 评论 -
trickyPriorityQueue
利用stl中的容器vector实现队列中元素较大的优先出队的问题 例如: 输入 6 0 1 1 9 1 1 1 output: 5That is, there are six members in the queue, and you position is in 0, you have to calculate the order you can dequeue.// 排队问题#incl原创 2016-06-03 21:18:02 · 208 阅读 · 0 评论 -
IpAndQq(使用map和set)
题目: sample input:5 10258279649 192.168.1.45 10258279649 192.168.1.45 10258279643 192.168.1.40 10258279640 192.168.1.45 10258279641 192.168.1.30 192.168.1.45 10258279649sample output:192.168.1.4原创 2016-06-03 20:21:31 · 364 阅读 · 0 评论