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
hdu刷题记录
HDU
1877 又一版 A+B【进制】
又一版A+BTimeLimit:2000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):17619AcceptedSubmission(s):6915ProblemDescription输入两个不超过整型定义的非负10进制整数A和B(voidreverse(chars[],intlen){int
海岛Blog
·
2020-09-13 00:37
#
ICPC-备用二
#
ICPC-进制与分数
#
ICPC-HDU
ACM研究生复试机考
hdu
1877 又一版 A+B (栈)
BCrawlinginprocess...CrawlingfailedTimeLimit:1000MSMemoryLimit:32768KB64bitIOFormat:%I64d&%I64uSubmitStatusPractice
HDU
1877Appointdescription
甄情
·
2020-09-13 00:31
Acm竞赛
hdu1877
hdu
1877
栈
HDU
1877 又一版 A+B
又一版A+BTimeLimit:2000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):12894AcceptedSubmission(s):4901ProblemDescription输入两个不超过整型定义的非负10进制整数A和B(usingnamespacestd;inta[100];int
淡定的小鱼
·
2020-09-13 00:31
简单题
杭电
进制转换
HDU
又一版 A+B
题目:输入两个不超过整型定义的非负10进制整数A和B(#include#include//http://acm.
hdu
.edu.cn/showproblem.php?
yunshouhu
·
2020-09-13 00:21
ACM竞赛编程
HDU
2186 取整小技巧
原题链接:http://acm.
hdu
.edu.cn/showproblem.php?
Special__Yang
·
2020-09-13 00:48
HDU
160个练手CrackMe-047
A3AF214000movdwordptrds:[0x4021AF],eax;|0040105C.6A00push0x0;|/hTemplateFile=NULL0040105E.686F214000pus
hDu
eList
Mnnk
·
2020-09-13 00:17
160个练手CM
hdu
1877 又一版 A+B
#include#include#includeusingnamespacestd;intmain(){intA,B,m;chars[1005];while(cin>>m,m){cin>>A>>B;memset(s,0,sizeof(s));itoa(A+B,s,m);cout<
Flynn_curry
·
2020-09-13 00:12
hdu
HDU
4465(数学期望+大数处理)
CandyTimeLimit:2000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):507AcceptedSubmission(s):232SpecialJudgeProblemDescriptionLazyChildisalazychildwholikescandyverymuch.Desp
晓风残月xj
·
2020-09-12 23:02
数学-大数处理
hdu
5534—Partial Tree(完全背包+思维,转化的超级巧妙哇~)
PartialTreeTimeLimit:2000/1000MS(Java/Others)MemoryLimit:262144/262144K(Java/Others)TotalSubmission(s):2179AcceptedSubmission(s):1086ProblemDescriptionInmathematics,andmorespecificallyingraphtheory,at
sdau_blue
·
2020-09-12 23:20
背包
HDU
4433 locker(DP)( UVA 1631 - Locker)
题目链接:点击打开链接题意:有一个n位密码锁,每一位都是0~9,可以循环旋转,每次可以让1~3个相邻数字同时往上或者往下旋转一格。输入初始状态和终止状态,问最少需要转几次。思路:很显然是个DP题目,由于每次可以让相邻的1~3个数字同时旋转,所以状态的表示上就要考虑相邻3个位置。那么可以用d[i][a][b][c]表示当前到了第i位,第i位上当前是a,i+1位是b,i+2位是c。那么显然必须让i位上
AC_Arthur
·
2020-09-12 23:01
uva解题报告
HDOJ
动态规划
ACM竞赛
HDU
4433 locker 第37届ACM/ICPC 天津赛区现场赛C题(DP)
lockerTimeLimit:6000/3000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):248AcceptedSubmission(s):87ProblemDescriptionApasswordlockerwithNdigits,eachdigitcanberotatedto0-9circul
weixin_33693070
·
2020-09-12 23:48
带限制求最小价值的完全背包
HDU
1114
1#include2#include34usingnamespacestd;56intv[510];7intw[510];8intdp[10010];910intmain()11{12intt;13cin>>t;14while(t--)15{16inta,b;17cin>>a>>b;18intn;19cin>>n;20for(inti=0;i>v[i]>>w[i];23}24for(inti=1;
weixin_30237281
·
2020-09-12 23:56
hdu
5176 The Experience of Love(带权并查集+思维)
题意:给一棵树,求任意{两点路径上的最大边权值-最小边权值}的总和。解法:sigma(maxVal[i]−minVal[i])=sigma(maxVal)−sigma(minVal);所以我们分别求所有两点路径上的最大值的和,还有最小值的和。再相减就可以了。求最大值的和的方法用带权并查集,把边按权值从小到大排序,一条边一条边的算,当我们算第i条边的时候权值为wi,两点是ui,vi,前面加入的边权值
hadis_fukan
·
2020-09-12 23:58
图论
hdu
5175 Misaki's Kiss again (抑或运算+公式变形)
题意:找出1-n之间所有的m使得gcd(n,m)=n^m。分析:令n^m=k,可以推出n^k=m,m^k=n。则由gcd(n,m)=n^m=k可以推出gcd(n,n^k)=k且k是n的约数。故找出n的所有约数,判断是否满足gcd(n,n^k)=k即可。n^k=0要舍去,因为此时k=n,不满足gcd(n,n)=(n^n)。而且抑或运算得到的数可能变大,如1^2=3,故要判断(n^k)#include
hadis_fukan
·
2020-09-12 23:57
Math
hdu
4465 Candy (快速排列组合 )
CandyTimeLimit:2000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):2115AcceptedSubmission(s):910SpecialJudgeProblemDescriptionLazyChildisalazychildwholikescandyverymuch.Des
1A_coder
·
2020-09-12 23:19
数论
组合数学
hdu
5534 Partial Tree(完全背包)
题目链接:
hdu
5534PartialTree解题思路首先度的总和为2(n-1),并且每个节点度不为0。如果用二维dp[i][j]表示第i个节点还剩j个度的最优值,是没问题,但是复杂度为o(n3)。
JeraKrs
·
2020-09-12 23:43
动态规划-完全背包
HDU
GRADE:B
HDU
——1846 Brave Game(巴什博弈)
题目链接:#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;#definelllonglongintmain(){intt,n,m;cin>>t;while(t--){cin>>n>>m;intmod=n%(m+1);if(mod>=1)cout<<"f
ZMST
·
2020-09-12 23:21
hdu
HDU
——6015 Skip the Class
题目链接:一个sort排序但是要注意是否出现了大于等于三次所以需要map把string对应到int计次数#include#include#include#include#include#include#include#include#includeusingnamespacestd;#definelllonglongstructnode{chars[10];intval;}s[110];boolc
ZMST
·
2020-09-12 23:20
hdu
HDU
4989——Summary(set)
题目链接:#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;#definelllonglonglla[110];intmain(){intn;while(~scanf("%d",&n)){sets;s.clear();for(inti=0;i::iter
ZMST
·
2020-09-12 23:20
hdu
HDU
5534 Partial Tree 完全背包
Inmathematics,andmorespecificallyingraphtheory,atreeisanundirectedgraphinwhichanytwonodesareconnectedbyexactlyonepath.Inotherwords,anyconnectedgraphwithoutsimplecyclesisatree.Youfindapartialtreeonthew
紫芝
·
2020-09-12 23:30
动态规划
hdu
4465
CandyTimeLimit:2000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):2705AcceptedSubmission(s):1199SpecialJudgeProblemDescriptionLazyChildisalazychildwholikescandyverymuch.De
yawen_2016
·
2020-09-12 22:03
acm数论基础
acm
数论基础
hdu
快速排列组合
hdu
4433 locker(dp)
hdu
4433题目给出两个串,每次可以选择连续的1-3个数字,进行同时加1或者同时减1,问最少经过多少次操作,将一个串转变为另外一个串.思路dp[i][j][k]表示前i个已经完全匹配,而这时候,第i+
pibaixinghei
·
2020-09-12 22:17
Hdu
4433 locker【思维+Dp】
lockerTimeLimit:6000/3000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):2082AcceptedSubmission(s):949ProblemDescriptionApasswordlockerwithNdigits,eachdigitcanberotatedto0-9circ
mengxiang000000
·
2020-09-12 22:02
思维
dp
HDU
5534 - Partial Tree(完全背包)【真*好题】
PartialTreeTimeLimit:2000/1000MS(Java/Others)MemoryLimit:262144/262144K(Java/Others)TotalSubmission(s):2087AcceptedSubmission(s):1035ProblemDescriptionInmathematics,andmorespecificallyingraphtheory,at
辞树 LingTree
·
2020-09-12 22:57
背包问题
HDU
HDU
4433 locker
ProblemDescriptionApasswordlockerwithNdigits,eachdigitcanberotatedto0-9circularly.Youcanrotate1-3consecutivedigitsupordowninonestep.Forexamples:567890->567901(byrotatingthelast3digitsup)000000->000900
_Occult_
·
2020-09-12 22:20
HDU
----其他dp
Candy----
HDU
4465----数学题
题目地址:http://acm.
hdu
.edu.cn/showproblem.php?
dr5459
·
2020-09-12 22:07
数学
HDU
4465 Candy
题意:有两个箱子,里面放有相同数量的糖果,每次从第一个箱子里拿的概率是p,从第二个箱子里拿的是1-p,问拿完一个箱子,另一个箱子剩下糖果数量的期望。第一眼看到这题以为是概率DP,然后推了下发现不是,就一个很好推的公式,但是那个组合数太大,无法求出。。然后就没有然后了。。公式是C(n+i,i)*(p^(n+1)*(1-p)^i+p^i*(1-p)^(n+1))*(n-i)。。n+1次方的原因是,先取
eeeaaaaa
·
2020-09-12 22:55
数学
HDU
4465-数学期望
链接:http://acm.
hdu
.edu.cn/showproblem.php?
d12155214552
·
2020-09-12 22:37
概率期望
UVA 1631 Locker(
HDU
4433)(DP)
ApasswordlockerwithNdigits,eachdigitcanberotatedto0-9circularly.Youcanrotate1-3consecutivedigitsupordowninonestep.Forexamples:567890→567901(byrotatingthelast3digitsup)000000→000900(byrotatingthe4thdig
JOY酷酷
·
2020-09-12 22:10
动态规划
hdu
_4465_Candy
LazyChildisalazychildwholikescandyverymuch.Despitebeingveryyoung,hehastwolargecandyboxes,eachcontainsncandiesinitially.Everydayhechoosesoneboxandopenit.Hechoosesthefirstboxwithprobabilitypandthesecond
awang50683
·
2020-09-12 22:37
最小生成树Prim模板
e.g.畅通工程再续http://acm.
hdu
.edu.cn/showproblem.php?pid=1875Freckleshttp://poj.org/problem?
Rachel-Zhang
·
2020-09-12 22:54
C/C++
Data
Structure
ACM
struct
path
HDU
4465 快速全排列
#include#includeconstintmaxn=4E5+10;intn,kase;doublefun[maxn]={0},p;voidinit(){for(inti=1;i
Tczxw
·
2020-09-12 22:04
hdu
4465 Candy
CandyTimeLimit:2000/1000ms(Java/Other)MemoryLimit:32768/32768K(Java/Other)TotalSubmission(s):6AcceptedSubmission(s):5SpecialJudgeFont:TimesNewRoman|Verdana|GeorgiaFontSize:←→ProblemDescriptionLazyChil
Singular__point
·
2020-09-12 22:58
ACM竞赛题
组合数学母函数
hdu
4465
计算组合数最大的困难在于数据的溢出,对于大于150的整数n求阶乘很容易超出double类型的范围,那么当C(n,m)中的n=200时,直接用组合公式计算基本就无望了。另外一个难点就是效率。对于第一个数据溢出的问题,可以这样解决。因为组合数公式为:C(n,m)=n!/(m!(n-m)!)为了避免直接计算n的阶乘,对公式两边取对数,于是得到:ln(C(n,m))=ln(n!)-ln(m!)-ln((n
SYLG_li
·
2020-09-12 22:25
概率
HDU
- 5534 Partial Tree (完全背包,物品价值包含负数)
Inmathematics,andmorespecificallyingraphtheory,atreeisanundirectedgraphinwhichanytwonodesareconnectedbyexactlyonepath.Inotherwords,anyconnectedgraphwithoutsimplecyclesisatree.Youfindapartialtreeonthew
vocaloid01
·
2020-09-12 21:33
DP
hdu
4465 Candy(快速排列组合+概率)
CandyTimeLimit:2000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):679AcceptedSubmission(s):295SpecialJudgeProblemDescriptionLazyChildisalazychildwholikescandyverymuch.Desp
爱情魔法师
·
2020-09-12 21:29
hdu
4433 locker 密码锁(枚举)
lockerTimeLimit:6000/3000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):883AcceptedSubmission(s):374ProblemDescriptionApasswordlockerwithNdigits,eachdigitcanberotatedto0-9circu
爱情魔法师
·
2020-09-12 21:28
HDU
1219 AC Me
ACMeTimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):7582AcceptedSubmission(s):3410ProblemDescriptionIgnatiusisdoinghishomeworknow.Theteachergiveshimsomearticl
wpfengqi
·
2020-09-12 21:21
hdu
ACM
水题128题
HDU
1209 Clock
ClockTimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):2754AcceptedSubmission(s):845ProblemDescriptionThereisananalogclockwithtwohands:anhourhandandaminutehand.
wpfengqi
·
2020-09-12 21:21
HDU
1000 A + B Problem
A+BProblemTimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):240144AcceptedSubmission(s):70866ProblemDescriptionCalculateA+B.InputEachlinewillcontaintwointegersA
wpfengqi
·
2020-09-12 21:50
hdu
ACM
水题128题
output
input
each
HDU
1205 吃糖果
吃糖果TimeLimit:6000/3000MS(Java/Others)MemoryLimit:65535/32768K(Java/Others)TotalSubmission(s):12695AcceptedSubmission(s):3670ProblemDescriptionHOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果
wpfengqi
·
2020-09-12 21:50
hdu
ACM
水题128题
HDU
1202 The calculation of GPA
ThecalculationofGPATimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):12828AcceptedSubmission(s):2952ProblemDescription每学期的期末,大家都会忙于计算自己的平均成绩,这个成绩对于评奖学金是直接有关的。国外
wpfengqi
·
2020-09-12 21:50
hdu
ACM
水题128题
HDU
1012 u Calculate e
uCalculateeTimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):19373AcceptedSubmission(s):8458ProblemDescriptionAsimplemathematicalformulaforeiswherenisallowedtog
wpfengqi
·
2020-09-12 21:50
hdu
ACM
水题128题
HDU
1001 Sum Problem
SumProblemTimeLimit:1000/500MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):170123AcceptedSubmission(s):40500ProblemDescriptionHey,welcometoHDOJ(HangzhouDianziUniversityOnlineJu
wpfengqi
·
2020-09-12 21:50
hdu
ACM
水题128题
output
integer
input
each
最长公共子序列LCS,最长递增子序列LIS
详情可看
HDU
1159。我们可以根据递推的方式得到最长的长度,如果想得到子序列也只需要记忆化一下每个点是从哪个点递推得到的即可。
weixin_34327223
·
2020-09-12 20:29
HDU
4768:Flyer [ 二分的奇妙应用 好题 ]
传送门FlyerTimeLimit:2000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):1718AcceptedSubmission(s):622ProblemDescriptionThenewsemesterbegins!Differentkindsofstudentsocietiesar
weixin_33772645
·
2020-09-12 20:36
hdu
4190(二分)
题意:给你N个城市每个城市有相应的人口,有B个选票箱,要求每个城市都至少有一个选票箱,且先要使N个城市中得选票箱的票数的最大值最小化。解题思路:二分结果,求上界注意:无#include#include#include#include#defineMAXN0500010#defineMAXN15000010#definer1(x)(x)>>1intN,B;inta[MAXN0];intsolve()
JoyGatsby
·
2020-09-12 20:57
二分总结
HDU
4768 Flyer(二分)
FlyerTimeLimit:2000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):1445AcceptedSubmission(s):510ProblemDescriptionThenewsemesterbegins!Differentkindsofstudentsocietiesareal
lab104_yifan
·
2020-09-12 20:35
高效算法-二分法
HDU
4768:Flyer(二分)
ProblemDescriptionThenewsemesterbegins!Differentkindsofstudentsocietiesarealltryingtoadvertisethemselves,bygivingflyerstothestudentsforintroducingthesociety.However,duetothefundshortage,theflyersofaso
键盘上的舞者
·
2020-09-12 19:13
二分&三分
Flyer(二分
HDU
4768)
FlyerTimeLimit:2000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):2009AcceptedSubmission(s):736ProblemDescriptionThenewsemesterbegins!Differentkindsofstudentsocietiesareal
绝尘花遗落
·
2020-09-12 19:11
HDU
计算方法
上一页
70
71
72
73
74
75
76
77
下一页
按字母分类:
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
其他