本月博客排行
-
第1名
龙儿筝 -
第2名
johnsmith9th -
第3名
wy_19921005 - zysnba
- sgqt
- lemonhandsome
年度博客排行
-
第1名
宏天软件 -
第2名
青否云后端云 -
第3名
龙儿筝 - gashero
- wallimn
- vipbooks
- benladeng5225
- wy_19921005
- fantaxy025025
- e_e
- zysnba
- ssydxa219
- sam123456gz
- javashop
- arpenker
- tanling8334
- kaizi1992
- xpenxpen
- wiseboyloves
- xiangjie88
- ranbuijj
- ganxueyun
- sichunli_030
- xyuma
- wangchen.ily
- jh108020
- lemonhandsome
- zxq_2017
- jbosscn
- Xeden
- luxurioust
- lzyfn123
- zhanjia
- johnsmith9th
- forestqqqq
- ajinn
- nychen2000
- wjianwei666
- hanbaohong
- daizj
- 喧嚣求静
- silverend
- mwhgJava
- kingwell.leng
- lchb139128
- lich0079
- kristy_yy
- jveqi
- java-007
- sunj
最新文章列表
Codeforces Beta Round #96 (Div. 2)【完整题解】
KIDx 的解题报告
题目链接:http://codeforces.com/contest/133
以下省略头文件,前三题是水题,不解释
A题
#define M 105
char s[M];
int main()
{
bool flag;
int i, len;
while (gets (s))
{
flag = false;
len = strlen (s ...
hdu 2577 How to Type(很爽很好玩的DP)
How to Type
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 842 Accepted Submission(s): 364
Problem Description
Pirates have finished devel ...
hdu 2571 命运
命运
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2499 Accepted Submission(s): 893
Problem Description
穿过幽谷意味着离大魔王lemon已经无限接近了!可谁能想到,yifen ...
hdu 2084 数塔(最基础最简单的DP)
数塔
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7404 Accepted Submission(s): 4412
Problem Description
在讲述DP算法的 ...
hdu 3033 I love sneakers!(分组背包:每组至少一个)
I love sneakers!
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 890 Accepted Submission(s): 381
Problem Description
After months of hard w ...
hdu 1712 ACboy needs your help(我的第一个分组背包:每组至多一个)
ACboy needs your help
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 761 Accepted Submission(s): 374
Problem Description
ACboy has ...
hdu 2159 FATE(我的第一个二维背包)
FATE
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1914 Accepted Submission(s): 808
Problem Description
最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在 ...
hdu 1059 Dividing(二进制转化优化)
Dividing
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5887 Accepted Submission(s): 1594
Problem Description
Marsha and Bill own a collec ...
hdu 2191 珍惜现在,感恩生活(我的第一个多重背包)
悼念512汶川大地震遇难同胞——珍惜现在,感恩生活
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4215 Accepted Submission(s): 1690
Problem Description
急!灾区的食物依 ...
hdu 1114 Piggy-Bank(我的第一个完全背包)
Piggy-Bank
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2940 Accepted Submission(s): 1452
Problem Description
Before ACM can do anything ...
hdu 2602 Bone Collector(我的第一个01背包)
Bone Collector
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7904 Accepted Submission(s): 2949
Problem Description
Many years ago , in Te ...
HDU 1159 Common Subsequence .
Common Subsequence
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8893 Accepted Submission(s): 3578
Problem Description
A subsequence of a ...
HDU 2571 命运 .
命运
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)
Total Submission(s) : 9 Accepted Submission(s) : 4
Font: Times New Roman | Verdana | Georgia
Font Size: ← →
...
USACO Section 1.5.1 [Number Triangles] Java题解
题意分析:
数字三角形,找到从顶到底的最大和的通路。
解题思路:
DP题。newRow[j]+= max(oldRow[j-1], oldRow[j])。从上至下。边读边计算,状态只需保存当前行和上一行。每一行首尾补零,为了方便计算。
代码实现:
https://github.com/leonlu/USACOJavaSolution/blob/master/USACOSection1/src/n ...
USACO Section 1.1.4 [Broken Necklace] Java题解
题意分析:
一串项链,由红蓝白三种颜色的珠子串成。在某一点拆开项链,从这一点左端开始数连续相同颜色的最长长度,右端也做同样的计算(可以是与左端不同的颜色),求长度之和为最大时的值。(其中白色既可以认为是红色,也可以认为是蓝色。)
输入为wwwbbrwrb样式的字符串表示一串项链。由于项链是事实上首尾相连的,为了方便计算,将字符串乘以2拼接起来,即wwwbbrwrbwwwbbrwrb。
输出前需检验 ...