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
Hangover
FZU 1002
HangOver
DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardlength.(We'reassumingthatthecardsmustbeperpendiculartothetable.)Withtwocardsyoucanmakethe
jtjy568805874
·
2015-08-09 15:00
FZU
fzu 1002
HangOver
#include intmain() { doublec,a; inti; while(~scanf("%lf",&c)) { if(c==0)break; a=0.0; i=1; while(a<c) { i++; a+=1.0/i; } printf("%dcard(s)\n",--i); } return0; }
xinag578
·
2015-08-08 11:00
POJ-1003
Hangover
-纸牌叠放
HangoverTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 109788 Accepted: 53577DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardleng
MIKASA3
·
2015-08-07 19:00
C++
poj
Hangover
HangoverTimeLimit:1000MS MemoryLimit:10000KTotalSubmissions:108765 Accepted:53009DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardlength.(
huayunhualuo
·
2015-06-11 10:00
[置顶] 二分法实战(一)——
HangOver
问题(POJ1003)
问题模型:问题:在一张桌子上叠放卡片,如果是一张卡片,这张卡片最多可以向桌子外伸出卡片长度的一半;如果是两张卡片,最下面的一张卡片伸出卡片长度的三分之一,上面的一张伸出卡片长度的一半,则两张卡片伸出桌子的总长度为1/2+1/3=5/6;以此内推,N张卡片向外延伸的长度为:1/2+1/3+1/4+…+1/(n+1),最上面的卡片向外延伸1/2.第二张向外延伸1/3,…最下面的一张向外延伸1/(n+1
a253664942
·
2015-05-01 16:00
数据结构
算法
二分法
poj
POJ 1003
Hangover
HangoverTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 107233 Accepted: 52297DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardleng
u013068502
·
2015-04-10 20:00
poj
POJ 1003
Hangover
(二分搜索)
#include #include #include #include usingnamespacestd; #defineeps1e-7 intBS(doublec){ intl=0,r=280,mid; doublek=0; while(lc-eps)r=mid; elsel=mid; } returnr; } intmain(){ doublec; while(~scanf("%lf",
Baoli1008
·
2015-03-25 19:00
二分
HDU 1056
HangOver
TimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):10280 AcceptedSubmission(s):4359ProblemDescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhave
lishuzhai
·
2015-03-12 21:00
OJ百练1003:
Hangover
#include usingnamespacestd; intcards(floatlenth) { intnum=1; floatcurrentLen=0.5f; while(lenth>=currentLen) { ++num; currentLen+=1.0/(num+1); } returnnum; } intmain() { floatlen; while(cin>>len&&len!=
冰封飞飞
·
2015-03-07 14:00
POJ 1003
Hangover
Hangover
题目链接:http://poj.org/problem?
piaocoder
·
2014-12-08 07:00
poj 1003
hangover
水题
这道题目是我现在遇到的最简单的一题,(忽略1000),问题没有任何难度,就是寻找恰好大于问题所需值的卡片个数,我们这里第一反应是给他建立一个表格记录对应n张卡片最大长度,然后通过二分查找,很容易得到所需卡片数目。(可能是最近在看动态规划的原因吧,有些草木皆兵了)。另外,提交后发现其他孩子的源代码,用C写的,很简洁,他们拿到这个数直接判断,和我们这个方法思路不太一样,当做一种启发吧。http://b
zhyh1435589631
·
2014-11-30 15:00
C++
poj
Hangover
1003
POJ 刷题顺序
表格属性依次为:ID,Title,Ratio,AC,Submit1000A+BProblem0.551880723389771004FinancialManagement0.41582821403011003
Hangover
0.4850457103742100
thestoryofsnow
·
2014-11-09 02:00
HDU1056
HangOver
HangOverTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):9412 AcceptedSubmission(s):3971ProblemDescriptionHowfarcanyoumakeastackofcardsoverhangatable?If
u012846486
·
2014-08-26 11:00
HDU1056
POJ 1003
Hangover
悬空
HangoverTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 101380 Accepted: 49289DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardleng
kanglecjr
·
2014-08-16 14:00
over
POJ 1003
Hangover
悬空
HangoverTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 101380 Accepted: 49289DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardleng
kanglecjr
·
2014-08-16 14:00
over
POJ 1003
Hangover
HangoverTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 101103 Accepted: 49150DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardleng
u013263923
·
2014-08-06 09:00
E -
Hangover
(1.4.1)
DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardlength.(We'reassumingthatthecardsmustbeperpendiculartothetable.)Withtwocardsyoucanmakethe
u014028231
·
2014-07-13 20:00
E -
Hangover
(1.4.1)
DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardlength.(We'reassumingthatthecardsmustbeperpendiculartothetable.)Withtwocardsyoucanmakethe
u014552726
·
2014-07-13 15:00
数据结构
C++
Hangover1.4.1
POJ-1003-
Hangover
核心思想:考虑建索引,然后查表。两种思路,可以按照card数,也可以按照length。由于数据量不大,也可以每次从新开始计算。注记:1、为什么可以这样来放置card?涉及到物理中如何求多个物体的质心问题,只要总的质心是在桌子边缘即可。当只有一个card时,质心在1/2处,因此可以这样设想,当有两个card时,上层在下层的1/2处,然后考虑整体的质心。x=1/2-x,可以得到x=1/4。依次类推,n
u013819100
·
2014-07-12 15:00
浮点数
强制类型转换
1003
比大小
POJ1003超水练手题
Hangover
链接:http://poj.org/problem?id=1003TimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 99711 Accepted: 48362DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximu
u014691362
·
2014-06-09 11:00
浙大ACM题目分类
数论: 1007 NumericalSummationofaSeries简单题,还是蛮有意思的 1045
HangOver
简单题 1049 IThinkINeedaHouseboat
日拱一卒
·
2014-05-17 23:00
ACM
浙大ACM
poj1003--
Hangover
HangoverTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 99149 Accepted: 48037DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardlengt
u013015642
·
2014-05-14 14:00
hdu 1056
HangOver
(暴力||打表二分)
小记:这题我试着打表将浮点值乘以100存入数组保存下第一次为该值时的序号,在输入一个浮点数时只要使其乘以100然后从数组里读取即可,但是WA了,后来发现应该是四舍五入的原因,个别的值会出现不对。所以我放弃了使用数组。思路:对于这样的数量级,没什么好说的,就是玩玩而已。我试了下二分,GNUC++交890MS,C++357MS。 代码:#include #include #include #inclu
ljd4305
·
2014-04-06 11:00
NYOJ 156
Hangover
Hangover
时间限制:1000 ms | 内存限制:65535 KB难度:1描述Howfarcanyoumakeastackofcardsoverhangatable?
u012349696
·
2013-12-03 14:00
c
优化
poj
POJ题目解题报告大全(Java)[1]
POJ1001Exponentiation[解题报告]JavaPOJ1002487-3279[解题报告]JavaPOJ1003
Hangover
[解题报告]JavaPOJ1004FinancialManagement
从此醉
·
2013-11-12 13:00
java
人工智能
poj 1003
Hangover
我只能说我又刷了一道水题。。。基本题目理解了,就是注意一下强制转换就可以了。题目大意:已知c=1/2+1/3+1/4+....1/(n+1).现给出一个值m,求n的值使得c刚好超过m。AC的代码:#include intmain() { doublec; inti; while(scanf("%lf",&c)) { if(c==0) return0; for(i=2;;i++) { c-=(
Scythe666
·
2013-10-12 17:00
每天一道算法_4_
Hangover
今天的题目是
Hangover
,如下: DescriptionHowfarcanyoumakeastackofcardsoverhangatable?
jason0539
·
2013-10-06 21:00
算法
ACM学习-POJ-1003-
Hangover
菜鸟学习ACM,纪录自己成长过程中的点滴。学习的路上,与君共勉。ACM学习-POJ-1003-HangoverHangoverTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 92150 Accepted: 44638DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouh
hitwhylz
·
2013-09-20 18:00
Hangover
最近在pekingacm上逛,做做acm的练习:DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardlength.(We'reassumingthatthecardsmustbeperpendiculartothetable.)W
bigtiger02
·
2013-08-19 23:00
ACM
Hangover
1003
北大ACM 1003
Hangover
HangoverTimeLimit:1000MS MemoryLimit:10000KTotalSubmissions:91219 Accepted:44197DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardlength.(W
q745401990
·
2013-08-18 10:00
C++
算法
ACM
北大
POJ之路
1000.A+BProblem#includeint main(){ inta,b; scanf("%d,%d",&a,&b); printf("%d",a+b); return0;}1003
Hangover
wusuopuBUPT
·
2013-07-15 14:00
poj
POJ 1003
Hangover
(水题) 权当复习…
题意:木板在一个箱子上,给出一个长度,问至少有多少个木板才能超过这个长度(这题不符合物理知识)分析:建立一个循环,逐渐相加1/(i+1)就行,但是要注意一点,一定要将1/(i+1)强制转换为浮点型,不然,会一直是零。贴代码:(167k,16ms) C++语言:#includeusingnamespacestd;intmain(){ inti; floatnum; floatlengths;
WWL919618308
·
2013-06-13 15:00
hdu 1056
HangOver
(打表水题)
按题意写公式就行 #include<stdio.h> int main() { int i; double n,a[350]; a[0] = 0.0; for(i=1;i<350;i++) a[i] = a[i-1]+1.0/(i+1); while(scanf(&quo
·
2013-04-06 17:00
over
Problem 1002
HangOver
/*InputTheinputconsistsofoneormoretestcases,followedbyalinecontainingthenumber0.00that signalstheendoftheinput.Eachtestcaseisasinglelinecontainingapositivefloating-pointnumberc whosevalueisatleast0.01
zheng0518
·
2013-03-23 10:00
ACM
FZU
POJ1003:
Hangover
DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardlength.(We'reassumingthatthecardsmustbeperpendiculartothetable.)Withtwocardsyoucanmakethe
libin56842
·
2013-03-10 21:00
ACM
poj
解题报告
POJ1003
Hangover
这个我使用暴力法解题importjava.util.Scanner; publicclassMain{ publicstaticvoidmain(String[]args){ Scannerscanner=newScanner(System.in); double[]dArray=createDoubleArray(); while(true){ doubled=scanner
翼若云
·
2012-11-21 17:00
over
POJ 1003
Hangover
一、题目信息HangoverTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 82492 Accepted: 39593DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacar
Sinchb
·
2012-10-22 09:00
c
table
input
each
float
output
POJ 題目分類
简单题1000A+BProblem 1001Exponentiation1003
Hangover
1004FinancialManagement1005IThinkINeedaHouseboat1005Biorhythms1007DNASorting1013CounterfeitDollar1014Dividing1032Parliament1045BodePlot1119StartUptheSta
電泡泡
·
2012-09-26 17:00
POJ 题目分类
POJ题目分类1000 A+BProblem 送分题1001 Exponentiation 高精度1003
Hangover
送分题
香草天空
·
2012-06-15 08:00
POJ1003·
Hangover
DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardlength.(We'reassumingthatthecardsmustbeperpendiculartothetable.)Withtwocardsyoucanmakethe
OldPanda
·
2012-06-01 00:00
POJ题型分析
1000 A+BProblem 送分题1001 Exponentiation 高精度1003
Hangover
送分题1004
woaixiaozhe
·
2012-05-11 11:00
数据结构
calendar
Random
sorting
Numbers
Intervals
poj 1003
Hangover
#include"iostream" usingnamespacestd; intmain() { doublelen,sum; inti; while(cin>>len&&len!=0.00) { sum=0; for(i=2;;i++) { sum+=1*1.0/i; if(sum>len) break; } cout<<i-1<<"card(s)"<<endl; } }
yzl_rex
·
2012-04-27 10:00
include
POJ 1003
Hangover
and 1004 Financial Management
POJ1003
Hangover
这道题soeasy的说~~#include usingnamespacestd; intmain(){ floatc; intn;//thenumberofthecards
xujinsmile
·
2012-04-26 23:00
float
poj_1003——
Hangover
地址:http://poj.org/problem?id=1003题意很简单,输入一个数, 算出1/2 + 1/3 + 1/4 + ... + 1/(n + 1)大于这个数时的最小n。用了一个很暴力的方法就是打表;#include usingnamespacestd; doublec[296]={0.0, 0.5,0.833333,1.08333,1.28333,1.45,1.59286,1.71
sjl_leaf
·
2012-03-31 19:00
HDU 1056 (
HangOver
)
Problem:1056(
HangOver
)JudgeStatus:Accepted RunId:5571034Language:C++Author:ssun CodeRenderStatus:RenderedByHDOJC
ssun125
·
2012-03-17 19:00
c
1003
Hangover
这个题目本身没什么好说的,很简单,只是要注意的是浮点数在机器中的表示是不精确的。那么下面就是AC的代码:importjava.util.*; publicclassMain{ publicstaticvoidmain(String[]args){ Scannerin=newScanner(System.in); floatsum,num; while((num=in.nextFloat(
s1099
·
2012-03-13 12:00
java
poj
1003
[HDOJ 1056]
HangOver
(基础题)
54678182012-03-0419:25:03Accepted1056265MS284K280BC++ajioy#include//效率比较低呀,哎 usingnamespacestd; intmain() { intcards,i; doublelength,sum;//float可在poj上通过,但是hdoj上不行 while(cin>>length&&length!=0.0
ajioy
·
2012-03-04 19:00
iostream
Hangover
这题很简单,当练练手了。
Hangover
Description How far can you make a stack of cards overhang a table?
lethorld
·
2012-01-29 10:00
over
POJ-1003:
Hangover
1003:
Hangover
时间限制: 1000ms 内存限制: 65536kB描述Howfarcanyoumakeastackofcardsoverhangatable?
theprinceofelf
·
2012-01-17 22:00
c
table
input
each
float
output
POJ
Hangover
DescriptionHowfarcanyoumakeastackofcardsoverhangatable?Ifyouhaveonecard,youcancreateamaximumoverhangofhalfacardlength.(We'reassumingthatthecardsmustbeperpendiculartothetable.)Withtwocardsyoucanmakethe
Tdreamge
·
2012-01-14 10: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
其他