---------数论---------
CrossDolphin
青春看起来如此完美,没空闲去浪费时间。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu 1071 定积分
链接:戳这里 The area Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description Ignatius bought a land last week, but he didn't know the are原创 2016-09-22 22:23:13 · 355 阅读 · 0 评论 -
Codeforces Round #360 (Div. 2) D 数学题
链接:戳这里 D. Remainders Game time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Today Pari and Arya are playing a game called Remainder原创 2016-07-04 22:23:23 · 388 阅读 · 0 评论 -
hdu 4790 数学
链接:戳这里 Just Random Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Coach Pang and Uncle Yang both love numbers. Every morn原创 2016-07-25 18:00:07 · 393 阅读 · 0 评论 -
Codeforces Round #318 [RussianCodeCup Thanks-Round] (Div. 2) C 模拟
链接:戳这里 C. Bear and Poker time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Limak is an old brown bear. He often plays poker with h原创 2016-07-13 14:36:35 · 270 阅读 · 0 评论 -
BestCoder Round #84 1004 hdu 5750 数论
链接:戳这里 Dertouzos Time Limit: 7000/3500 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Problem Description A positive proper divisor is a positive divisor of a number原创 2016-07-23 22:09:48 · 358 阅读 · 0 评论 -
Codeforces Round #320 (Div. 2) [Bayan Thanks-Round] C 数学
链接:戳这里 C. A Problem about Polyline time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output There is a polyline going through points (0, 0)原创 2016-07-12 14:35:57 · 279 阅读 · 0 评论 -
Codeforces Round #364 (Div. 2) D 数学推导
链接:戳这里 D. As Fast As Possible time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output On vacations n pupils decided to go on excursion an原创 2016-07-23 15:53:28 · 587 阅读 · 0 评论 -
Codeforces Round #325 (Div. 2) E 数论
链接:戳这里 E. Alice, Bob, Oranges and Apples time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Alice and Bob decided to eat some fruit.原创 2016-07-09 21:52:39 · 442 阅读 · 0 评论 -
2016百度之星 hdu 5698 递推+费马小
链接:戳这里 瞬间移动 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description 有一个无限大的矩形,初始时你在左上角(即第一行第一列),每次你都可以选择一个右下方格子,并瞬移过去(如从下图中的红色格子能直接瞬移到蓝色格子原创 2016-05-23 20:58:22 · 462 阅读 · 0 评论 -
Codeforces Round #315 (Div. 2) D 贝尔数
链接:戳这里 D. Symmetric and Transitive time limit per test1.5 seconds memory limit per test256 megabytes inputstandard input outputstandard output Little Johnny has recently learned about se原创 2016-07-16 15:42:12 · 664 阅读 · 0 评论 -
Codeforces Round #309 (Div. 2) C 排列组合+费马小
链接:戳这里 C. Kyoya and Colored Balls time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Kyoya Ootori has a bag with n colored balls th原创 2016-07-18 12:08:15 · 426 阅读 · 0 评论 -
Codeforces Round #361 (Div. 2) E 费马小
链接:戳这里 E. Mike and Geometry Problem time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Mike wants to prepare for IMO but he doesn't原创 2016-07-07 18:31:16 · 375 阅读 · 0 评论 -
湖南省第十二届大学生计算机程序设计竞赛 A 2016
链接:戳这里 1803: 2016 Time Limit: 5 Sec Memory Limit: 128 MB [Submit][Status][Web Board] Description 给出正整数 n 和 m,统计满足以下条件的正整数对 (a,b) 的数量: 1. 1≤a≤n,1≤b≤m; 2. a×b 是 2016 的倍数。 Input 输入原创 2016-09-05 20:23:34 · 676 阅读 · 0 评论 -
hdu 4810 排列组合C(n,m) 数组存
链接:戳这里 Wall Painting Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Ms.Fang loves painting very much. She paints GFW(Great F原创 2016-08-08 14:43:42 · 451 阅读 · 0 评论 -
hdu 2588 欧拉函数
链接:戳这里 GCD Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description The greatest common divisor GCD(a,b) of two positive integers a and原创 2016-08-01 21:40:07 · 368 阅读 · 0 评论 -
Codeforces Round #304 (Div. 2) D 线性筛
链接:戳这里 D. Soldier and Number Game time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Two soldiers are playing a game. At the beginn原创 2016-07-21 21:41:59 · 411 阅读 · 0 评论 -
Educational Codeforces Round 15 D 数学推导
链接:戳这里 D. Road to Post Office time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Vasiliy has a car and he wants to get from home to原创 2016-08-01 15:24:42 · 445 阅读 · 0 评论 -
hdu 5778 算复杂度
链接:戳这里 abs Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Problem Description Given a number x, ask positive integer y≥2, that satisfy the fo原创 2016-07-31 20:47:22 · 439 阅读 · 0 评论 -
2016 Multi-University Training Contest 1 1002 hdu 5724 博弈
链接:戳这里 Chess Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description Alice and Bob are playing a special chess game on an n × 20 chessboar原创 2016-07-20 15:19:58 · 490 阅读 · 0 评论 -
Codeforces Round #323 (Div. 2) C gcd
链接:戳这里 C. GCD Table time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output The GCD table G of size n × n for an array of positive integ原创 2016-07-08 21:15:51 · 436 阅读 · 0 评论 -
2016百度之星 hdu 5690 矩阵快速幂
链接:戳这里 All X Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description F(x,m) 代表一个全是由数字x组成的m位数字。请计算,以下式子是否成立: F(x,m) mod k ≡ c Input 第一原创 2016-05-23 20:44:34 · 370 阅读 · 0 评论 -
hdu 2669 Romantic 扩展欧几里得
链接:戳这里 Romantic Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description The Sky is Sprite. The Birds is Fly in the Sky. The Wind is Wond原创 2016-04-24 15:19:53 · 480 阅读 · 0 评论 -
BestCoder Round #81 (div.1) C HDU 5673 卡特兰数
链接:戳这里 Robot Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) 问题描述 有一个机器人位于坐标原点上。每秒钟机器人都可以向右移到一个单位距离,或者在原地不动。如果机器人的当前位置在原点右侧,它同样可以 向左移动单位距离。一系列的移动(左移,右原创 2016-04-23 22:56:03 · 510 阅读 · 0 评论 -
bzoj 2301 莫比乌斯反演
链接:戳这里 2301: [HAOI2011]Problem b Time Limit: 50 Sec Memory Limit: 256 MB [Submit][Status][Discuss] Description 对于给出的n个询问,每次求有多少个数对(x,y),满足a≤x≤b,c≤y≤d,且gcd(x,y) = k,gcd(x,y)函数为x和y的最大公约数原创 2016-03-28 20:48:35 · 407 阅读 · 0 评论 -
rqnoj 607 莫比乌斯反演应用
链接:戳这里 PID607 / [NOI2010]能量采集 ☆ 题目标签 类型 数论 / 数值 来源 NOI2001 题目描述 栋栋有一块长方形的地,他在地上种了一种能量植物,这种植物可以采集太阳光的能量。在这些植物采集能量后,栋栋再使用一个能量汇集机器把这些植物采集到的能量汇集到一起。 栋栋的植物种得非常整齐,一共有n列,每列有m棵,植物的横竖间距都原创 2016-03-28 18:56:37 · 385 阅读 · 0 评论 -
bzoj 2440 莫比乌斯反演应用
链接:戳这里 2440: [中山市选2011]完全平方数 Time Limit: 10 Sec Memory Limit: 128 MB [Submit][Status][Discuss] Description 小 X 自幼就很喜欢数。但奇怪的是,他十分讨厌完全平方数。他觉得这些 数看起来很令人难受。由此,他也讨厌所有是完全平方数的正整数倍的数。原创 2016-03-28 15:55:13 · 398 阅读 · 0 评论 -
bzoj 1485 卡特兰数
链接:戳这里 1485: [HNOI2009]有趣的数列 Time Limit: 10 Sec Memory Limit: 64 MB [Submit][Status][Discuss] Description 我们称一个长度为2n的数列是有趣的,当且仅当该数列满足以下三个条件: (1)它是从1到2n共2n个整数的一个排列{ai};原创 2016-03-27 21:17:24 · 757 阅读 · 0 评论 -
2016 [Offer收割]编程练习赛3 A B
链接:戳这里 #1283 : hiho密码 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Ho根据最近在密码学课上学习到的知识,开发出了一款hiho密码,这款密码的秘钥是这样生成的:对于一种有N个字母的语言,选择一个长度为M的单词;将组成这个单词的所有字母按照顺序不重复的写出(即遇到相同字母时跳过);然后将字母表剩下的没有使用过的字母按原创 2016-03-27 19:53:26 · 650 阅读 · 0 评论 -
BestCoder Round #77 (div.2) A B C D
链接:戳这里 so easy Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) 问题描述 已知一个包含 nn 个元素的正整数集合 SS,设 f(S)为集合 S 中所有元素的异或(XOR)的结果。 如:S={1,2,3}, 则 f(S) = 0。原创 2016-03-26 22:59:05 · 523 阅读 · 0 评论 -
Uva 11426 - GCD - Extreme (II) 欧拉函数
链接:戳这里 Given the value of N, you will have to find the value of G. The definition of G is given below: ij≤N G = ∑ ∑ GCD(i, j) i=1 j=i+1 Here GCD(i, j) mean原创 2016-03-25 21:52:30 · 457 阅读 · 0 评论 -
两个数的最大公约数
主要是为了记下gcd函数的代码!!! #include #include #include #include #include #include #include #include #include #include #define mst(ss,b) memset((ss),(b),sizeof(ss)) #define maxn 0x3f3f3f3f using namespace std;原创 2015-01-30 22:21:47 · 522 阅读 · 0 评论 -
hdu 1695 莫比乌斯反演
链接:戳这里 GCD Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Given 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...原创 2016-03-28 21:49:24 · 322 阅读 · 0 评论 -
BestCoder Round #79 (div.2) 1001 1004 HDU 5663 Hillan and the girl
链接:戳这里 jrMz and angles Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) 问题描述 jrMz有两种角,第一种角都是正nn边形的内角,第二种角都是正mm边形的内角。jrMz想选出其中一些,某种角可以选多个或一个都不选,使得选出的所原创 2016-04-09 22:04:29 · 661 阅读 · 0 评论 -
广东工业大学2016校赛 Problem F: 我是好人4
链接:戳这里 Description 众所周知,我是好人!所以不会出太难的题,题意很简单 给你n个数,问你1000000000(含1e9)以内有多少个正整数不是这n个数任意一个的倍数 最后友情提供解题代码(我真是太好人了) void solve(int p[], int n) { int ans = 0; for (int i = 1; i { int fl原创 2016-04-10 20:28:33 · 1375 阅读 · 4 评论 -
BestCoder Round #80 1004 hdu 5668 中国剩余定理(m不互质版)
链接:戳这里 Circle Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) 问题描述 \ \ \ \ Fye对约瑟夫游戏十分着迷. \ \ \ \ 她找到了n个同学,把他们围成一个圈,让他们做约瑟夫游戏,然后她得到了一个同学们出圈的原创 2016-05-06 22:56:43 · 1521 阅读 · 0 评论 -
poj 3070 矩阵快速幂
链接:戳这里 Fibonacci Time Limit: 1000MS Memory Limit: 65536K Description In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten原创 2016-04-21 22:55:17 · 337 阅读 · 0 评论 -
BestCoder Round #80 A B C hdu5667矩阵快速幂
链接:戳这里 Lucky Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) 问题描述 Vampire喜欢玄学,尤其喜欢研究幸运数字. 对于一个数字集合S,定义关于S的幸运数字为无法用S中的数相加得到的最小的非负整数(每个数可以使用任意原创 2016-04-21 21:34:54 · 544 阅读 · 0 评论 -
第五届华中区程序设计邀请赛暨武汉大学第十四届校赛 现场赛 WHU oj Problem 1613 - Count in Sama’s triangle 扩展欧几里得
链接:戳这里 Time Limit: 1000MS Memory Limit: 65536KB Description Today, the math teacher taught Alice Hui Yang’s triangle. However, the teacher came up with a new one, called Sama’s t原创 2016-05-05 19:45:25 · 666 阅读 · 0 评论 -
华中农业大学第四届程序设计大赛网络同步赛 C
链接:戳这里 18: Array C Time Limit: 1 Sec Memory Limit: 128 MB [Submit][Status][Web Board] Description Giving two integers and and two arrays and both with length , you should cons原创 2016-05-15 20:24:12 · 1058 阅读 · 0 评论 -
BestCoder Round #82 (div.2) A B
链接:戳这里 ztr loves math Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) 问题描述 ztr喜欢研究数学,一天,他在思考直角三角形方程组的Lower版,即n=x^2-y^2 他想知道,对于给出的n,是否会有正整数解。 输入描述 有原创 2016-05-02 22:20:04 · 398 阅读 · 0 评论
分享