摘要:
poj 3273-Monthly Expense链接:http://poj.org/problem?id=3273这样的在最优情况下找最短时间的题一般都可以二分,当然还可以dp,但是因为本题的数据较大,dp会很耗时,也会很费空间,所以用二分的方法,从max(a[i])到sum(a[i])进行逼近。View Code 1 #include<stdio.h> 2 #include<string.h> 3 #define MAX 305 4 int v[MAX]; 5 int main() 6 { 7 int n,m; 8 int sum,max; 9 int i;10 .. 阅读全文
posted @ 2012-04-06 22:00
zhenhai
阅读(152)
评论(0)
推荐(0)

浙公网安备 33010602011771号