上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 28 下一页
摘要: Problem E. Easy ProblemsetInput file: easy.in Output file: easy.outPerhaps one of the hardest problems of any ACM ICPC contest is to create a problemset 阅读全文
posted @ 2016-08-01 20:05 Ritchie丶 阅读(479) 评论(0) 推荐(0) 编辑
摘要: Problem G. Generators Input file: generators.in Output file: generators.outLittle Roman is studying linear congruential generators — one of the oldest a 阅读全文
posted @ 2016-08-01 19:58 Ritchie丶 阅读(497) 评论(0) 推荐(0) 编辑
摘要: Read Phone Number Time Limit:1000MS Memory Limit:64000KB 64bit IO Format:%lld & %llu Submit Status Practice ACdream 1188 Read Phone Number Submit Stat 阅读全文
posted @ 2016-07-27 17:36 Ritchie丶 阅读(296) 评论(0) 推荐(0) 编辑
摘要: Sudoku Checker Time Limit:1000MS Memory Limit:64000KB 64bit IO Format:%lld & %llu Submit Status Practice ACdream 1195 Sudoku Checker Submit Status Pra 阅读全文
posted @ 2016-07-27 17:32 Ritchie丶 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题意:有n只青蛙,m个石头(围成圆圈)。第i只青蛙每次只能条ai个石头,问最后所有青蛙跳过的石头的下标总和是多少? 题解:暴力肯定会超时,首先分解出m的因子,自己本身不用分,因为石头编号是0到m-1,第i只青蛙只能走到gcd(ai, m)的位置,我们就可以把m的因子提取出来,然后对青蛙能走 阅读全文
posted @ 2016-07-26 19:41 Ritchie丶 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 题目:传送门 题意:一个国际象棋棋盘,有四种棋子,从(n,m)走到(1,1),走到(1,1)的人赢,先手赢输出B,后手赢输出G,平局输出D。 题解:先把从(n,m)走到(1,1)看做是从(1,1)走到(n,m)。 四种棋子的规则如下: 1、王(King):横、竖、斜都可以走,每次限走一格 2、车(R 阅读全文
posted @ 2016-07-26 18:53 Ritchie丶 阅读(771) 评论(5) 推荐(0) 编辑
摘要: 所以我们得到了函数Rotate 阅读全文
posted @ 2016-07-12 20:09 Ritchie丶 阅读(622) 评论(0) 推荐(0) 编辑
摘要: atan函数:传送门。 atan2函数:传送门。 atan 和 atan2 都是求反正切函数,如:有两个点 point(x1,y1), 和 point(x2,y2); 那么这两个点形成的斜率的角度计算方法分别是: float angle = atan( (y2-y1)/(x2-x1) ); 或 fl 阅读全文
posted @ 2016-07-12 18:26 Ritchie丶 阅读(836) 评论(0) 推荐(0) 编辑
摘要: 题目:传送门。 题意:t组数据,每组给定n,m,k。有n个格子,m种颜色,要求把每个格子涂上颜色且正好适用k种颜色且相邻的格子颜色不同,求一共有多少种方案,结果对1e9+7取余。 题解: 首先可以将m 与后面的讨论分离。从m 种颜色中取出k 种颜色涂色,取色部分有C(m, k) 种情况; 然后通过尝 阅读全文
posted @ 2016-07-08 21:14 Ritchie丶 阅读(796) 评论(0) 推荐(0) 编辑
摘要: 欧拉定理 阅读全文
posted @ 2016-07-07 15:59 Ritchie丶 阅读(122) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 28 下一页