数学相关
CXY_Likescoding
不失情怀,不忘初心!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces 230B
T-primestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe know that prime numbers are positive integers that have exactly two d...原创 2016-10-05 22:16:07 · 547 阅读 · 0 评论 -
Codeforces Round #506 (Div. 3) D(数论 + 哈希)
Concatenated Multiplestime limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputYou are given an array a, consisting of n positive integers....原创 2018-12-24 22:30:08 · 268 阅读 · 0 评论 -
HDU 3625 Examining the Rooms(第一类stirling数)
Problem DescriptionA murder happened in the hotel. As the best detective in the town, you should examine all the N rooms of the hotel immediately. However, all the doors of the rooms are locked, and原创 2017-08-23 17:16:49 · 359 阅读 · 0 评论 -
HDU 2512 一卡通大冒险(第二类 stirling 数)
Problem Description因为长期钻研算法, 无暇顾及个人问题,BUAA ACM/ICPC 训练小组的帅哥们大部分都是单身。某天,他们在机房商量一个绝妙的计划"一卡通大冒险"。这个计划是由wf最先提出来的,计划的内容是,把自己的联系方式写在校园一卡通的背面,然后故意将自己的卡"遗失"在某处(如水房,TD,食堂,主M。。。。)他们希望能有MM看到他们遗失卡,能主动跟他们联系,这样原创 2017-08-23 17:07:05 · 410 阅读 · 0 评论 -
POJ 2417 Discrete Logging(离散对数 BSGS)
DescriptionGiven a prime P, 2 31, an integer B, 2 <= B < P, and an integer N, 1 <= N < P, compute the discrete logarithm of N, base B, modulo P. That is, find an integer L such that BL == N原创 2017-08-22 12:31:20 · 371 阅读 · 0 评论 -
51NOD 1040 最大公约数之和(欧拉函数 + 转化)
给出一个n,求1-n这n个数,同n的最大公约数的和。比如:n = 61,2,3,4,5,6 同6的最大公约数分别为1,2,3,2,1,6,加在一起 = 15Input1个数N(N Output公约数之和Input示例6Output示例15对于这道题 1 ~ n 与 n 的最大公约数必定为 n 的因子。这里我们可以O(n^0.5)的原创 2017-08-21 21:52:14 · 417 阅读 · 0 评论 -
CodeForces 492E Vanya and Field(拓展欧几里得)
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVanya decided to walk in the field of size n × n cells. The field contai原创 2017-08-22 11:21:01 · 409 阅读 · 0 评论 -
HDU 1370 Biorhythms(中国剩余定理 + 拓展欧几里得)
Problem DescriptionSome people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles,原创 2017-08-21 18:00:22 · 331 阅读 · 0 评论 -
HDU 4662 MU Puzzle(找规律)
Problem DescriptionSuppose there are the symbols M, I, and U which can be combined to produce strings of symbols called "words". We start with one word MI, and transform it to get a new word. In e原创 2017-08-18 12:20:42 · 485 阅读 · 0 评论 -
Codeforces Round #574 (Div. 2) D1&D2(数论 + 组合数学)
time limit per test: 2 secondsmemory limit per test: 256 megabytesinput: standard inputoutput: standard outputThis problem differs from the previous one only in the absence of the constraint o...原创 2019-07-19 10:08:56 · 394 阅读 · 0 评论
分享