
------------数学------------
sdnuzsj
......
展开
-
乘法逆元求组合数
乘法逆元求组合数转载 2017-10-17 19:15:29 · 1190 阅读 · 0 评论 -
Return of the Nim----博弈(2017山东ACM-ICPC省赛)
Return of the Nim Time Limit: 1000MS Memory Limit: 65536KB Problem DescriptionSherlock and Watson are playing the following modified version of Nim game:There are n piles of stones denoted as ,,...,,原创 2017-07-24 15:11:31 · 626 阅读 · 0 评论 -
fireworks----乘法逆元求组合数(2017山东ACM-ICPC省赛)
Problem DescriptionHmz likes to play fireworks, especially when they are put regularly. Now he puts some fireworks in a line. This time he put a trigger on each firework. With that trigger, each firew原创 2017-07-24 16:24:15 · 555 阅读 · 0 评论 -
初等数论
目录一、数论基本概念 1、整除性 2、素数 a.素数与合数 b.素数判定 c.素数定理 d.素数筛选法 3、因数分解 a.算术基本定理 b.素数拆分 c.因子个数转载 2017-06-04 19:27:31 · 2724 阅读 · 0 评论 -
hihoCoder1324
时间限制:10000ms单点时限:1000ms内存限制:256MB描述希尔伯特曲线是以下一系列分形曲线 Hn 的极限。我们可以把 Hn 看作一条覆盖 2n × 2n 方格矩阵的曲线,曲线上一共有 2n × 2n 个顶点(包括左下角起点和右下角终点),恰好覆盖每个方格一次。Hn(n > 1)可以通过如下方法构造:1. 将 Hn-1 顺时针旋转90度放在原创 2017-09-22 16:15:34 · 205 阅读 · 0 评论 -
POJ2992
Description Your task in this problem is to determine the number of divisors of Cnk. Just for fun – or do you need any special reason for such a useful computation?Input The input consists of several原创 2017-05-18 21:13:06 · 928 阅读 · 0 评论 -
POJ 1845 --Sumdiv 约数基本定理+乘法逆元
DescriptionConsider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of S by 9901).InputThe only line contains the原创 2017-10-09 14:06:02 · 291 阅读 · 0 评论 -
2017 Multi-University Training Contest - Team 4 - 1003
Counting DivisorsTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 1451 Accepted Submission(s): 528Problem DescriptionIn mathe原创 2017-08-04 10:59:27 · 315 阅读 · 0 评论 -
hdu5514--frogs
Problem DescriptionThere are m stones lying on a circle, and n frogs are jumping over them.The stones are numbered from 0 to m−1 and the frogs are numbered from 1 to n. The i-th frog原创 2017-10-18 20:52:30 · 316 阅读 · 0 评论 -
容斥定理相关题目讲解
一. 由0到9的数字组成排列,要求第一个数大于1,最后一个数小于8,一共有多少种排列?我们可以来计算它的逆问题,即第一个元素或者最后一个元素>=8的情况。我们设第一个元素时有X组排列,最后一个元素>=8时有Y组排列。那么通过容斥原理来解决就可以写成:即:二. 长度为n的由数字0,1,2组成的序列,要求每个数字至少出现1次,这样的序列有多少原创 2017-10-13 18:20:03 · 613 阅读 · 0 评论 -
拓展欧几里得
以青蛙的约会为例。公青蛙一开始在x位置,母青蛙在y位置。公青蛙每次跳m米,母青蛙每次跳n米,并且都是向右跳的。地球经线长度是L,然后地球是圆的,也就是说,跳到L、L+1、L+2……其实就是跳到0、1、2。 公青蛙想追母青蛙,问多少次后它们能跳到一起。如果它们永远不能相遇,就输出Impossible(好可怜啊!) 很明显嘛,就是求一个k,使x + k*m ≡ y + k*n (mod L)转载 2017-10-17 19:30:04 · 244 阅读 · 0 评论 -
HDU5950 2016ACM/ICPC亚洲区沈阳站现场赛
Farmer John likes to play mathematics games with his N cows. Recently, they are attracted by recursive sequences. In each turn, the cows would stand in a line, while John writes two positive numbers a原创 2017-05-03 11:36:51 · 483 阅读 · 0 评论