![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM__数论
文章平均质量分 80
wust_zwl
学不死,就往死里学。
展开
-
Trailing Zeroes (III) (数学)
You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For example, 5! = 120, 120 contains one zero on the trail.原创 2017-07-06 10:10:41 · 598 阅读 · 1 评论 -
ZOJ 1039 Number Game(SG博弈+状压+记忆化搜索)
BackgroundChristiane and Matthias are playing a new game, the Number Game. The rules of the Number Game are:Christian and Matthias take turns in choosing integer numbers greater than or equal to 2. The following rules restrict the set of numbers which原创 2017-09-01 09:48:52 · 373 阅读 · 0 评论 -
2017 icpc 西安赛区 B.Coin(推公式+二项式定理)
Bob has a not even coin, every time he tosses the coin, the probability that the coin's front face up is \frac{q}{p}(\frac{q}{p} \le \frac{1}{2})pq (pq ≤21 ).The question is, when Bob tosses the coin kk times, what's the probab原创 2017-09-17 20:06:51 · 411 阅读 · 0 评论 -
POJ 3252 Round Numbers (数位dp)
The cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Scissors', 'Ro, Sham, Bo', and a host of other names) in order to make arbitrary decisions such as who gets to be milked first原创 2017-08-28 10:40:34 · 279 阅读 · 0 评论 -
ZOJ 3449 Doraemon's Number Game III (数论)
Doraemon likes to play number game with Nobita.One day, Doraemon came up with an idea, he gave a number a in base 10 and a number x (x < 10), and then he let Nobita multiplies the first digit of a with x and add the second digit of a, then multiplies x a原创 2017-08-13 19:15:08 · 269 阅读 · 0 评论 -
poj_2478-Farey Sequence(欧拉函数) 【模板】
Language:Farey SequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16486 Accepted: 6543DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1原创 2017-07-09 16:29:21 · 286 阅读 · 0 评论 -
Codeforces Round #317 [AimFund Thanks-Round] (Div. 2) C(组合数+容斥)
You are given three sticks with positive integer lengths of a, b, and c centimeters. You can increase length of some of them by some positive integer number of centimeters (different sticks can be increased by a different length), but in total by at most l原创 2017-07-27 19:40:36 · 285 阅读 · 0 评论 -
poj 3844 Divisible Subsequences(数学+抽屉原理)
Given a sequence of positive integers, count all contiguous subsequences (sometimes called substrings, in contrast to subsequences, which may leave out elements) the sum of which is divisible by a given number. These subsequences may overlap. For example,原创 2017-08-03 20:45:18 · 598 阅读 · 0 评论 -
POJ 3199 Uncle Jack (高精度)
Dear Uncle Jack is willing to give away some of his collectable CDs to his nephews. Among the titles you can find very rare albums of Hard Rock, Classical Music, Reggae and much more; each title is considered to be unique. Last week he was listening to one原创 2017-07-25 16:07:51 · 331 阅读 · 0 评论 -
codeforces 384C Milking cows(脑洞+思维)
Iahub helps his grandfather at the farm. Today he must milk the cows. There are n cows sitting in a row, numbered from 1 to n from left to right. Each cow is either facing to the left or facing to the right. When Iahub milks a cow, all the cows that see th原创 2017-07-31 09:16:21 · 384 阅读 · 0 评论 -
codeforces 294C-Shaass and Lights (组合数学)
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on (this light should be switched off at th原创 2017-07-31 08:55:44 · 2079 阅读 · 0 评论 -
codeforces 337C Quiz(快速幂+推公式+贪心)
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the player answers a question correctly, the number on this count原创 2017-10-30 23:42:33 · 365 阅读 · 0 评论