数论
AC_Lee
这个作者很懒,什么都没留下…
展开
-
Codeforces 584 A. Olesya and Rodion 数论+找规律(构造)
#include #include #include #include #include #include using namespace std;int main(){ int n,t; scanf("%d%d",&n,&t); if(n==1&&t==10){ puts("-1");// return 0;//加上会 WA原创 2016-08-21 20:28:34 · 296 阅读 · 0 评论 -
组合数取模之逆元方法+模板
参自:http://www.cnblogs.com/liziran/p/6804803.htmlhttps://baike.baidu.com/item/%E8%B4%B9%E9%A9%AC%E5%B0%8F%E5%AE%9A%E7%90%86/4776158?fr=aladdin现在目标是求Cnm%p,p为素数(经典p=1e9+7)虽然有Cnm=n原创 2017-10-08 22:15:15 · 2453 阅读 · 0 评论 -
codeforces 131c 组合数
题目:C. The World is a Theatretime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n boys and m g原创 2017-07-23 11:37:06 · 299 阅读 · 0 评论 -
ZOJ 3827 简单数学推导+简单模拟
题目:Information EntropyTime Limit: 2 Seconds Memory Limit: 65536 KB Special JudgeInformation Theory is one of the most popular courses in Marjar University. In this course, ther原创 2017-06-26 19:29:42 · 611 阅读 · 0 评论 -
hdu 6025 gcd+前缀和+后缀和
题目:Coprime SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 699 Accepted Submission(s): 360Problem Description原创 2017-06-25 16:24:21 · 588 阅读 · 0 评论 -
codeforces 755 A O(N)素数筛模板
题目:A. PolandBall and Hypothesistime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolandBall原创 2017-05-22 19:40:22 · 250 阅读 · 0 评论 -
hdu 2522 1/n 循环节
题目:A simple problemTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4448Accepted Submission(s): 1710Problem Description原创 2016-12-27 22:29:16 · 344 阅读 · 0 评论 -
poj 2941 Homogeneous Squares 解题报告
题目:Homogeneous SquaresTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 4721 Accepted: 2393DescriptionAssume you have a square of size n that is原创 2016-09-22 20:41:32 · 587 阅读 · 0 评论 -
hdu 5878 I Count Two Three ICPC青岛站网络赛1001
题目:I Count Two ThreeTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 246 Accepted Submission(s): 128Problem DescriptionI原创 2016-09-17 22:03:01 · 262 阅读 · 0 评论 -
codeforces 682 a 解题报告 Alyona and Numbers 数论基础
题目:A. Alyona and Numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter finishing eating her bu原创 2016-09-16 17:38:04 · 297 阅读 · 0 评论 -
codeforces 707 c Pythagorean Triples 数论+勾股数
题目:C. Pythagorean Triplestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKatya studies in a fifth原创 2016-09-15 12:10:32 · 187 阅读 · 0 评论 -
codeforces 158D 解题报告 数论+暴力
题目:D. Ice Sculpturestime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Berland University原创 2016-09-14 21:17:38 · 236 阅读 · 0 评论 -
codeforces 230B T-primes 解题报告 数论+素数
题目:B. T-primestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe know that prime numbers are positiv原创 2016-09-13 10:21:15 · 462 阅读 · 0 评论 -
poj 3233 Matrix Power Series 矩阵快速幂or二分
题目:DescriptionGiven a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak.InputThe input contains exactly one test case. The first line of input contains原创 2017-10-11 22:41:56 · 321 阅读 · 0 评论