上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 34 下一页

2012年7月27日

hdu 1428

摘要: #include#includeusing namespace std;const int INF=0xfffffff;const int MAX=55;struct point{ int x; int y;};int t[MAX][MAX];int m[MAX][MAX];bool inq[M... 阅读全文

posted @ 2012-07-27 21:01 Slege 阅读(83) 评论(0) 推荐(0) 编辑

(int&)a和(int)a的区别

摘要: float a = 1.0f; cout #include #include using namespace std; int main() { float a = 1.0f; cout (a) (int)&a == reinterpret_cast (&a); (int&)a... 阅读全文

posted @ 2012-07-27 21:00 Slege 阅读(223) 评论(0) 推荐(0) 编辑

博客。。

摘要: 月光博客:点击打开链接 程序员陈浩:点击打开链接 点击打开链接 点击打开链接 点击打开链接 未完。。 大家可以帮我补充。 阅读全文

posted @ 2012-07-27 20:24 Slege 阅读(75) 评论(0) 推荐(0) 编辑

程序员技术练级攻略

摘要: 作者陈浩 原文链接http://coolshell.cn/articles/4990.html 月光博客6月12日发表了《写给新手程序员的一封信》,翻译自《An open letter to those who want to start programming》,我的朋友(他在... 阅读全文

posted @ 2012-07-27 20:04 Slege 阅读(88) 评论(0) 推荐(0) 编辑

hdu 1355 The Peanuts

摘要: 题目链接.. /********************************* 看清题目,直接模拟,题中已经说了怎么做了:According to Mr. Robinson's requirement, Dodo should go to the plant with the most p... 阅读全文

posted @ 2012-07-27 19:45 Slege 阅读(83) 评论(0) 推荐(0) 编辑

hdu 1203 I NEED A OFFER!

摘要: dp[j]表示用j万元,不能得到一个offer的最小概率。。 动态转移方程: dp[j] =min(dp[j],dp[j-a[i]]*b[i]) #include"stdio.h"int a[10010];double b[10010],dp[10010];double min(double ... 阅读全文

posted @ 2012-07-27 18:56 Slege 阅读(67) 评论(0) 推荐(0) 编辑

hdu 1024 Max Sum Plus Plus

摘要: 主要参考这篇文章 http://hi.baidu.com/eizi/blog/item/3c12270987a4ad38e9248880.html 题意: 给你n个数的序列,从中取m段不相交的序列[ai,bi](1<=i<=m)使得这m段的和是所有可能中和最大的. 思路: 用dp[i... 阅读全文

posted @ 2012-07-27 17:31 Slege 阅读(100) 评论(0) 推荐(0) 编辑

hdu 1025 Constructing Roads In JGShining's Kingdom

摘要: 二维DP会超时。。。。 点击打开链接 假设存在一个序列d[1..9] = 2 1 5 3 6 4 8 9 7,可以看出来它的LIS长度为5。 下面一步一步试着找出它。 我们定义一个序列B,然后令 i = 1 to 9 逐个考察这个序列。 此外,我们用一个变量Len来记录现在最长算到多少了 首... 阅读全文

posted @ 2012-07-27 15:41 Slege 阅读(109) 评论(0) 推荐(0) 编辑

hdu 1579 Function Run Fun

摘要: 用递归的话一定会超时,可以将递归转化为递推来解决, 也可以在递推的时候标记; #includeint map[30][30][30]={-1};int main(){ int a,b,c,i,j,k; for(i=0;i20||b>20||c>20) i=map[20][20][20];... 阅读全文

posted @ 2012-07-27 14:41 Slege 阅读(98) 评论(0) 推荐(0) 编辑

hdu 3371 Connect the Cities (prime)

摘要: 题目链接 /* 简单prime。。 一次AC */ #include"stdio.h"#include"string.h"#define INF 99999999int map[502][502],dis[502],mark[502];int n,m,k,cnt,sum;void prime(... 阅读全文

posted @ 2012-07-27 11:22 Slege 阅读(113) 评论(0) 推荐(0) 编辑

上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 34 下一页

导航