08 2015 档案

摘要:样例:输入:123 16 39 28 49 69 98 96 55 84 43 51 3121000 10002000 10004000 20006000 10008000 30008000 80007000 80005000 40004000 50003000 40003000 50001000 ... 阅读全文
posted @ 2015-08-13 01:08 一样菜 阅读(484) 评论(0) 推荐(0) 编辑
摘要:分析:因为数字之间只有加减变换,所以-k和k是一样的,都可以当成整数来考虑,只要找到最小的n满足sum=n*(n+1)/2>=k;且sum和k同奇同偶即可,做法是用二分查找,然后在就近查找因为1,2,3,4,5,6……的sum变化是奇奇偶偶奇奇偶偶奇奇偶偶……程序: 1 import java.ma... 阅读全文
posted @ 2015-08-12 17:56 一样菜 阅读(231) 评论(0) 推荐(0) 编辑
摘要:题目链接:UVa 10023 1 import java.math.BigInteger; 2 import java.util.Scanner; 3 public class Main { 4 public static void sqrt(BigInteger bi){ 5 ... 阅读全文
posted @ 2015-08-12 11:58 一样菜 阅读(391) 评论(0) 推荐(0) 编辑
摘要:题目链接:UVa 10007题意:统计n个节点的二叉树的个数1个节点形成的二叉树的形状个数为:12个节点形成的二叉树的形状个数为:23个节点形成的二叉树的形状个数为:54个节点形成的二叉树的形状个数为:145个节点形成的二叉树的形状个数为:42把n个节点对号入座有n!种情况所以有n个节点的形成的二叉... 阅读全文
posted @ 2015-08-09 17:17 一样菜 阅读(409) 评论(0) 推荐(0) 编辑
摘要:Knights of the Round TableTime Limit:7000MSMemory Limit:65536KTotal Submissions:10804Accepted:3553DescriptionBeing a knight is a very attractive caree... 阅读全文
posted @ 2015-08-08 20:13 一样菜 阅读(273) 评论(0) 推荐(0) 编辑
摘要:数长方形Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 152Accepted Submission(s): 87Problem Descripti... 阅读全文
posted @ 2015-08-07 21:27 一样菜 阅读(461) 评论(0) 推荐(0) 编辑
摘要:序列变换Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 820Accepted Submission(s): 336Problem Descript... 阅读全文
posted @ 2015-08-07 13:36 一样菜 阅读(296) 评论(0) 推荐(0) 编辑
摘要:(HDU1025)Constructing Roads In JGShining's KingdomTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): ... 阅读全文
posted @ 2015-08-07 13:31 一样菜 阅读(232) 评论(0) 推荐(0) 编辑
摘要:KPITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 901Accepted Submission(s): 398Problem Descripti... 阅读全文
posted @ 2015-08-05 20:13 一样菜 阅读(514) 评论(0) 推荐(0) 编辑
摘要:序列变换Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 774Accepted Submission(s): 359Problem Descript... 阅读全文
posted @ 2015-08-05 15:03 一样菜 阅读(659) 评论(0) 推荐(0) 编辑
摘要:找连续数Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1033Accepted Submission(s): 371Problem Descrip... 阅读全文
posted @ 2015-08-05 14:27 一样菜 阅读(410) 评论(0) 推荐(0) 编辑