摘要: 题目:http://poj.org/problem?id=1442开始用二叉排序树写的,TLE了,改成优先队列,过了。。两个版本都贴一下吧,赚稿费。。 1 #include 2 #include 3 #include 4 using namespace std; 5 priority_queu... 阅读全文
posted @ 2013-08-16 11:25 Anti-Magic 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 题目:http://poj.org/problem?id=2442 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 priority_queueq; 8 int data[2][2010]; 9 ... 阅读全文
posted @ 2013-08-16 09:22 Anti-Magic 阅读(169) 评论(0) 推荐(0) 编辑