上一页 1 ··· 9 10 11 12 13 14 下一页
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2852 题意:三种操作: 0 插入 1 删除 2 查找比a大的第k个数。 思路:看了大神都是用树状数组写的,自己也便去学了树状数组 什么是树状数组? 树状数组(Binary Indexed Tree(BIT) 阅读全文
posted @ 2018-08-12 12:18 CheeseIce 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2002 注意,要用double 才能过,float过不了。 体积公式要加括号(优先级别)(4 * Π * r * r * r)/3 阅读全文
posted @ 2018-08-11 21:17 CheeseIce 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2845 题意:吃豆子游戏 , 当你吃了一个格子的豆子 , 该格子左右两个和上下两行就不能吃了 , 输入每个格子的豆子数 , 求你最多能吃多少颗豆子? 在最大连续数列的基础上,改变了,求最大不连续和? 我们可以 阅读全文
posted @ 2018-08-10 14:17 CheeseIce 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2007 注意审题就好,x可以>y; 阅读全文
posted @ 2018-08-10 11:20 CheeseIce 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2005 注意:闰年 查表法 阅读全文
posted @ 2018-08-10 10:52 CheeseIce 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2006 注意 sum=1,写在while 不然每次结果会累积 阅读全文
posted @ 2018-08-10 10:39 CheeseIce 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2004 中文题目,简单题。 题意:将分数转换成ABC制查表法#include int main(){ int score; char convert[] = "EE... 阅读全文
posted @ 2018-08-10 10:19 CheeseIce 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2153 中文题目,很简单,但是要注意输出格式,题目中三个字符长度 输出格式:%3d (整数)思路:将输出看作是矩阵,上三角和下三角数字,前者是从小到大,后者是从大到小,所以定义... 阅读全文
posted @ 2018-08-09 11:46 CheeseIce 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2160 中文题目,很简单,找规律就好。 自己画树状图找规律,开始想复杂了,找的规律:Fn=2*F(n-1)-(F(n-2)-F(n-4)),结果也是对的,但是弄复杂了,简单的规律: F1=1; F2=2; F 阅读全文
posted @ 2018-08-09 09:52 CheeseIce 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2154 很简单的找规律的数学题目; 思路:因为挑完N次后都要跳回A,所以相当于挑N-1次后必须留在B C区域,又由于B与C可以看作是对称的,所以每次算的时候可以假定全部先从B跳,最后结果乘以2就好。还可以用深 阅读全文
posted @ 2018-08-09 09:42 CheeseIce 阅读(153) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 下一页