上一页 1 2 3 4 5 6 ··· 20 下一页
摘要: Meanwhile, the kingdom of K is getting ready for the marriage of the King's daughter. However, in order not to lose face in front of the relatives, th 阅读全文
posted @ 2016-05-25 17:26 Randolph87 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Description A permutation of length n is an array containing each integer from 1 to n exactly once. For example, q = [4, 5, 1, 2, 3] is a permutation. 阅读全文
posted @ 2016-05-25 17:26 Randolph87 阅读(522) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2016-05-25 17:25 Randolph87 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 第一次参加这种有奖励的比赛(没错,我就是为猴子而去的一年没怎么碰代码果然手生,还是用没写多久的C++,差点全跪了T1数学奇才琪露诺:首先定义一个函数F(x),F(x)=x的各个数位上的数字和然后在区间[l,r]求F(x)k*p+q=x的所有x,按升序输出T1题解:枚举x肯定是不行的,F(x)的值只有... 阅读全文
posted @ 2015-07-26 17:49 Randolph87 阅读(565) 评论(2) 推荐(0) 编辑
摘要: 【问题描述】Lwins_7k+ (GYZ),Synophia大陆首屈一指的天才魔法师,创造了一个新魔法:雷神领域。这个魔法会首先在地面上形成正方网格魔法阵列,然后在某些位置召唤雷电轴标。注意:一个位置只能有一个雷电轴标存在。雷电轴标总出现在正方网格魔法阵列的顶点处,所以我们可以用一个有序整数对(x_... 阅读全文
posted @ 2015-07-23 00:38 Randolph87 阅读(911) 评论(0) 推荐(1) 编辑
摘要: DescriptionInputOutput输出文件包括n 行,每行一个实数,精确到小数点后3 位。第i 行的实数表 示结点i 在社交网络中的重要程度。Sample Input4 41 2 12 3 13 4 14 1 1Sample Output1.0001.0001.0001.000HINT为1... 阅读全文
posted @ 2015-07-23 00:26 Randolph87 阅读(228) 评论(0) 推荐(0) 编辑
摘要: DescriptionFJ's cows really hate getting wet so much that the mere thought of getting caught in the rain makes them shake in their hooves. They have d... 阅读全文
posted @ 2015-07-23 00:26 Randolph87 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 题目大意:ainta刷一面n*n的二维墙。墙一开始可能有一些块被刷了。他终止刷墙的前提是墙的每一行每一列都至少有一块被刷。他每一次从n*n的墙随机选择一块,如果这一块没有被刷就刷,刷了就无视,刷墙不计入时间,刷完一块之后要休息一分钟(不管无视了没有都要休息)。他想求期望终止时间是多少。(中国好队友z... 阅读全文
posted @ 2015-07-23 00:25 Randolph87 阅读(269) 评论(0) 推荐(0) 编辑
摘要: Description Input第一行包含两个整数n, m,分别表示上下两个管道中球的数目。 第二行为一个AB字符串,长度为n,表示上管道中从左到右球的类型。其中A表示浅色球,B表示深色球。 第三行为一个AB字符串,长度为m,表示下管道中的情形。Output仅包含一行,即为 Sigma(Ai^2)... 阅读全文
posted @ 2015-07-23 00:25 Randolph87 阅读(209) 评论(0) 推荐(0) 编辑
摘要: DescriptionInputOutput只有一个数字,即你所能得到的整棵树的访问代价与额外修改代价之和的最小值。Sample Input4 101 2 3 41 2 3 41 2 3 4Sample Output29HINT输入的原图是左图,它的访问代价是1×1+2×2+3×3+4×4=30。最... 阅读全文
posted @ 2015-07-23 00:25 Randolph87 阅读(153) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 20 下一页