
数论
文章平均质量分 84
OtterVV
这个作者很懒,什么都没留下…
展开
-
数论 FZU1759 降幂公式(欧拉函数+快速幂)
Problem 1759 Super A^B mod CAccept: 1682 Submit: 5719Time Limit: 1000 mSec Memory Limit : 32768 KB Problem DescriptionGiven A,B,C, You should quickly calculate the result of A^B mod C. (1...原创 2018-08-18 21:55:51 · 1474 阅读 · 0 评论 -
ZOJ4029 预处理&二分&思路
Now Loading!!! ZOJ - 4029 题目大意:对于每次问询求那个公式的结果,最后输出每次问询*第几次的和。记得之前组队训练时遇到过一次,当时同队的学姐提出了log的预处理,我想到了log的范围只有1~30,但是没再想下去。顺着上面的想法,我们就会想到预处理出a数组在每个log情况下的前缀和。对于每次问询,处理p的每个次方段里的a数组,每段里分母一样,...原创 2019-01-21 20:46:47 · 270 阅读 · 0 评论 -
UVALive 7040 F Color 容斥&组合数&快速幂&阶乘逆元
Recently, Mr. Big recieved n owers from his fans. He wants to recolor those owers with m colors. The owers are put in a line. It is not allowed to color any adjacent owers with the same color. Flowers...原创 2018-10-24 16:57:29 · 289 阅读 · 0 评论 -
数论 UVALive-7728 Detachment 阶乘逆元
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=5750In a highly developed alien society, the habitats are almost infinite dimension...原创 2018-10-02 18:42:02 · 374 阅读 · 0 评论 -
数论 UVALive-7726 A Simple Math Problem
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=5748Given two positive integers a and b, find suitableX and Y to meet the conditi...原创 2018-10-02 18:21:42 · 254 阅读 · 0 评论 -
ACM-ICPC 2018 焦作赛区网络预赛 L Poor God Water 矩阵快速幂
Poor God Water 1000ms 65536KGod Water likes to eat meat, fish and chocolate very much, but unfortunately, the doctor tells him that some sequence of eating will make them poisonous.Every hour, ...原创 2018-09-15 21:59:16 · 599 阅读 · 0 评论 -
数论 CSU2021 降幂公式 NCPC2016
2021: ExponialSubmit Page Summary Time Limit: 1 Sec Memory Limit: 512 Mb Submitted: 243 Solved: 98 DescriptionEverybody loves big numbers (if you do not, you might want to s...原创 2018-08-29 13:38:26 · 362 阅读 · 0 评论 -
数论 POJ1061 扩展欧几里德
青蛙的约会Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 128770 Accepted: 28142 Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前...原创 2018-08-21 20:36:04 · 207 阅读 · 0 评论 -
HDU 2018暑假多校第一场 A Maximum Multiple
Maximum MultipleTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0 Problem DescriptionGiven an integer n, Ch...原创 2018-07-23 19:44:06 · 277 阅读 · 0 评论 -
数论 HDU4990 快速幂模板
Reading comprehensionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3106 Accepted Submission(s): 1218 Problem DescriptionRead the pr...原创 2018-08-21 16:19:37 · 253 阅读 · 0 评论 -
数论 HihoCoder1195 高斯消元
#1195 : 高斯消元·一时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Ho:喂不得了啦,那边便利店的薯片半价了!小Hi:啥?!小Ho:那边的便利店在打折促销啊。小Hi:走走走,赶紧去看看=v=于是小Hi和小Ho来到了便利店。老板为了促销,推出了组合包的形式,将不同数量的各类商品打包成一个组合,顾客可以选择组合进行购买。比如2袋薯...原创 2018-08-23 18:48:50 · 256 阅读 · 0 评论 -
数论 2018CCPC网络选拔赛签到题1004
Find IntegerTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 6597 Accepted Submission(s): 1999Special JudgeProblem Descriptionpeople in...原创 2018-08-27 16:06:01 · 499 阅读 · 2 评论 -
数论 51Nod1079 中国剩余定理
1079 中国剩余定理基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题一个正整数K,给出K Mod 一些质数的结果,求符合条件的最小的K。例如,K % 2 = 1, K % 3 = 2, K % 5 = 3。符合条件的最小的K = 23。Input第1行:1个数N表示后面输入的质数及模的数量。(2 <= N <= 10)第2 - N + 1...原创 2018-08-21 12:34:27 · 235 阅读 · 0 评论 -
数论 HihoCoder1303 模线性方程组 扩展欧几里德
#1303 : 数论六·模线性方程组时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Ho:今天我听到一个挺有意思的故事!小Hi:什么故事啊?小Ho:说秦末,刘邦的将军韩信带领1500名士兵经历了一场战斗,战死四百余人。韩信为了清点人数让士兵站成三人一排,多出来两人;站成五人一排,多出来四人;站成七人一排,多出来六人。韩信立刻就知道了剩余人数为10...原创 2018-08-19 16:28:24 · 343 阅读 · 0 评论 -
数论 HihoCoder1295 Eular质数筛法
#1295 : 数论二·Eular质数筛法时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Ho:小Hi,上次我学会了如何检测一个数是否是质数。于是我又有了一个新的问题,我如何去快速得求解[1,N]这个区间内素数的个数呢?小Hi:你自己有什么想法么?小Ho:有!我一开始的想法是,自然我们已经知道了如何快速判定一个数是否是质数,那么我就直接将[1,N...原创 2018-08-19 13:14:47 · 213 阅读 · 0 评论 -
Codeforces gym101933 I 大数(Java&C++) 超递增背包
I. Intergalactic Biddingtime limit per test2.0 smemory limit per test256 MBinputstandard inputoutputstandard outputToday the Intergalactic Council of Pebble Coins (ICPC) conducted an...原创 2019-03-31 11:01:58 · 496 阅读 · 0 评论