摘要: http://poj.org/problem?id=1442题意很难懂 题挺巧妙的 建立两个优先队列 一个从小到大 另一个从大到小 随时更新两队中的值 使其为1~i 和i+1~mView Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<queue> 5 using namespace std; 6 int num[30010],op[30010]; 7 int main() 8 { 9 int n,m,i,j,k,g;10 while(cin 阅读全文
posted @ 2013-01-23 15:16 _雨 阅读(153) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2442题解http://www.cnblogs.com/372465774y/archive/2012/07/09/2583866.html本来写的二维数组 ,直接対一维排序 不知道为嘛一直WA 只好该为一维的 就AC了View Code 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 int num1[2005],num2[2005]; 8 bool cmp(int a,int b) 9 {10 return a>t... 阅读全文
posted @ 2013-01-23 10:07 _雨 阅读(198) 评论(0) 推荐(0) 编辑