摘要: 1 #include 2 using std::vector; 3 4 template 5 void swap(vector &a, int i, int j) 6 { 7 T tmp = a[i]; 8 a[i] = a[j]; 9 a[j] = ... 阅读全文
posted @ 2015-07-15 16:57 __brthls 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using std::vector; 3 4 template 5 class PriorityQueue 6 { 7 public: 8 PriorityQueue(int size = 101):bHeap(size),currentSiz... 阅读全文
posted @ 2015-07-15 14:03 __brthls 阅读(455) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 using std::vector; 6 using std::list; 7 using std::string; 8 using std::find; 9 10 int hash(const s... 阅读全文
posted @ 2015-07-15 11:29 __brthls 阅读(245) 评论(0) 推荐(0) 编辑