分类: HDU

7 篇文章

[单调队列]hdu-6319-Ascending Rating
http://acm.hdu.edu.cn/showproblem.php?pid=6319 其实题意不是很难。。。但是就是很懒。。。英文: Before the start of contest, there are n ICPC contestants waiting in a long queue. They are labeled by 1…
[水题]hdu-6554-Tetris
http://acm.hdu.edu.cn/showproblem.php?pid=6554 好简单的题昨天为什么不去写。。。 解题思路:n*m 只能用凸去填充如果必须填满 那只能是4n*4n啊。。。所以 很简单了 #include<algorithm> #include<iostream> #include<vector> #i…
[模拟]hdu-6551-Clock
http://acm.hdu.edu.cn/showproblem.php?pid=6551 这个题卡了大概有两个小时 我很不要脸的想把原因归结为昨天是训练的第一天没有状态 很撒比 真的很蠢。。。解题思路:这个题不用注意12小时之后的时间啊 因为是个钟表 我们把时间统一格式化为12小时制就可以了啊 然后不断更新最小时间 最大时间 同时如果需要复现的…
thumbnail
[数学]hdu-6550-Circle
http://acm.hdu.edu.cn/showproblem.php?pid=6550 这是一道好简单的数学题。。。要求保留6位小数。。。我pi写了8位精度还是炸了。。。我也不知道为啥。。。因为这了Wa了3发。。。 正多边形面积公式 n*r^2*sin(2pi/n) r是半径这个题要求加一个点 根据三角形面积公式 要加在终点 而正好与一个内部…
[思维]hdu-6545-Gcd
http://acm.hdu.edu.cn/showproblem.php?pid=6545 解题思路:这个题一开始卡了好一会。。。将1-n这n个数分成两组 每组之和的最大公约数求这个最大的最大公约数sum1/max+sum2/max=sum/max这样想 我们并不需要求出sum1 sum2具体的值 我们只需要求sum是多少 max是sum最大的质…
[博弈]HDU-1525
http://acm.hdu.edu.cn/showproblem.php?pid=1525 ↑ 题目链接 题目大意: 两个玩家,斯坦和奥利,从两个自然数开始。斯坦,第一个玩家,从两个数中较大的数减去两个数中较小的数的任何正倍数,前提是得到的数必须是非负的。然后第二个玩家奥利,对得到的两个数字做同样的处理,然后是斯坦,交替进行,直到一个玩家能够从较…
[LCA]HDU-2586
Problem Description There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far is it if I want to go…