- 博客(27)
- 资源 (1)
- 收藏
- 关注
原创 hdu 1065 I Think I Need a Houseboat
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1065#include#include#include#define PI 3.1415926using namespace std;int main(){ double a,b,t,area; int T,icase=1; scanf("%d",&T); w
2013-07-31 17:10:56 334
原创 hdu 1018 Big Number
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1018#include#includeusing namespace std;int main(){ int T,n,i; cin>>T; while(T--) { double tp=0; cin>>n; for(
2013-07-31 16:36:39 422
原创 hdu 3439 Watch The Movie(背包问题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3496
2013-07-31 16:13:53 472
原创 hdu 3033 I love sneakers!(分组背包)
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=3033#include#include#includeusing namespace std;int dp[11][10001];struct p{ int money,value;}nn[11][101];int main(){ int n,mm,K,i,j,k;
2013-07-30 17:35:21 375
原创 hdu 4501 小明系列故事——买年货(四维背包问题)
题目链接http://acm.h#include#include#define max(a,b) a>b?a:bint dp[101][101][101][6];int main(){ int n,v1,v2,k,i,j,l,p,a,b,c,m1,m2,m3; while(scanf("%d %d %d %d",&n,&v1,&v2,&k)!=EOF) {
2013-07-30 15:45:57 678
原创 hdu 2159 FATE(背包问题)
FATETime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5525 Accepted Submission(s): 2513Problem Description最近xhd正在玩一款叫做FATE的游戏,为了得
2013-07-30 12:33:35 363
原创 hdu 1116 Play on Words
Play on WordsTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4087 Accepted Submission(s): 1321Problem DescriptionSome of the s
2013-07-29 17:15:09 310
原创 hdu 1003 Max Sum
Max SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 112168 Accepted Submission(s): 25902Problem DescriptionGiven a sequence a[
2013-07-27 16:54:14 277
原创 hdu 1248 寒冰王座(完全背包)
寒冰王座Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8381 Accepted Submission(s): 4213Problem Description不死族的巫妖王发工资拉,死亡骑士拿到一张N
2013-07-27 11:07:03 1109
原创 hdu 1114 Piggy-Bank(完全背包)
Piggy-BankTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8088 Accepted Submission(s): 4065Problem DescriptionBefore ACM can
2013-07-25 16:30:39 346
原创 hdu 1085 Holding Bin-Laden Captive!
Holding Bin-Laden Captive!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11989 Accepted Submission(s): 5362Problem Description
2013-07-25 15:12:11 377
原创 hdu 1081 To The Max
To The MaxTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6391 Accepted Submission(s): 3054Problem DescriptionGiven a two-dim
2013-07-25 11:08:56 339
原创 hdu 1285 确定比赛名次(拓扑排序)
确定比赛名次Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8058 Accepted Submission(s): 3094Problem Description有N个比赛队(1
2013-07-24 09:44:28 363
原创 hdu 3342 Legal or Not(拓扑排序dfs)
Legal or NotTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3021 Accepted Submission(s): 1370Problem DescriptionACM-DIY is a
2013-07-23 16:54:47 411
原创 nyoj 138 找球号(二)hash表
找球号(二)时间限制:1000 ms | 内存限制:65535 KB难度:5描述在某一国度里流行着一种游戏。游戏规则为:现有一堆球中,每个球上都有一个整数编号i(0<=i<=100000000),编号可重复,还有一个空箱子,现在有两种动作:一种是"ADD",表示向空箱子里放m(0<m<=100)个球,另一种是"QUERY”,表示说出M(0<M<=100)个随机整
2013-07-22 11:33:26 438
原创 nyoj 469 擅长排列的小明 II
擅长排列的小明 II时间限制:1000 ms | 内存限制:65535 KB难度:3描述小明十分聪明,而且十分擅长排列计算。有一天小明心血来潮想考考你,他给了你一个正整数n,序列1,2,3,4,5......n满足以下情况的排列:1、第一个数必须是12、相邻两个数之差不大于2你的任务是给出排列的种数。输入多
2013-07-21 08:44:13 473
原创 nyoj 232 How to eat more Banana
How to eat more Banana时间限制:1000 ms | 内存限制:65535 KB难度:4描述A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a buildi
2013-07-20 10:36:35 425
原创 nyoj 201 作业题
作业题时间限制:3000 ms | 内存限制:65535 KB难度:3描述小白同学这学期有一门课程叫做《数值计算方法》,这是一门有效使用数字计算机求数学问题近似解的方法与过程,以及由相关理论构成的学科……今天他们的Teacher S,给他们出了一道作业题。Teacher S给了他们很多的点,让他们利用拉格朗日插值公式,计算出某严格单调函数的曲线。
2013-07-20 08:54:01 399
原创 zju 1108 FatMouse's Speed
ZOJ Problem Set - 1108FatMouse's SpeedTime Limit: 2 Seconds Memory Limit: 65536 KB Special JudgeFatMouse believes that the fatter a mouse is, the faster it runs. To disprove this
2013-07-19 09:13:24 474
原创 nyoj 246 Human Gene Functions
Human Gene Functions时间限制:1000 ms | 内存限制:65535 KB难度:4描述It is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by
2013-07-18 13:11:44 372
原创 nyoj 36 最长公共子序列
修改题目最长公共子序列时间限制:3000 ms | 内存限制:65535 KB http://acm.nyist.net/JudgeOnline/problem.php?pid=36难度:3描述 咱们就不拐弯抹角了,如题,需要你做的就是写一个程序,得出最长公共子序列。tip:最长公共子序列也称作最长公共子串(不要求连续),英文缩写为LCS(L
2013-07-18 09:51:29 402
原创 nyoj 546 Divideing Jewels
Divideing Jewels时间限制:1000 ms | 内存限制:65535 KB难度:4描述Mary and Rose own a collection of jewells. They want to split the collection among themselves so that both receive an equal share of the j
2013-07-18 08:08:33 476
原创 nyoj 47 过河问题
过河问题时间限制:1000 ms | 内存限制:65535 KB难度:5描述在漆黑的夜里,N位旅行者来到了一座狭窄而且没有护栏的桥边。如果不借助手电筒的话,大家是无论如何也不敢过桥去的。不幸的是,N个人一共只带了一只手电筒,而桥窄得只够让两个人同时过。如果各自单独过桥的话,N人所需要的时间已知;而如果两人同时过桥,所需要的时间就是走得比较慢的那个人单独行
2013-07-17 15:37:29 342
原创 nyoj 613 免费馅饼
#include#include#include#includeusing namespace std;int max(int a,int b){return aint main(){ int dp[10005][11],n,t,x,i,j; while(cin>>n) { if(n==0) break;
2013-07-17 14:48:21 470
原创 nyoj 37 回文字符串
#include#include#includeusing namespace std;int dp[1005][1005];char s[1005];#define INF 111111111int min(int a,int b){return aint fun(int len){ int i,p,j,k; memset(dp,0,
2013-07-17 14:43:57 420
原创 nyoj 16 矩形嵌套
#include#include#include#includeusing namespace std;struct p{int a,b;}nn[2005];int cmp(p x,p y){ if(x.a if(x.a==y.a&&x.b else return false;}void o(int i,int a,int b)
2013-07-17 14:35:47 393
原创 nyoj 15 括号匹配(二)
#include#include#includeusing namespace std;int dp[105][105];char s[105];#define INF 111111111int fun(int len){ int i,p,j,k; memset(dp,0,sizeof(dp)); for(i=0;i
2013-07-15 17:47:14 460
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人