摘要: There are b blocks of digits. Each one consisting of the same n digits, which are given to you in the input. Wet Shark must choose exactly one digit f 阅读全文
posted @ 2017-03-22 20:05 Heilce 阅读(953) 评论(0) 推荐(0) 编辑
摘要: Vasya and Petya wrote down all integers from 1 to n to play the "powers" game (n can be quite large; however, Vasya and Petya are not confused by this 阅读全文
posted @ 2017-03-19 20:39 Heilce 阅读(369) 评论(0) 推荐(0) 编辑
摘要: As you probably know, Anton goes to school. One of the school subjects that Anton studies is Bracketology. On the Bracketology lessons students usuall 阅读全文
posted @ 2017-03-19 16:33 Heilce 阅读(623) 评论(0) 推荐(0) 编辑
摘要: 威佐夫博弈: 这个博弈主要的结论就是用到了黄金分割。 有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。最后把石子全部取完者为胜者。现在给出初始的两堆石子的数目,如果轮到你先取, 阅读全文
posted @ 2017-03-16 16:29 Heilce 阅读(183) 评论(0) 推荐(0) 编辑
摘要: In a far away galaxy there is war again. The treacherous Republic made k precision strikes of power ai on the Empire possessions. To cope with the rep 阅读全文
posted @ 2017-03-15 20:21 Heilce 阅读(398) 评论(0) 推荐(0) 编辑
摘要: Bike is interested in permutations. A permutation of length n is an integer sequence such that each integer from 0 to (n - 1) appears exactly once in 阅读全文
posted @ 2017-03-15 14:29 Heilce 阅读(297) 评论(0) 推荐(0) 编辑
摘要: Problem Description The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the 阅读全文
posted @ 2017-03-14 11:48 Heilce 阅读(550) 评论(0) 推荐(0) 编辑
摘要: Police headquarter is monitoring signal on different frequency levels. They have got two suspiciously encoded strings s1 and s2 from two different fre 阅读全文
posted @ 2017-03-13 19:52 Heilce 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 质数筛法: 肯定有一个质因数是小于根号n的。这个东西是很明显的。 启发式分解: review :欧几里得算法的证明 a=bmodc ==> a-k*c=b; 扩展欧几里得求得解为 |s|+|t|最小的解 分数工厂: 有 n 个正整数 a1, a2, · · · , an 和 m 个正整数 b1, b 阅读全文
posted @ 2017-03-12 22:03 Heilce 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Imagine A is a NxM matrix with two basic properties 1) Each element in the matrix is distinct and lies in the range of 1<=A[i][j]<=(N*M) 2) For any tw 阅读全文
posted @ 2017-03-12 11:03 Heilce 阅读(178) 评论(0) 推荐(0) 编辑