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
bracelet
you fail to tiffany and co
bracelet
reply immediat
Theseevileyebraceletsaresupposedtoprotectyouduringthetimeofneed.OurreplciaLouisVuittonMonogramCanvasseriesarethebestofthereplicahandbagmarket.Thisringisavailablefor$3250.TheitemswouldbeOrcCampaign-med
youloveid0
·
2014-04-23 16:00
poj 3624 Charm
Bracelet
标准的01背包#include #include usingnamespacestd; #defineMAX_N3405 intw[MAX_N],d[MAX_N]; intdp[12881]; intmain() { intn,m; cin>>n>>m; memset(dp,0,sizeof(dp)); for(inti=0;i>w[i]>>d[i]; for(inti=0;i=w[i];j--)
Qxietingwen
·
2014-04-17 16:00
bvlgari
bracelet
you're not able to speak for you
IdealBirthstoneJewelryGifts-Thisallowsyoutoeasilycustomizeyourtrollbeadbraceletwheneveryouwant.Customerscanbrowsethroughtheelitedesignswhicharelistedatvaryingpricerangesatgajgallery.Thistypeofbusiness
wsignginlds
·
2014-04-12 10:00
tiffany and co
bracelet
worn off, you could easily
SometimestheycanbecalledEmergencyIDs,ICEID,AlertJewelry,andMedIDsMagneticEnergy?Shallbealovedandalovingwife.NAsilverpreciousmetalnecklaceshasgenerallybeenpurchasedatNativeAmericanjewelleryretailstores
wsignginlds
·
2014-04-12 10:00
POJ 3624 Charm
Bracelet
(01背包)
POJ3624CharmBracelet(01背包)http://poj.org/problem?id=3624题意:给你N个物品,每个具有Wi重量和Di价值,问你在不超过M的总重量前提下,能获得的最大价值是多少?分析:明显的01背包问题。令d[i][j]=x表选择完前i个物品后,总重量不超过j的前提下能获得的最大价值为x。则d[i][j]=max(d[i-1][j],d[i-1][j-wi]+D
u013480600
·
2014-04-01 23:00
ACM
poj 3624 Charm
Bracelet
DP 0/1 背包问题
CharmBraceletTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 19193 Accepted: 8739DescriptionBessiehasgonetothemall'sjewelrystoreandspiesacharmbracelet.Ofcourse,she'dliketofillitwiththebestcharm
q745401990
·
2014-03-02 23:00
C++
算法
poj
POJ 3624 Charm
Bracelet
0-1背包
传送门:http://poj.org/problem?id=3624题目大意:XXX去珠宝店,她需要N件首饰,能带的首饰总重量不超过M,要求不超过M的情况下,使首饰的魔力值(D)最大。0-1背包入门题。可构建状态转移方程:dp[i][v]=max(dp[i-1][v],dp[i-1][v-W[i]]+d[i]])但是这样空间太大,可以用滚动数组解决。for(inti=1;i=w[i];j--) {
murmured
·
2013-10-30 17:00
Charm
Bracelet
(01背包)
Charm
Bracelet
Time Limit: 1000MS Memory Limit: 65536K Total Submissions
Simone_chou
·
2013-10-08 18:00
char
poj 3624 Charm
Bracelet
01背包问题
题目链接:poj3624 这是最基础的背包问题,特点是:每种物品仅有一件,可以选择放或不放。 用子问题定义状态:即F[i,v]表示前i件物品恰放入一个容量为v的背包可以 获得的最大价值。则其状态转移方程便是: F[i,v]=max{F[i−1,v],F[i−1,v−Ci]+Wi} 这个方程非常重要,基
Qxietingwen
·
2013-09-15 19:00
poj 2888 Magic
Bracelet
置换(Burnside引理)+矩阵
#include #include #include #include #include #include usingnamespacestd; #defineLLlonglong intm,n; constintmod=9973; structmatrix{ intf[11][11]; }; inteuler_phi(intx) { intp=(int)sqrt(x+0.5); intans=x
a601025382s
·
2013-08-23 19:00
欧拉函数
矩阵
Burnside
poj3624 Charm
Bracelet
CharmBracelet简单的01背包。数据也只有一组。但是呢,要注意个MLE的问题。数组要开大,至少13000吧。但是绝不能开成二维数组。这样肯定会MLE了。。确实二维的01背包代码,理解起来较为直观。但是对内存的消耗也着实不可小觑。。一下是一维数组的AC代码:#include usingnamespacestd; #defineMAXC3500 #defineMAXR13000 intcos
guodongxiaren
·
2013-08-15 20:00
01背包
动归
Charm
Bracelet
poj 01 背包
CharmBraceletTimeLimit:1000MS MemoryLimit:65536KTotalSubmissions:17400 Accepted:7901DescriptionBessiehasgonetothemall'sjewelrystoreandspiesachar
xiaoleiacm
·
2013-08-12 18:00
POJ3624 Charm
Bracelet
http://poj.org/problem?id=3624 裸01背包 code:#include #defineM13000 #defineN4000 intn,t; intf[M]; intw[N],v[N]; intmain(){ inti,j,max; scanf("%d%d",&n,&t); for(i=0;i=w[i];j--) if(f[j]0;i--)if(m
yew1eb
·
2013-07-28 20:00
poj 3624 Charm
Bracelet
01背包
#include #include intf[13000]; intc[3500],w[3500]; intmax(inta,intb) { returna>b?a:b; } intmain() { intn,m; while(scanf("%d%d",&n,&m)!=EOF) { inti,j,k; for(i=0;i=c[i];j--) f[j]=max(f[j],f[j-c[i]]+w[i]
a601025382s
·
2013-07-18 16:00
01背包
poj3624 Charm
Bracelet
DescriptionBessiehasgonetothemall'sjewelrystoreandspiesacharmbracelet.Ofcourse,she'dliketofillitwiththebestcharmspossiblefromthe N (1≤ N ≤3,402)availablecharms.Eachcharm i inthesuppliedlisthasaweight
u010422038
·
2013-07-05 01:00
charm
poj3624
Bracel
POJ 3624 Charm
Bracelet
(01背包问题)
CharmBraceletTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 16295 Accepted: 7403DescriptionBessiehasgonetothemall'sjewelrystoreandspiesacharmbracelet.Ofcourse,she'dliketofillitwiththebestcharm
fjy4328286
·
2013-06-02 18:00
dp
poj 3624 Charm
Bracelet
(0/1背包)
点击打开链接 裸0/1背包 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int MAXN = 15000; int n , m; int w[MAXN] , v[MAXN] , d
从此醉
·
2013-05-21 23:00
char
poj3624-Charm
Bracelet
CharmBracelet爆BT的水题,并不是说这个题目简单中了里面有什么恶心的地方,而是今天用VC敲代码,结果发现库函数max居然说没有定义,但是我直接交上去就过了 #include #include #include #include #include usingnamespacestd; constintmaxn=34020; intdp[maxn]; intmain()
liujie619406439
·
2013-04-29 17:00
poj
01背包
POJ3624 Charm
Bracelet
CharmBraceletTimeLimit:1000MS MemoryLimit:65536KTotalSubmissions:15656 Accepted:7120DescriptionBessiehasgonetothemall'sjewelrystoreandspiesacharmbracelet.Ofcourse,she'dliketofillitwiththebestcharmspos
wyrhero
·
2013-04-22 18:00
C++
ACM
poj
poj 3624 Charm
Bracelet
(简单01背包)
题目链接DescriptionBessiehasgonetothemall'sjewelrystoreandspiesacharmbracelet.Ofcourse,she'dliketofillitwiththebestcharmspossiblefromthe N (1≤ N ≤3,402)availablecharms.Eachcharm i inthesuppliedlisthasawei
xindoo
·
2013-04-12 16:00
dp
01背包
POJ_3624Charm
Bracelet
(01背包)
CharmBraceletTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 15410 Accepted: 7028DescriptionBessiehasgonetothemall'sjewelrystoreandspiesacharmbracelet.Ofcourse,she'dliketofillitwiththebestcharm
lgh1992314
·
2013-04-11 16:00
poj-3624-Charm
Bracelet
0-1背包
DescriptionBessiehasgonetothemall'sjewelrystoreandspiesacharmbracelet.Ofcourse,she'dliketofillitwiththebestcharmspossiblefromthe N (1≤ N ≤3,402)availablecharms.Eachcharm i inthesuppliedlisthasaweight
yujuan_Mao
·
2013-04-09 23:00
POJ3624Charm
Bracelet
(01背包)
CharmBraceletTimeLimit:1000MS MemoryLimit:65536KTotalSubmissions:15375 Accepted:7013DescriptionBessiehasgonetothemall'sjewelrystoreandspiesacharmbracelet.Ofcourse,she'dliketofillitwiththebestcharmspos
wangwenhao00
·
2013-04-09 20:00
POJ 3624 Charm
Bracelet
动态规划(01背包问题)
CharmBraceletTimeLimit:1000MS MemoryLimit:65536KTotalSubmissions:15203
linygood
·
2013-04-01 09:00
POJ 3624 Charm
Bracelet
同上题……#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #inc
speedcell4
·
2013-03-19 12:00
POJ 3624 Charm
Bracelet
【裸01背包和关于贪心解 01 背包问题的思考】
原题链接:http://poj.org/problem?id=3624我的链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=20437#problem/A欢迎来水CharmBraceletTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 14963 Accepted: 684
Cfreezhan
·
2013-03-13 22:00
POJ 2888 Magic
Bracelet
题意:用m种不同颜色的珠子连成一条长为n的项链,其中,有k对珠子不能相邻,问总共有多少种(mod9973)n #include #include #include usingnamespacestd; typedeflonglongLL; constintmr=100000; constLLmod=9973; boolnotp[mr]; intpr[mr],fac[102],num[102]; i
tmeteorj
·
2013-03-09 18:00
Poj 3624 Charm
Bracelet
CharmBraceletTimeLimit:1000MS MemoryLimit:65536KTotalSubmissions:14114 Accepted:6457DescriptionBessiehasgonetothemall'sjewelrystoreandspiesacharmbracelet.Ofcourse,she'dliketofillitwiththebestcharmspos
Magic____
·
2012-10-07 22:00
POJ 3624 Charm
Bracelet
CharmBraceletTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 14051 Accepted: 6423DescriptionBessiehasgonetothemall'sjewelrystoreandspiesacharmbracelet.Ofcourse,she'dliketofillitwiththebestcharm
qinmusiyan
·
2012-09-27 19:00
poj 2888 Magic
Bracelet
poj2888MagicBracelet分享个好题,用到矩阵乘法,快速幂,欧拉函数,逆元,polay……题解:http://www.migantech.com/blog/codes/2012/08/14/poj-2888-magic-
bracelet
struggle_mind
·
2012-09-02 20:00
POJ 2888 Magic
Bracelet
(经典Polya+矩阵)
转载请注明出处,谢谢 http://blog.csdn.net/ACM_cxlove?viewmode=contents by---cxlove题目:同样是S个物品的环,C种颜色,旋转视为相同。但是有一些颜色限制,规定某种颜色不能相邻。http://poj.org/problem?id=2888难点在于颜色的限制。巧妙的运用矩阵,a->b->c->a,表示一个长度为3的一种方案,
ACM_cxlove
·
2012-08-14 14:00
c
Matrix
POJ 3624 Charm
Bracelet
DescriptionBessiehasgonetothemall'sjewelrystoreandspiesacharmbracelet.Ofcourse,she'dliketofillitwiththebestcharmspossiblefromthe N (1≤ N ≤3,402)availablecharms.Eachcharm i inthesuppliedlisthasaweight
ultimater
·
2012-08-05 23:00
list
Integer
input
each
output
POJ 3624 Charm
Bracelet
(0-1背包)
题目链接:(—_—)zZ题目大意:有n个手镯,每个手镯有一定的重量和让Bessie高兴的程度,现在Bessie最多带重量不超过m的手镯,求该怎样选取手镯使Bessie最高兴.思路:简单的0-1背包问题code:#include #include #definemax(a,b)a>b?a:b intw[3600],d[3600],dp[16000]; intmain() { inti=0,j=0,n
ulquiorra0cifer
·
2012-07-31 20:00
360
POJ 3624 Charm
Bracelet
(01背包)
http://poj.org/problem?id=3624题意:求可能的最大值。思路:典型的01背包。#include #include intf[22222]; intmain() { intm,n,w[4444],v[4444]; while(scanf("%d%d",&n,&m)==2) { inti,j; for(i=1;i=w[i];j--) if(f[j]
sdc1992
·
2012-07-25 17:00
Poj 3624 Charm
Bracelet
(DP_背包)
题目链接:http://poj.org/problem?id=3624题目大意:给定n个物品,每个物品有重量和价值,问在重量和不超过m的时候能组成的最大价值是多少?解题思路:这不是赤裸裸的01背包问题吗?虽然数据看起来很大,但都是纸老虎,其实数据很水的。状态转移方程:dp[j]=max(dp[j],dp[j-cost[i]]+val[i])。复杂度O(V*N)测试数据:46142631227代码:
woshi250hua
·
2012-05-31 09:00
测试
pku3624Charm
Bracelet
pku3624CharmBracelet赤裸裸的0-1背包,很水。听说省赛要出DP题,我们队三个人都不擅长DP,于是乎我开始从背包问题入手学习动态规划。看了几天的背包,头都大了,还是不理解,今天终于A掉了一道水题,值得纪念一下。关于背包这里就不多说了,感兴趣的童鞋可以参考《背包问题九讲》。#include#include#include#define LEN 14000int N, M;int W
HooLee
·
2012-05-08 09:00
D - Magic
Bracelet
解题报告(来自网络)
D- MagicBraceletTimeLimit:2000MS MemoryLimit:131072KB 64bitIOFormat:%I64d&%I64uSubmit Status Practice POJ2888DescriptionGinny’sbirthdayiscomingsoon.HarryPotterispreparingabirthdaypresentforhis
CSUST_ACM
·
2012-04-17 19:00
poj 3264 Charm
Bracelet
(螺背包)
相当裸,练练手了,还有不到一个月了阿.看DD牛的背包九讲,,,,中.http://poj.org/problem?id=3624dp[v]表示容量为V的背包可以装的最大价值.#include #include #include usingnamespacestd; #defineMAXI4005 #defineMAXV24888 intdp[MAXV]; intmain() { intN,M;
cqlf__
·
2012-03-20 21:00
POJ 2888 Magic
Bracelet
有限制的polya
题意:给定n(n #include #include #include #include usingnamespacestd; constintMAXN=1000000; constintmodulo=9973; inta[MAXN],p[MAXN],pn; classCMatrix { public: intdata[11][11],n; CMatrix(int,int); CMatrixo
Tsaid
·
2012-03-19 22:00
poj 2888 Magic
Bracelet
有限制条件的(有限制条件的polay问题)
poj2888MagicBracelet有限制条件的(有限制条件的polay问题)我学习组合数学,几乎全部是自学,很多的东西都不知道怎么搞,资料也很难找到合适的,我想这就是弱校的难处,但是我还是会继续努力下去的,其实,我现在觉得笨小孩的博客挺好的,博客地址如下:http://hi.baidu.com/%B1%BF%D0%A1%BA%A2_shw/blog/category/%D1%A7%CF%B
wukonwukon
·
2012-01-25 10:00
poj 3624 Charm
Bracelet
(01背包入门题)
CharmBraceletTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 10399 Accepted: 4667DescriptionBessiehasgonetothemall'sjewelrystoreandspiesacharmbracelet.Ofcourse,she'dliketofillitwiththebestcharm
fp_hzq
·
2011-09-29 10:00
list
Integer
input
each
IM
output
POJ 2624 Charm
Bracelet
DP(背包问题)
题意:Bessie去珠宝点里买镯子,现在有n只镯子,每只有有一个权重w,一个吸引力d。Bessie最多能拥有的权重为weight。求Bessie所能买得镯子的总吸引力的最大值。#include #include usingnamespacestd; intdp[12881],w[3403],v[3403]; intmain() { intnumber,weight,i,j,temp; cin>
Tsaid
·
2011-09-10 00:00
POJ 3624 Charm
Bracelet
【DP】【01背包】
//9210453ylwh3624Accepted216K235MSC397B2011-08-2214:05:30 #include #defineN3403 #defineM12881 inta[M]; intmax(intx,inty) { returnx>y?x:y; } intmain() { intn,m,i,j,w,d; while(scanf("%d%d",&n,&m)!=EOF)
WGH_yesterday
·
2011-08-22 14:00
poj 3624Charm
Bracelet
(简单01背包)
这是一道水的不能再水的题了,不过,不用空间优化的话,会超内存的……CharmBraceletTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 10038 Accepted: 4511DescriptionBessiehasgonetothemall'sjewelrystoreandspiesacharmbracelet.Of
tanhaiyuan
·
2011-08-20 11:00
poj3624 Charm
Bracelet
Description Bessie has gone to the mall's jewelry store and spies a charm
bracelet
.
格桑花
·
2011-06-19 23:00
F#
J#
poj 3624 Charm
Bracelet
/*解题报告:0-1背包的祼体,适合初学者练习下面的代码用了滚动数组,即用一维数组实现的*/#include#includeusingnamespacestd;intmain(){intn,m;intw,d;inti,j;intf[12880];while(cin>>n>>m){memset(f,0,sizeof(f));for(i=1;i>w>>d;for(j=m;j>=0;--j){if(j>
Unimen
·
2011-06-18 17:00
POJ-3624-Charm
Bracelet
-简单0/1背包、动态规划、DP
简单的0/1背包问题,用动态规划即可简单求解。以下一段话摘自Slyar.==========================================================Slyar:标准的01背包,动态转移方程如下。其中dp[i,j]表示的是前i个物品装入容量为j的背包里所能产生的最大价值,w[i]是第i个物品的重量,d[i]是第i个物品的价值。如果某物品超过背包容量,则该物品一
lihao21
·
2011-03-06 19:00
优化
pku 2888 Magic
Bracelet
http://poj.org/problem?id=2888题意:HarryPotter要用m种颜色的珠子做一个长度为n的手镯,手镯首尾相接。其中某些颜色的珠子不兼容,不能放在一起。求HarryPotter能够早多少种不同的手镯(每种颜色的珠子都有无限多颗,旋转之后能够吻合的算同一种)。解法:polya计数,sum=sigma(Euler(n/i)*Gettr(i))/n {i|n} 主
A code a day, keeps the girls away!
·
2011-02-27 18:00
poj 3624 Charm
Bracelet
01背包
#include#include#include#includeusingnamespacestd;constintINF=12881;structnode{intw;intd;}data[3402];intf[12881];intmain(){//freopen("1.txt","r",stdin);intn,m;while(cin>>n>>m){intsum=0;for(inti=0;i>da
alfredtofu
·
2011-02-19 13:00
struct
include
pku 2624 Charm
Bracelet
(01背包)
pku2624CharmBracelet(01背包)很标准的01背包问题for(i=1;i=weight;j--) f[j]=max(f[j],f[j-cost[i]]+w[i])#include using namespace std;int w[3500], d[3500];int f[13000];int N,M;inline int max(int a, int b){ r
小阮的菜田
·
2010-12-07 16:00
上一页
1
2
3
4
下一页
按字母分类:
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
其他