ACM_数论
文章平均质量分 92
ITAK
这个作者很懒,什么都没留下…
展开
-
[Offer收割]编程练习赛6 题目1 : Playfair密码表 (密码学——模拟)
传送门时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi和小Ho经常用Playfair密码表加密自己的代码。 密码表是按以下步骤生成的。随机选择一个只包含大写字母的单词S作为密钥。 将S中的所有字母J替换为字母I。 将S中的字母依次填写进一个5x5的矩阵,按照从上到下、从左到右的顺序填充格子。填充过程中略过已经在密码表中的字母。 将’A’-‘I原创 2016-08-21 16:26:12 · 2298 阅读 · 0 评论 -
2016年湖南省第十二届大学生计算机程序设计竞赛 A. 2016(数学)
传送门问题 A: 2016 问题 A: 2016时间限制: 5 Sec 内存限制: 128 MB提交: 248 解决: 137[提交][状态][讨论版]题目描述 给出正整数 n 和 m,统计满足以下条件的正整数对 (a,b) 的数量: 1. 1≤a≤n,1≤b≤m; 2. a×b 是 2016 的倍数。输入 输入包含不超过 30 组数据。每组数据包含两个整数 n,m (1≤n,m≤原创 2016-09-03 18:44:21 · 1587 阅读 · 0 评论 -
51NOD 1509 加长棒 && Codeforces 571 A. Lengthening Sticks(组合数学 + 挡板法)
[传送门](http://codeforces.com/contest/571/problem/A)A. Lengthening Stickstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given three sticks wi原创 2016-09-16 17:05:11 · 1483 阅读 · 0 评论 -
51NOD 1421 最大MOD值&&Codeforces 484 B. Maximum Value(筛法 + 二分)
传送门B. Maximum Valuetime limit per test1 secondmemory limit per test256 megabytesYou are given a sequence a consisting of n integers. Find the maximum possible value of(integer remainder of ai divided b原创 2016-08-13 20:47:07 · 866 阅读 · 0 评论 -
HDU 4952 Number Transformation(数学)——2014 Multi-University Training Contest 8
传送门Number TransformationTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1173 Accepted Submission(s): 562Problem Description Teacher Mai has原创 2016-09-17 11:04:42 · 875 阅读 · 0 评论 -
HDU 5832 A water problem(取模~)—— 2016中国大学生程序设计竞赛 - 网络选拔赛
传送门 A water problemTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 60 Accepted Submission(s): 37Problem Description Two planets named Haha原创 2016-08-14 18:25:34 · 1551 阅读 · 0 评论 -
POJ 1753 Flip Game(高斯消元入门超详细题解)——Northeastern Europe 2000
传送门Flip GameTime Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others)Submit StatusFlip game is played on a rectangular 4×44×4 field with two-s原创 2016-09-05 16:56:29 · 1662 阅读 · 0 评论 -
BZOJ 2440: [中山市选2011]完全平方数(二分答案 + 莫比乌斯函数 + 容斥原理)
传送门 2440: [中山市选2011]完全平方数Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 2693 Solved: 1307[Submit][Status][Discuss]Description小 X 自幼就很喜欢数。但奇怪的是,他十分讨厌完全平方数。他觉得这些数看起来很令人难受。由此,他也讨厌所有是完全平方数的正整数倍的数。然而这丝原创 2016-08-15 12:05:49 · 1007 阅读 · 0 评论 -
HDU 5895 Mathematician QSC(逆元应用+矩阵快速幂+数论知识)——2016 ACM/ICPC Asia Regional Shenyang Online
传送门 Mathematician QSCTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 208 Accepted Submission(s): 101Problem Description QSC dream of becom原创 2016-09-19 19:07:02 · 1218 阅读 · 0 评论 -
HDU 5901 Count Primes (模板 + 数论知识)——2016 ACM/ICPC Asia Regional Shenyang Online
传送门 Count primesTime Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 635 Accepted Submission(s): 299Problem Description Easy question! Calculate原创 2016-09-19 19:24:25 · 2298 阅读 · 0 评论 -
HDU 4609 3-idiots(FFT优化 + 计数方法)——2013 Multi-University Training Contest 1
传送门 3-idiotsTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4140 Accepted Submission(s): 1464Problem Description King OMeGa catched three m原创 2016-10-09 12:13:40 · 625 阅读 · 0 评论 -
HDU 5319 Painter(模拟 + 规律)——2015 Multi-University Training Contest 3
传送门 PainterTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1946 Accepted Submission(s): 777Problem Description Mr. Hdu is an painter, as we原创 2016-08-24 17:25:52 · 1000 阅读 · 0 评论 -
Codeforces 710 C. Magic Odd Square(构造)——Educational Codeforces Round 16
传送门Find an n × nn × n matrix with different numbers from 11 to n2n^2, so the sum in each row, column and both main diagonals are odd.Input The only line contains odd integer n(1 ≤ n ≤ 49).n (1 ≤ n ≤原创 2016-08-24 13:34:18 · 1171 阅读 · 0 评论 -
BZOJ 2186: [Sdoi2008]沙拉公主的困惑 (逆元的应用)
传送门 Problem 2186. – [Sdoi2008]沙拉公主的困惑2186: [Sdoi2008]沙拉公主的困惑Time Limit: 10 Sec Memory Limit: 259 MBSubmit: 3058 Solved: 1040[Submit][Status][Discuss]Description 大富翁国因为通货膨胀,以及假钞泛滥,政府决定推出一项新的政策:现原创 2016-08-10 11:06:47 · 809 阅读 · 0 评论 -
POJ 2065 SETI(高斯消元解同余方程组)
传送门SETITime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 1882Accepted: 1165DescriptionFor some years, quite a lot of work has been put into listening to electromagnetic radio signals received fr原创 2016-09-12 20:00:30 · 1061 阅读 · 0 评论 -
51 NOD 1188 最大公约数之和 V2(基础数论)
数学 推导公式 欧拉筛法原创 2016-08-10 17:24:37 · 1634 阅读 · 3 评论 -
HDU 5288 OO’s Sequence(数学)——2015 Multi-University Training Contest 1
传送门 OO’s SequenceTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 3597 Accepted Submission(s): 1318Problem Description OO has got a ar原创 2016-08-22 18:08:32 · 650 阅读 · 0 评论 -
HDU 3364 Lanterns(高斯消元入门题目——开关问题)
传送门 LanternsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1582 Accepted Submission(s): 621Problem Description Alice has received a beautifu原创 2016-09-13 10:26:08 · 2195 阅读 · 0 评论 -
HDU 5399 Too Simple(数学 + 找规律)——2015 Multi-University Training Contest 9
传送门Too SimpleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1673 Accepted Submission(s): 547Problem Description Rhason Cheung had a simple pr原创 2016-09-01 18:59:53 · 754 阅读 · 0 评论 -
HDU 5312 Sequence(三角形数应用)——BestCoder 1st Anniversary ($)
传送门 SequenceTime Limit: 2000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1424 Accepted Submission(s): 442Problem Description Today, Soda has learned a原创 2016-08-23 14:53:01 · 981 阅读 · 0 评论 -
51NOD 1161 Partial Sums(数论)
传送门 给出一个数组A,经过一次处理,生成一个数组S,数组S中的每个值相当于数组A的累加,比如:A = {1 3 5 6} => S = {1 4 9 15}。如果对生成的数组S再进行一次累加操作,{1 4 9 15} => {1 5 14 29},现在给出数组A,问进行K次操作后的结果。(每次累加后的结果 mod 10^9 + 7) Input 第1行,2个数N和K,中间用空格分隔,N表示数原创 2016-08-11 11:19:24 · 1325 阅读 · 9 评论 -
HDU 5407 CRB and Candies(素数筛 + 逆元 + 组合数公式)——2015 Multi-University Training Contest 10
传送门CRB and CandiesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1049 Accepted Submission(s): 501Problem Description CRB has NN different can原创 2016-09-02 13:43:35 · 966 阅读 · 0 评论 -
HDU 5826 physics(积分 找规律)——2016 Multi-University Training Contest 8
积分原创 2016-08-11 20:00:32 · 914 阅读 · 0 评论 -
HDU 4609 3-idiots(FFT优化 + 计数方法)——2013 Multi-University Training Contest 1
传送门 3-idiotsTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4140 Accepted Submission(s): 1464Problem Description King OMeGa catched three m原创 2016-10-09 12:13:59 · 588 阅读 · 0 评论 -
POJ 1222 EXTENDED LIGHTS OUT(高斯消元 异或+求逆版本)
传送门EXTENDED LIGHTS OUTTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 9297Accepted: 6040DescriptionIn an extended version of the game Lights Out, is a puzzle with 5 rows of 6 buttons each (the原创 2016-09-08 14:08:50 · 896 阅读 · 0 评论 -
HDU 5478 Can you find it(数学归纳法 + 快速幂)——2015 ACM/ICPC Asia Regional Shanghai Online
传送门 Can you find itTime Limit: 8000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1487 Accepted Submission(s): 614Problem Description Given a prime number C原创 2016-10-25 21:06:54 · 928 阅读 · 0 评论 -
HDU 6050 Funny Function(构造矩阵+推公式)——2017 Multi-University Training Contest - Team 2
传送门 Funny FunctionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 724 Accepted Submission(s): 343Problem Description Function Fx,yF_{x,y}sati原创 2017-07-28 16:07:18 · 905 阅读 · 0 评论 -
BZOJ 3884: 上帝与集合的正确用法(欧拉函数)——有趣的题目
传送门3884: 上帝与集合的正确用法Time Limit: 5 Sec Memory Limit: 128 MBSubmit: 2439 Solved: 1079[Submit][Status][Discuss]Description根据一些书上的记载,上帝的一次失败的创世经历是这样的:第一天, 上帝创造了一个世界的基本元素,称做“元”。第二天, 上帝创造了一个新的元素,称作“α”。原创 2017-08-14 13:53:37 · 372 阅读 · 0 评论 -
HDU 6128 Inverse of sum(数论)——2017 Multi-University Training Contest - Team 7
传送门 Inverse of sumTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 326 Accepted Submission(s): 112Problem Description There are nn nonnegati原创 2017-08-16 20:59:06 · 1284 阅读 · 2 评论 -
HDU 6134 Battlestation Operational(基本数论+莫比乌斯反演)——2017 Multi-University Training Contest - Team 8
传送门Battlestation OperationalTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 570 Accepted Submission(s): 317Problem Description > The Death Sta原创 2017-08-27 14:10:38 · 830 阅读 · 0 评论 -
POJ 2429 GCD & LCM Inverse(大整数素因子分解+二进制枚举)
GCD & LCM InverseTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 16540Accepted: 3061DescriptionGiven two positive integers a and b, we can easily calculate the greatest common divisor (GCD) an原创 2017-08-27 20:19:09 · 1280 阅读 · 2 评论 -
2017 ACM-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 qp(qp≤12)\frac{q}{p}(\frac{q}{p} \le \frac{1}{2}).The question is, when Bob tosses the coi原创 2017-09-16 20:59:24 · 716 阅读 · 0 评论 -
2017 ACM-ICPC 亚洲区(西安赛区)网络赛 F.Trig Function(论文+组合数)
传送门 f(cos(x))=cos(n∗x)f(cos(x)) = cos(n*x) holds for all xx.Given two integers nn and mm, you need to calculate the coefficient of xmx^m in f(x)f(x), modulo 998244353998244353.Input FormatMultiple te原创 2017-09-17 20:49:59 · 1204 阅读 · 0 评论 -
HDU 5446 Unknown Treasure(中国剩余定理+卢卡斯定理)——2015 ACM/ICPC Asia Regional Changchun Online
传送门On the way to the next secret treasure hiding place, the mathematician discovered a cave unknown to the map. The mathematician entered the cave because it is there. Somewhere deep in the cave, she f原创 2017-10-10 20:34:54 · 960 阅读 · 0 评论 -
牛客OI赛制测试赛1 F 子序列(组合数学+容斥)
题目描述给出一个长度为n的序列,你需要计算出所有长度为k的子序列中,除最大最小数之外所有数的乘积相乘的结果 输入描述:第一行一个整数T,表示数据组数。对于每组数据,第一行两个整数N,k,含义如题所示接下来一行N个整数,表示给出的序列保证序列内的数互不相同输出描述:对于每组数据,输出一个整数表示答案,对取模每组数据之间以换行分割示例1输入34 3 5...原创 2018-08-31 19:26:26 · 830 阅读 · 10 评论 -
HDU 6038 Function(找规律)——2017 Multi-University Training Contest - Team 1
传送门 FunctionTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1034 Accepted Submission(s): 464Problem Description You are given a permutation原创 2017-07-26 17:51:09 · 915 阅读 · 0 评论 -
HDU 1402 A * B Problem Plus(FFT加速优化乘法)
传送门 A * B Problem PlusTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18312 Accepted Submission(s): 4106Problem Description Calculate A * B.原创 2016-10-08 16:50:23 · 1822 阅读 · 0 评论 -
ACM-ICPC国际大学生程序设计竞赛北京赛区(2016)网络赛 F. Periodic Signal(FFT 优化乘法)
传送门 时间限制:5000ms 单点时限:5000ms 内存限制:256MB 描述 Profess X is an expert in signal processing. He has a device which can send a particular 1 second signal repeatedly. The signal is A0 … An-1 under n Hz sa原创 2016-10-01 10:32:00 · 1540 阅读 · 0 评论 -
HDU 5908 Abelian Period(map + 思想)——BestCoder Round #88
传送门 Abelian PeriodTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others)Total Submission(s): 524 Accepted Submission(s): 222Problem Description Let SS be a number s原创 2016-10-03 21:05:33 · 1179 阅读 · 0 评论 -
HDU 5974 A Simple Math Problem(数学解方程)——2016ACM/ICPC亚洲区大连站-重现赛(感谢大连海事大学)
传送门 A Simple Math ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 262 Accepted Submission(s): 120Problem Description Given two positiv原创 2016-11-09 11:18:49 · 1647 阅读 · 3 评论