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
ACBoy
HDU 1712
ACboy
needs your help
http://acm.hdu.edu.cn/showproblem.php?pid=1712 赤裸裸的分组背包 View Code #include <iostream> using namespace std ; int dp[101] ; int val[101][101] ; int main() { int n,m ;
·
2015-11-13 00:36
help
HDU 1561The more, The Better【DP】
Problem Description
ACboy
很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中
ACboy
允许攻克M个城堡并获得里面的宝物。
·
2015-11-12 19:05
more
HDOJ 1712
ACboy
needs your help(分组背包入门)
题意: 给出课程 i 所付出时间 j 所取得的收益,求最大收益。 思路: 分组背包入门:dp[i][j] = max(dp[i-1][j-k] + valk) dp[i][j] 代表前 i 种物品付出时间 j 所得到的最大收益。 #include <iostream> #include <algorithm> using namespac
·
2015-11-12 17:56
help
hdu 1712
ACboy
needs your help(分组背包)
分组背包一水~ View Code 1 /* 2 Author:Zhaofa Fang 3 Lang:C++ 4 */ 5 #include <cstdio> 6 #include <cstdlib> 7 #include <sstream> 8 #include <iostream> 9 #includ
·
2015-11-12 16:51
help
HDU 1702
ACboy
needs your help again!
题解:栈和队列的基本运用,熟练一下STL。 #include <iostream> #include <stack> #include <queue> using namespace std; int main(){ int t; scanf("%d",&t); while(t--){
·
2015-11-12 16:25
help
杭电 1712
ACboy
needs your help 解题报告
分组背包的问题,挺巧妙的。推荐看一下背包九讲的第六讲:分组的背包问题。额,我贴在下面吧,当然这是大牛写的。下面的是AC代码: #include <iostream> using namespace std; const int MAX=110; int dp[MAX]; int c[MAX][MAX]; int main() {
·
2015-11-12 15:56
help
HDUOJ---1712
ACboy
needs your help
ACboy
needs your help Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/
·
2015-11-12 12:45
help
HDU 1712
ACboy
needs your help 典型的分组背包
pid=1712
ACboy
needs your help Time Limit: 1000/1000 MS (Java/Others)  
·
2015-11-12 10:51
help
HDU 1702
ACboy
needs your help again! (栈和队列的模拟)
ACboy
needs your help again!
·
2015-11-11 18:02
help
hdu 1712
ACboy
needs your help (dp 分组背包)
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; int a[200][200]; int dp[200]; int main() { int n,m;
·
2015-11-11 16:10
help
HDU 1702
ACboy
needs your help again!(栈 队列 基础)
#include<cstdio> #include<cmath> #include<queue> #include<stack> #include<cstring> #include<iostream> #include<algorithm> using namespace std; int t,n
·
2015-11-11 16:30
help
HDU 1712
ACboy
needs your help(二维DP)
题目链接 中规中矩的二维DP,披着背包的外衣,但感觉和背包没有毛线关系吧。 状态转移 p[i][j] = max(p[i-1][j-k]+o[i][k]) k:0 to j i代表课程j代表时间. 1 #include <stdio.h> 2 #include <string.h> 3 int p[101][101],o[101][101];
·
2015-11-11 15:48
help
栈与队列的pop和push
E -
ACboy
needs your help again!
·
2015-11-11 12:16
push
【HDU1712】
ACboy
needs your help(分组背包)
将背包九讲往后看了看,学习了一下分组背包。来做几道入门题,试试手。 1 #include <iostream> 2 #include <cstring> 3 #include <cstdlib> 4 #include <cstdio> 5 #include <cmath> 6 #include &
·
2015-11-11 07:41
help
三道简单树型dp+01背包~~hdu1561,poj1947,zoj3626
hdu1561:题目给出了很多棵有根树,如果把每棵树的根节点都与0相连,则就是一棵完整的有根树了(N<=200),
ACboy
从根节点出发,他最多可以攻占m个城市,而每个城市的财富值不一定相同,问
ACboy
·
2015-11-09 12:38
poj
HDU 1981 A Special Text Editor
Problem Description After AC all the hardest problems in the world , the
ACboy
8006 now has
·
2015-11-08 16:16
editor
HDU 1712
ACboy
needs your help
该题是一道分组背包题; 题意就是
ACboy
发最多M的时间能够得到最多效益;输入有N没课程,没门课程发费j天得到的效益是map[i][j]; View Code #include<iostream
·
2015-11-08 10:08
help
简单分组背包
ACboy
needs your help(hdu1712)
题意:有n个任务,完成期限是m天,a[i][j]代表第i个任务用j天完成可以获得的利益,问在这m天里面可以获得的最大利益,每次只能做一个任务,即多个任务不能同时做; 分析;用dp[i][j]代表在做第i个任务的时候j天获得的最大利益; #include"stdio.h" #include"string.h" #include"stdlib.
·
2015-11-07 12:50
help
hdu 1702
ACboy
needs your help again!
pid=1702
ACboy
needs your help again! Description
ACboy
was kidnapped!!
·
2015-11-07 10:05
help
ACboy
needs your help again!
DescriptionACboywaskidnapped!!hemisshismotherverymuchandisveryscarenow.Youcan'timagehowdarktheroomhewasputintois,sopoor:(.AsasmartACMer,youwanttogetACboyoutofthemonster'slabyrinth.Butwhenyouarriveatth
wsnbb123456789
·
2015-11-05 09:00
分组背包题目
hdu 1712
ACboy
needs your help 分组背包入门题目 http://acm.hdu.edu.cn/showproblem.php?
·
2015-11-02 15:57
分组
1561:The more, The Better - hdu
Problem DescriptionACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中
ACboy
允许攻克M个城堡并获得里面的宝物。
·
2015-11-01 14:16
more
HDU 1702
ACboy
needs your help again!(附加优先队列)
ACboy
was kidnapped!!
·
2015-11-01 13:38
优先队列
HDU 1712
ACboy
needs your help AC男需要你的帮助 (AC代码)分组的背包问题
分组的背包问题:有N件物品和一个容量为V的背包。第i件物品的费用是c[i],价值是w[i]。这些物品被划分为若干组,每组中的物品互相冲突,最多选一件。求解将哪些物品装入背包可使这些物品的费用总和不超过背包容量,且价值总和最大。 HDU 1712:AC男有m天时间可以上课,有n种课程可以选,但是每一种课程有各种的上课时长可选(因为并不是花的时间与收获就呈线性增长的,两者之间没什么对应关系,也许花1
·
2015-11-01 10:33
help
HDU2069 Coin change HDU 1114 Piggy-Bank HDU1712
ACboy
needs your help
HDU 2069 Coin Change 换零钱, 计算有多少方案数 #include <stdio.h> #include <string.h> #include <algorithm> using namespace std; #define N 100010 int dp[N], w[5], v[5], n, m; int main() {
·
2015-10-31 19:12
change
hdu 1712
ACboy
needs your help
ACboy
needs your help Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768
·
2015-10-31 15:15
help
hdu 1702
ACboy
needs your help again!
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1702 题目大意:按照所给要求,输出相应的数。“FIFO”指代先进先出,即队列的概念,“FILO”指代先进后出,即栈的表现形式~这里定义两个函数即可,一个队列,一个栈的调用! 1 #include <iostream> 2 #include <cstdio> 3
·
2015-10-31 13:18
help
HDOJ-1702 栈和队列问题[或模拟]
ACboy
needs your help again!
·
2015-10-31 11:44
队列
HDU1702:
ACboy
needs your help again!
Problem Description
ACboy
was kidnapped!!
·
2015-10-31 10:27
help
HDU 1712
ACboy
needs your help
ACboy
needs your help Time Limit: 1000ms Memory Limit: 32768KB This problem will be judged on 
·
2015-10-28 08:10
help
HDU
ACboy
needs your help (分组背包)
ACboy
needs your help Time Limit : 1000/1000ms (Java/Other) Memory Limit : 32768/32768K (
·
2015-10-27 16:09
help
hdoj 1702
ACboy
needs your help again!
ACboy
needs your help again!
·
2015-10-21 13:32
help
hdu 1712
ACboy
needs your help
dp[i][j]代表前i个科目花费j天所能获得的最大的分。可以写出状态转移方程:dp[i][j]=max(dp[i][j],dp[i-1][j-k]+map[i][k]);这里k从0循环至j。比较简单。#include #include #include #include usingnamespacestd; intmain() { intn,m; intmap[105][105]; intdp[
qq_31457873
·
2015-10-20 21:00
dp
HDU 1712
ACboy
needs your help (分组背包)
#include #defineMAX101 intnumOfCourses,mostDays; intprofit[MAX][MAX]; intmaxProfit[MAX]; intmain(){ while(scanf("%d%d",&numOfCourses,&mostDays)!=EOF){ if(numOfCourses==0&&mostDays==0) break; intco
tiutiu2011
·
2015-10-14 23:00
动态规划
HDU
Your
needs
分组背包
1712
ACBoy
hel
HDU 1702
ACboy
needs your help again!(栈和队列)
题目地址:点击打开链接题意:简单栈和队列的模拟思路:水题AC代码:#include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; chara[10]; intmain() { intt,n,i,x,y; scanf("%d
qq_25605637
·
2015-10-02 12:00
HDU 2083 简易版之最短距离(水)
32768/32768K(Java/Others)TotalSubmission(s):13970 AcceptedSubmission(s):6201ProblemDescription寒假的时候,
ACBOY
jinjide_ajin
·
2015-09-03 21:00
HDU
HDU 1712
ACboy
needs your help(泛化物品dp)
背包九讲中的泛化物品,裸模板了。#pragmawarning(disable:4996) #include #include #include usingnamespacestd; inta[105][105]; intans[105]; intmain(){ intn,m; while(scanf("%d%d",&n,&m)){ if(n==0&&m==0)break; for(inti=1
acraz
·
2015-09-02 00:00
HDU 1702
ACboy
needs your help again!(模拟 队列 栈)
ACboyneedsyourhelpagain!TimeLimit:1000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)ProblemDescriptionACboywaskidnapped!! hemisshismotherverymuchandisveryscarenow.Youcan'timagehowdarkth
queuelovestack
·
2015-08-31 21:00
模拟
栈
队列
ACM
HDU 1702
ACboy
needs your help again!(栈+队列)
Description给出n次操作与一个容器,容器有两种,一种是FIFO(先进先出),另一种是FILO(先进后出),操作分两种,第一种是INx表示x进入这个容器,第二种是OUT表示要从容器中拿出元素u,现在对于每次OUT操作,输出拿出的元素,如果容器中没有元素可以拿则输出NoneInput第一行为用例组数T,每组用例第一行为操作数n和容器类型(FIFO/FILO),之后n行每行代表一次操作Outp
V5ZSQ
·
2015-08-30 12:00
hdu 1702
ACboy
needs your help again!
hdu1702ACboyneedsyourhelpagain!ProblemDescriptionACboywaskidnapped!!hemisshismotherverymuchandisveryscarenow.Youcan’timagehowdarktheroomhewasputintois,sopoor:(.AsasmartACMer,youwanttogetACboyoutofthem
qq_21120027
·
2015-08-13 22:00
hdu1702(
ACboy
needs your help again!) 在杭电又遇坑了
点击打开链接结题感悟:其实吧,这题并不是很难,就是一个栈和队列的公共题,也就是按指定的方式(栈或队列)存取数据,但是为什么我自己写的栈和队列就是不能再杭电ac(一直wa啊),而用java包中的栈和队列就秒过了,问题尚未找出原因,值得思考啊。不过可以趁此学学这两个类(尽量还是自己动手写的好啊)栈:java.util类StackStack类表示后进先出(LIFO)的对象堆栈。它通过五个操作对类Vect
u011479875
·
2015-08-10 00:00
队列
栈
hdu1702
HDU - 1702 -
ACboy
needs your help again!(栈&&队列)
HDU1702.ACboyneedsyourhelpagain!(栈&&队列)TimeLimit:1000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)ProblemDescriptionACboywaskidnapped!!hemisshismotherverymuchandisveryscarenow.Youca
violet_echo_0908
·
2015-08-09 14:00
栈
队列
杭电
HDU 1561 The more, The Better(树形DP)
DescriptionACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中
ACboy
允许攻克M个城堡并获得里面的宝物。
V5ZSQ
·
2015-08-06 11:00
HDOJ 1702
ACboy
needs your help again!(栈和队列)
ACboyneedsyourhelpagain!TimeLimit:1000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):4462 AcceptedSubmission(s):2281ProblemDescriptionACboywaskidnapped!!hemisshismo
jinjide_ajin
·
2015-07-31 10:00
数据结构
hdoj
hdu1712
ACboy
needs your help 分组背包模板题
//a[i][j]表示花j天做第i件事得到的收获 //m天时间得到的最大收获 #include #include #include usingnamespacestd; constintmaxn=110; intdp[maxn]; inta[maxn][maxn]; intmain() { intn,m; while(scanf("%d%d",&n,&m)&&(n+m)) { for(inti=1
cq_pf
·
2015-07-30 20:00
分组背包
分组背包 hdu1712
ACboy
needs your help
最裸的分组背包记住枚举顺序for(枚举组数){ for(从大到小枚举体积){ for(枚举这一组中的个体){ 和01背包的滚动数组代码完全一致 } }}如果不知道为什么,强烈推荐百度一下背包九讲,里面说的非常的清楚~#include #include #include #include #include #include #include #include usin
qwb492859377
·
2015-07-29 01:00
Acboy
needs your help again!
ACboyneedsyourhelpagain!TimeLimit:1000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):4439 AcceptedSubmission(s):2265ProblemDescriptionACboywaskidnapped!!hemisshismo
lin14543
·
2015-07-28 18:00
数组
C语言
栈
队列
ACboy
needs your help-分组背包模板题
ACboyneedsyourhelpTimeLimit: 1000MS MemoryLimit: 32768KB 64bitIOFormat: %I64d&%I64uSubmit StatusDescriptionACboyhasNcoursesthisterm,andheplanstospendatmostMdaysonstudy.Ofcourse,theprofithewillgainfrom
qq_18661257
·
2015-07-28 16:00
hdu1712 分组背包
ACboy
needs your help
ACboy
needs your help Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768
·
2015-07-25 17:00
help
简易版之最短距离
32768/32768K(Java/Others)TotalSubmission(s):13709 AcceptedSubmission(s):6083ProblemDescription寒假的时候,
ACBOY
l15738519366
·
2015-07-23 15: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
其他