wojiaohuangyu的专栏

一步一个脚印

hdu-2546 饭卡

http://acm.hdu.edu.cn/showproblem.php?pid=2540-1背包问题 代码: #include #include #include using namespace std; int cmp(int a,int b){ return a<b; } int ...

2014-11-29 21:55:51

阅读数:469

评论数:0

nyoj-722 数独

正好我现在在玩数独这个游戏,看到这个问题我就来了兴趣,完成着这个问题,妈妈再也不用担心我玩数独游戏啦~~ 题目链接: http://acm.nyist.net/JudgeOnline/problem.php?pid=722#include int map[9][9]; int flag; int ...

2014-11-29 21:27:11

阅读数:701

评论数:2

hdu-1010 Tempter of the Bone 简单的搜索

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1010 做这道题目的时候需要注意剪枝,如果没有剪枝的话,就会超时 注意奇偶剪枝 代码:】 #include #include #include char map[20][20]; int top[4...

2014-11-29 11:00:31

阅读数:422

评论数:0

nyoj-58 最少步数 搜索

题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=58 比较简单的搜索题目, 代码: #include #include int map[9][9]={{1,1,1,1,1,1,1,1,1},{1,0,0,1,0,0,1,0,1}, ...

2014-11-29 10:51:38

阅读数:459

评论数:0

hdu-2152 Fruit

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2152母函数: 代码: #include #include int main(){ int c1[120],c2[120],min[120],max[120]; int i,j,k,t,n,m; ...

2014-11-26 22:37:23

阅读数:403

评论数:0

hdu-1864 最大报销额

简单的背包题 ;好无奈,我又没做出来在考试的时候 代码: #include #include #include using namespace std; double dp[60],money[60]; double total; int num,i,j,n,k,t; double max(dou...

2014-11-26 13:18:41

阅读数:476

评论数:0

hdu-1241 Oil Deposits

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1241

2014-11-25 11:39:53

阅读数:382

评论数:0

hdu-1902 The Dragon of Loowater

Problem Description Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. The shores of Rellau Creek in cen...

2014-11-22 21:39:30

阅读数:392

评论数:0

hdu-1016 Prime Ring Problem 搜索题

Problem Description A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of n...

2014-11-22 10:41:26

阅读数:396

评论数:0

hdu 1003 Max Sum

Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,...

2014-11-21 21:05:03

阅读数:306

评论数:0

nyoj 791 Color the fence

描述 Tom has fallen in love with Mary. Now Tom wants to show his love and write a number on the fence opposite to  Mary’s house. Tom thinks that th...

2014-11-20 15:48:25

阅读数:453

评论数:0

hdu nyoj 220 推桌子

题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=220 贪心算法 主要是

2014-11-20 13:57:39

阅读数:403

评论数:0

nyoj 364 田忌赛马

描述 Here is a famous story in Chinese history. "That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He like...

2014-11-18 22:29:55

阅读数:457

评论数:0

nyoj Radar

描述 Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the...

2014-11-17 21:47:33

阅读数:342

评论数:0

hdu-2544 最短路 弗洛伊德算法

Problem Description 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?   Input 输入包括多组...

2014-11-17 14:12:00

阅读数:759

评论数:0

hdu-1312 Red and Black

Problem Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black t...

2014-11-16 16:13:05

阅读数:355

评论数:0

hdu-1166 敌兵布阵

Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌...

2014-11-14 23:50:19

阅读数:439

评论数:0

hdu -1302 The Snail

Problem Description A snail is at the bottom of a 6-foot well and wants to climb to the top. The snail can climb 3 feet while the sun is up, but sli...

2014-11-13 12:21:15

阅读数:404

评论数:0

hdu -3502 Calculation 2

Problem Description Given a positive integer N, your task is to calculate the sum of the positive integers less than N which are not coprime to N. A...

2014-11-12 22:22:34

阅读数:466

评论数:0

hdu- 1028 Ignatius and the Princess III

Problem Description "Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says. "...

2014-11-10 20:50:03

阅读数:331

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭