随笔分类 -  数学法

摘要:B. Pasha and Phonetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPasha has recently bought a new... 阅读全文
posted @ 2015-11-09 16:10 Painting、时光 阅读(275) 评论(0) 推荐(0) 编辑
摘要:仔细观察就会发现K = pow(2, m) + pow(2, m-1) 数要翻转一次/************************************************* Author :Powatr* Created Time :2015/10/20 18:06:07... 阅读全文
posted @ 2015-10-20 21:03 Painting、时光 阅读(262) 评论(0) 推荐(0) 编辑
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=4320/*公式:两个进制能相互转化,那么这两个进制的最小因数相同*//************************************************* Author :Powatr*... 阅读全文
posted @ 2015-08-25 15:01 Painting、时光 阅读(159) 评论(0) 推荐(0) 编辑
摘要:http://acm.fzu.edu.cn/problem.php?pid=2148 /************************************************* Author :Powatr* Created Time :2015-8-23 18:28:5... 阅读全文
posted @ 2015-08-23 19:06 Painting、时光 阅读(158) 评论(0) 推荐(0) 编辑
摘要:逆元 inv应用于取模运算中加法 (a + b) % p = a % p + b % p;减法 (a - b) % p = a % p - b % p;乘法 (a * b) % p = a % p * b % p;但是除法(a / b) % p :a * b % p = c;已知 b, c, p 求... 阅读全文
posted @ 2015-08-21 14:58 Painting、时光 阅读(328) 评论(0) 推荐(0) 编辑
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5392/*先把循环长度提取出来,再求这些长度的最小公倍数把质因数都分解出来,每个质因数取最大所有数之积就是最小公倍数*//**********************************************... 阅读全文
posted @ 2015-08-17 14:02 Painting、时光 阅读(346) 评论(0) 推荐(0) 编辑
摘要:Today, Soda has learned a sequence whosen-th(n≥1)item is3n(n−1)+1. Now he wants to know if an integermcan be represented as the sum of some items of t... 阅读全文
posted @ 2015-07-26 20:54 Painting、时光 阅读(153) 评论(0) 推荐(0) 编辑
摘要:Twilight Sparkle was playing Ludo with her friends Rainbow Dash, Apple Jack and Flutter Shy. But she kept losing. Having returned to the castle, Twili... 阅读全文
posted @ 2015-07-25 13:25 Painting、时光 阅读(242) 评论(0) 推荐(0) 编辑
摘要:Gerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to. Then he measured the length of ... 阅读全文
posted @ 2015-07-23 09:46 Painting、时光 阅读(186) 评论(0) 推荐(0) 编辑
摘要:Jeff's gotncards, each card contains either digit 0, or digit 5. Jeff can choose several cards and put them in a line so that he gets some number. Wha... 阅读全文
posted @ 2015-07-16 20:10 Painting、时光 阅读(175) 评论(0) 推荐(0) 编辑
摘要:Math is very important, for those who are also in school, make sure you will learn more about math.Salmon and Cat are good friends.Today Salmon ask Ca... 阅读全文
posted @ 2015-07-15 21:36 Painting、时光 阅读(246) 评论(0) 推荐(0) 编辑
摘要:ProblemA Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, everyo... 阅读全文
posted @ 2015-07-14 15:27 Painting、时光 阅读(164) 评论(0) 推荐(0) 编辑
摘要:Mike is the president of country What-The-Fatherland. There arenbears living in this country besides Mike. All of them are standing in a line and they... 阅读全文
posted @ 2015-05-28 15:47 Painting、时光 阅读(190) 评论(0) 推荐(0) 编辑
摘要:Mike has a frog and a flower. His frog is named Xaniar and his flower is named Abol. Initially(at time0), height of Xaniar ish1and height of Abol ish2... 阅读全文
posted @ 2015-05-27 16:16 Painting、时光 阅读(391) 评论(0) 推荐(0) 编辑
摘要:Two soldiers are playing a game. At the beginning first of them chooses a positive integernand gives it to the second soldier. Then the second one tri... 阅读全文
posted @ 2015-05-26 20:15 Painting、时光 阅读(155) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionPick two numbersai,aj(i≠j)from a sequence to maximize the value of their greatest common divisor.InputMultiple test cases. In the f... 阅读全文
posted @ 2015-04-19 20:42 Painting、时光 阅读(149) 评论(0) 推荐(0) 编辑
摘要:Description已知一个圆的圆周被N个点分成了N段等长圆弧,求任意取三个点,组成锐角三角形的个数。Input多组数据。每组数据一个N (N ≤ 1000000)。Output对于每组数据,输出不同锐角三角形的个数。Sample Input345Sample Output105大意:数学推导,分... 阅读全文
posted @ 2015-04-17 11:27 Painting、时光 阅读(159) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionAfter enjoying the movie,LeLe went home alone. LeLe decided to build blocks. LeLe has already builtnpiles. He wants to move some bl... 阅读全文
posted @ 2015-03-24 18:24 Painting、时光 阅读(173) 评论(0) 推荐(0) 编辑
摘要:Description众所周知,我是好人!所以不会出太难的题,题意很简单 给你两个数n和m,问你有多少对正整数对最大公约数是n,最小公倍数是m最后友情提供解题代码(我真是太好人了)void solve(){ long long n, m; scanf("%lld%lld", &n, &m); int... 阅读全文
posted @ 2015-03-18 10:41 Painting、时光 阅读(192) 评论(0) 推荐(0) 编辑
摘要:DescriptionYou've got arraya[1], a[2], ..., a[n], consisting ofnintegers. Count the number of ways to split all the elements of the array into three c... 阅读全文
posted @ 2015-03-17 13:23 Painting、时光 阅读(335) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示