摘要:
http://poj.org/problem?id=3045贪心,按Wi+Si排列对于最后一个位置,risk=W总-Wn-Sn,使得risk最小的是最大的(Wi+Si)。View Code #include<iostream>#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;struct data{ int w,p; long long all;}node[50009];int cmp(data a,data b){ return (a.p+a.w) 阅读全文
posted @ 2011-11-18 21:09 huhuuu 阅读(186) 评论(0) 推荐(0)
浙公网安备 33010602011771号