E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
2602
DP: Bone Collector
BoneCollectorTimeLimit:1000MS MemoryLimit:32768KB 64bitIOFormat:%I64d&%I64uSubmitStatusPracticeHDU
2602
DescriptionManyyearsago
lethic
·
2012-08-01 00:00
Integer
less
each
iostream
64bit
output
HDU
2602
Bone Collector
ProblemDescriptionManyyearsago,inTeddy’shometowntherewasamanwhowascalled“BoneCollector”.Thismanliketocollectvariesofbones,suchasdog’s,cow’s,alsohewenttothegrave…Thebonecollectorhadabigbagwithavolumeof
ultimater
·
2012-07-27 16:00
HDOJ
2602
Bone Collector (01背包)
pid=
2602
题意:求最大价值思路:典型的01背包#include #include #defineN1111 intmain() { intt,n,v,val[N],vol[N],dp[N],i,j
sdc1992
·
2012-07-24 14:00
HDOJ
2602
Bone Collector
来到实验室看见学长写的早起一水,做了DP#include usingnamespacestd; intdp[1005],c[1005],p[1005]; intmain() { intn,v,i,j,t; scanf("%d",&t); while(t--){ scanf("%d%d",&n,&v); for(i=0;i=c[i];j--) dp[j]=max(dp[j],dp[j-c[i]]+p
aacm1992
·
2012-07-23 08:00
HDU 2546 饭卡(01背包) 解题报告
pid=2546昨天吧背包九讲中最基础的01背包看完,做了
2602
。结果晚上比赛相同题目却做不出。。苦想几个小时。。。
cxb569262726
·
2012-07-18 09:00
hdu
2602
/*分析: 温习一下背包,两分钟敲完,比以前敲得好看多啦~~~ 2012-07-10*/#include"stdio.h" #include"string.h" structA { intval; intv; }E[1011]; intmax(inta,intb) { returna>b?a:b; } intmain() { intT; int
Ice_Crazy
·
2012-07-10 17:00
HDOJ
2602
Bone Collector(0-1背包)
题目链接:。。。。。。。。。新手第一道0-1背包问题动态方程:dp[j]=max(dp[j],dp[j-V[i]]+W[i])j为容量,最后的dp[v]就为求的答案。code:#include #include intmain() { inti=0,j=0,t=0,n=0,v=0; intW[1002],V[1002],dp[1002]; scanf("%d",&t); while(t--) {
ulquiorra0cifer
·
2012-07-09 22:00
hdoj
2602
0-1背包
BoneCollectorTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):11958 AcceptedSubmission(s):4622ProblemDescriptionManyyearsago,inTeddy’shometowntherewasam
hnuzengchao
·
2012-07-02 15:00
Integer
less
input
each
output
hdu
2602
Bone Collector(0 1背包)
//第一次提交:WA //原因:for(intj=V;j>=0;j--)此处j写成了j>0,但是此题可能会有重量 //为0,但价值不为0的情况 //50 //24151 //00100 //输出结果应该为2+4+5+1=12 #include usingnamespacestd; intn; intN,V; intdp[1005]; intvalue[1005]; intvolume[1005];
chen895281773
·
2012-06-03 14:00
hdu
2602
(Bone Collector)
hdu
2602
(BoneCollector) 1 /* 2 Author: Leo.W 3 Descriptipn: 一个容量为V的大包,装价值为m1,体积为v1的物品(m2,v2;m3,v3
冰王子Leo与ACM一起的成长
·
2012-03-03 01:00
HDU
2602
#include #include #defineM1010 inta[M],b[M],n,v; intf[M]; intmax(intx,inty) { if(x=cost;i--) { f[i]=max(f[i],f[i-cost]+weight); } } intmain() { intt; inti,j,sum; scanf("%d",&t); while(t--&&scanf("%d%
vsooda
·
2012-02-25 00:00
HDU
2602
Bone Collector
0/1背包~~回顾下背包~~#include #include #include usingnamespacestd; intmain() { intdp[1001],val[1001],vol[1001],cas,i,j,n,v; scanf("%d",&cas); while(cas--) { scanf("%d%d",&n,&v); for(i=0;i=vol[i];j--) dp[j]=
xxx_bug
·
2012-01-25 16:00
背包问题的应用
pid=
2602
BoneCollectorProblemDescriptionManyyearsago,inTeddy’shometowntherewasamanwhowascalled“BoneCollector
Hackbuteer1
·
2012-01-05 16:00
算法
测试
Integer
input
each
output
中国科学院地理资源所成功举办“京区第六届地理学研究生学术论坛”
://www.igsnrr.ac.cn/xwzx/zhxw/201112/t20111228_3418948.html 12月25日,“京区第六届地理学研究生学术论坛”在中国科学院地理科学与资源研究所
2602
wsh6759
·
2011-12-28 12:00
工作
平台
HDOJ 2603:Bone Collector 0-1背包问题
pid=
2602
; 这是一道很一般的01背包问题,用动态规划求解就行了。 这是我的AC代码。
bruce128
·
2011-12-14 13:00
url
System
apache + svn 版本控制服务器创建
expandFolder=469&folderID=
2602
. 安装Subversion服务器
lgh1117
·
2011-11-29 16:00
apache
SVN
服务器
Module
subversion
tortoiseSVN
Objective-C 中self 和 super
http://www.cocoachina.com/macdev/objc/2011/0124/
2602
.html在Objective-C中的类实现中经常看到这两个关键字”self”和”super”,以以前
yhawaii
·
2011-11-19 15:00
struct
Class
interface
compiler
编译器
Forms
地理资源所成功举办“第五届京区地理学研究生学术论坛暨全国地理学研究生联合会成立五周年庆典”
zhxw/201012/t20101202_3036200.html 11月27日上午9:00,“第五届京区地理学研究生学术论坛暨全国地理学研究生联合会成立五周年庆典”在中国科学院地理科学与资源研究所
2602
wsh6759
·
2011-11-03 12:00
模拟攒机
gt; <dt> <table id="copyTbl" class=" " style="width:617px; height:
2602
px
jiagou
·
2011-11-02 17:00
模拟
模拟攒机
gt; <dt> <table id="copyTbl" class=" " style="width:617px; height:
2602
px
jiagou
·
2011-11-02 17:00
模拟
hdu
2602
BoneCollectorTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):8664 AcceptedSubmission(s):3307ProblemDescriptionManyyearsago,inTeddy’shometowntherewasama
hechenghai
·
2011-11-02 00:00
POJ
2602
Superlong sums 大整数求和
题意:大整数相加。#include intarray[1000002]; intmain() { __int64n,i; chara,b; intcarry=0; scanf("%I64d",&n);getchar(); for(i=0;i0;i--) { if(array[i]>=10) { array[i]-=10; array[i-1]++; }
Tsaid
·
2011-09-10 00:00
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 Pr
gzhu_101majia
·
2011-08-13 16:00
数据结构
算法
dp
ACM
背包
Bone Collector
pid=
2602
BoneCollector递归做法 //Bone Collector 递归做法 #include #define N 1005 #define V 1005
Wadeson_Lee
·
2011-08-06 09:21
职场
ACM
休闲
HDOJ
2602
Bone Collector
pid=
2602
这是一道简单的01背包问题的应用,直接用01代码一次性AC源代码: //HDOJ
2602
AC #include usingnamespacestd; #defineLEN1001//
jiahui524
·
2011-08-03 11:00
hdu
2602
Bone Collector--DP
/* 简单的0-1背包问题 刚开始感觉f[0]一般不会被赋值,也就没初始化它 但是数据有点叼,居然有体积为0价值不为0的骨头 这样f[0]就被赋值了 若不每次都初始化,后面的测试实例一上来,f[0]就有一非0值 */ #include intc[1100],w[1100],f[1100]; intmain() { intt,n,v,i,j; scanf("%d",&t); while(t--) {
qq172108805
·
2011-08-01 12:00
POJ
2602
-Superlong sums
转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1305101054 非常恶心的大数相加==首先输入就够恶心了。。。哪有人逐位还要间断输入两个数的。。。。 注意:如果用char[]保存加数和被加数,要用getchar()输入,如果用int[]保存加数和被加数,要用scanf)输入。用cin会超时,cin是重载函数,没有指定格式,输入时比较
lyy289065406
·
2011-07-29 20:00
c
File
delete
存储
ini
output
poj
2602
——Superlong sums
果然恶心,用字符串输出才过得了... #include<stdio.h> #define MAX 1000000 char a[2][MAX], sum[MAX]; int main() { int n, i; scanf("%d", &n); for(i=0; i<n; i++) { scanf("%d", &a[0][
44424742
·
2011-05-10 01:00
super
hdu
2602
Bone Collector
典型的01背包问题,第一个代码是正确的,第二代码错了,一直不明白错在哪儿了?求高手指点!/*THEPROGRAMISMADEBYPYY*//*----------------------------------------------------------------------------//Copyright(c)2011panyanyanyAllrightsreserved.URL:htt
panyanyany
·
2011-05-06 01:00
c
hdu
2602
Bone Collector
典型的01背包问题,第一个代码是正确的,第二代码错了,一直不明白错在哪儿了?求高手指点! /* THE PROGRAM IS MADE BY PYY */ /*----------------------------------------------------------------------------// Copyright (c) 2011 panyanyany All rights
txf2004
·
2011-05-06 01:00
Collector
小型网吧光电混合型解决方案(150台左右)
小型网吧光电混合型解决方案(150台左右)下载(46.87KB)半小时前 采用设备:产品数量备注UKR22501台5口宽带路由器UKG2804GM/NT1台24电口+4光口千兆网管型交换机UKG
2602
GU
软硬结合
·
2011-04-13 14:44
局域网
路由
光纤
交换
网吧
HDU
2602
简单的01背包
HDU
2602
简单的01背包http://acm.hdu.edu.cn/showproblem.php?
ACM乐园
·
2011-04-07 15:00
01背包问题小结
背包问题小结例题1、基本的0-1背包问题(HDU
2602
) 这是最基本的01背包模型。定义f[i][j]:在前i个bone中用容量为j的包选择bone所能得到的最大价值。
Once_HNU
·
2011-03-13 18:00
c
ini
hdu
2602
Bone Collector 01背包
#include#include#include#includeusingnamespacestd;structnode{intvolume;intvalue;}data[1000];intf[1001];intmain(){//freopen("1.txt","r",stdin);intt;cin>>t;while(t--){intn,v;cin>>n>>v;for(inti=0;i>data[
alfredtofu
·
2011-02-19 13:00
include
Objective-C 的 self 和 super 详解
http://www.cocoachina.com/macdev/objc/2011/0124/
2602
.html 在 Objective-C 中的类实现中经常看到这两个关键字 ”self” 和 ”super
wapysun
·
2011-01-27 22:00
C++
c
Objective-C
C#
oop
hdu
2602
——Bone Collector
01背包问题! 1.现在的f[v-c[i]]就相当于原来的f[i-1][v-c[i]]; 2. f[i][v]表示前i件物品恰放入一个容量为v的背包可以获得的最大价值. #include<stdio.h> #include<string.h> int a[1005],b[1005]; int f[1005]; int main() { int t,i,j,n,v;
44424742
·
2010-12-08 18:00
C++
c
F#
C#
J#
hdu
2602
(01 背包)Bone Collector
经典的DP(01背包)一、无优化版状态dp[i][v]表示前i个物品背包容量为V的最大价值状态转移方程dp[i][j]=max{dp[i-1][j],dp[i-1][j-volume[i]] +value[i]}; /*Author:ACb0yDate:2010-9-03Type:DP(01背包)dp[i][j]=max{dp[i-1][j],dp[i-1][j-volume[i]]+volume
ACb0y
·
2010-09-03 12:00
c
优化
2010
HDU
2602
(0-1背包问题)
BoneCollectorTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):3227 AcceptedSubmission(s):1050ProblemDescriptionManyyearsago,inTeddy’shometowntherewasama
xiaotaoqibao
·
2010-04-16 21:00
HDU
2602
Bone Collector
也开始做杭电的题目了#include#includeintmain(){ intvalue[1001],w[1001],f[1001]; inti,j,n,v,count1; freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); while(scanf("%d",&count1)!=EOF) { while(count1--)
hqd_acm
·
2010-03-27 12:00
hdu
2602
Bone Collector (01 背包问题)
BoneCollectorTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):2080 AcceptedSubmission(s):669ProblemDescriptionManyyearsago,inTeddy’shometowntherewasaman
hongxdong
·
2009-12-01 12:00
算法
struct
Integer
less
each
output
照片尺寸
3.9X2.62寸5.4X3.65寸:4X5英寸6寸:4X6英寸7寸:5X7英寸8寸:6X8英寸1寸是3.75X2.5cm2寸是3.5*5.31寸2.5*3.5cm413*295身份证大头照3.3*2.2390*
2602
zcsull
·
2009-06-06 08:02
职场
尺寸
休闲
照片尺寸
3.9X2.62寸5.4X3.65寸:4X5英寸6寸:4X6英寸7寸:5X7英寸8寸:6X8英寸1寸是3.75X2.5cm2寸是3.5*5.31寸2.5*3.5cm413*295×××大头照3.3*2.2390*
2602
zcsull
·
2009-06-06 08:02
职场
休闲
尺寸
PhotoShop
hdu
2602
Bone Collector
#includeusing namespace std;typedef struct node { int val; int vol;}Node;int dp[1005][1005];Node a[1005];int main(){ int text; cin>>text; while(text--) { int n,c; cin>>
Feng
·
2009-04-24 14:00
失去正常思考能力...>_<
>_<看了条新闻:8月14日上午10点,刘子歌的谷歌搜索量突然激增,她的最高搜索量居然达到了最低搜索量的
2602
倍,高搜索量持续了两个多小时。可见被这匹“纯黑马”震惊之余,国人爆发的热情。
The Sun Also Rises
·
2008-08-15 17:00
pku-
2602
什么题目我也忘记了#include const int LEN = 1000005;int aa[LEN];int bb[LEN];int cc[LEN];void add ( int *a, int *b, int *c, int len ){ int carry = 0; for ( int i=len; i>=1; i-- ) { int sum = a[i]
算法与程序--游戏与玩乐
·
2008-06-08 15:00
ACM PKU 1125 Stockbroker Grapevine 图论 Floyd算法
id=1125 Stockbroker Grapevine Time Limit:1000MS Memory Limit:10000K Total Submit:
2602
Accepted:1503
AClayton's ACM/ICPC Life 只切菜题 菜鸟乱飞
·
2007-09-14 02:00
软件开发:上半年我国软件业收入同比增23%
://www.accp-teem.com.cn/ArticleView/2007-7-30/Article_View_1219.Htm[/url] 信息产业部29日的统计显示,1至6月全国软件业收入达
2602
accp007
·
2007-07-31 14:54
职场
休闲
it培训
广州北大青鸟
上半年我国软件业收入同比增23%
上半年我国软件业收入同比增23%信息产业部29日的统计显示,1至6月全国软件业收入达
2602
亿元,同比增长23%,其中软件服务业、系统集成、IC设计保持较快发展,收入同比增速高出软件业平均水平。
accpteem
·
2007-07-30 11:30
职场
休闲
收入
软件业
增23%
关于保护模式的简单介绍(转)
[这个贴子最后由wildcatgsk在2005/10/
2602
:48pm第1次编辑]保护模式概述以下内容并不成熟,希望抛砖引玉,大家讨论一下吧:) 称其为概述是因为我希望能给出一个关于保护模式的概貌性的描述
yuantao
·
2006-02-17 11:00
游戏
工作
文档
任务
X86
如何修改网卡的MAC(物理)地址-----完全版转
如何修改网卡的MAC(物理)地址-----完全版转http://www.chinaunix.net作者:wolf
2602
发表于:2003-09-2118:56:16更改网卡MAC地址的文章我曾经见过不少
sunlen
·
2005-09-04 23:00
windows
linux
unix
网络
NetWork
通讯
上一页
4
5
6
7
8
9
10
11
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他