摘要:
很简单的优先队列或者堆的使用。 1 #include 2 #include 3 using namespace std; 4 5 //greater对int来说表示值越小优先级越高,也可以自己定义比较函数 6 priority_queue, greater > q; 7 char op[2];... 阅读全文
摘要:
两个栈来模拟浏览器的操作。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 stack forward; 7 stack back; 8 9 int main ()10 {11 string cur("http... 阅读全文