随笔分类 -  ACM-数论

摘要:BellTime Limit:3000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 4767DescriptionWhat? MMM is learning Combinatorics!?Look... 阅读全文
posted @ 2015-05-08 23:48 寻找&星空の孩子 阅读(1449) 评论(0) 推荐(0)
摘要:贝尔数贝尔数以埃里克·坦普尔·贝尔(Eric Temple Bell)为名,是组合数学中的一组整数数列,开首是(OEIS的A000110数列):Bell NumberBn是基数为n的集合的划分方法的数目。集合S的一个划分是定义为S的两两不相交的非空子集的族,它们的并是S。例如B3=5因为3个元素的集... 阅读全文
posted @ 2015-05-05 21:27 寻找&星空の孩子 阅读(5981) 评论(1) 推荐(0)
摘要:One Person GameTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit Status Practice ZOJ 3593DescriptionThere is an interesting and... 阅读全文
posted @ 2015-05-04 22:35 寻找&星空の孩子 阅读(1214) 评论(0) 推荐(0)
摘要:Strange Way to Express IntegersTime Limit:1000MS Memory Limit:131072KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 2891DescriptionElina is... 阅读全文
posted @ 2015-05-03 00:36 寻找&星空の孩子 阅读(649) 评论(0) 推荐(0)
摘要:C Looooops Description A Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; variable += C) statement; I.e., a loop which starts by setting variable to value A and while variable is not equal to B, repeats statement followed by increasing the variable by C. We want to know how many times does the statement get executed for particular values of A, B and C, assuming that all arithmetics is calculated in a k-bit unsigned integer type 阅读全文
posted @ 2015-05-02 18:04 寻找&星空の孩子 阅读(337) 评论(0) 推荐(0)
摘要:X问题Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3921Accepted Submission(s): 1253Problem Descrip... 阅读全文
posted @ 2015-05-02 16:08 寻找&星空の孩子 阅读(251) 评论(0) 推荐(0)
摘要:Modular InverseTime Limit:2 Seconds Memory Limit:65536 KBThe modular modular multiplicative inverse of an integeramodulomis an integerxsuch thata-1≡x(... 阅读全文
posted @ 2015-04-27 23:22 寻找&星空の孩子 阅读(519) 评论(0) 推荐(0)
摘要:C. KiteTime Limit:1000ms Case Time Limit:1000ms Memory Limit:65536KBVova bought a kite construction kit in a market in Guangzhou. The next day the wea... 阅读全文
posted @ 2015-04-19 21:32 寻找&星空の孩子 阅读(733) 评论(0) 推荐(0)
摘要:That Nice Euler CircuitTime Limit:3000MSMemory Limit:0KB64bit IO Format:%lld & %lluDescriptionLittle Joey invented a scrabble machine that he called E... 阅读全文
posted @ 2015-04-18 16:32 寻找&星空の孩子 阅读(315) 评论(0) 推荐(0)
摘要:题意:Morley定理,求D、E、F的坐标 思路:没什么算法,就是几何的应用。注意旋转角就好了。转载请注明出处:寻找&星空の孩子题目链接:UVA11178 1 #include 2 #include 3 #define PI acos(-1.0) 4 using namespace std; 5 ... 阅读全文
posted @ 2015-04-17 23:16 寻找&星空の孩子 阅读(267) 评论(0) 推荐(0)
摘要:Cylinder CandyTime Limit: 2 Seconds Memory Limit: 65536 KB Special JudgeEdward the confectioner is making a new batch of chocolate covered candy. Each... 阅读全文
posted @ 2015-04-16 21:49 寻找&星空の孩子 阅读(798) 评论(0) 推荐(0)
摘要:Cylinder CandyTime Limit: 2 Seconds Memory Limit: 65536 KB Special JudgeEdward the confectioner is making a new batch of chocolate covered candy. Each... 阅读全文
posted @ 2015-04-12 23:14 寻找&星空の孩子 阅读(558) 评论(0) 推荐(0)
摘要:历届试题 高僧斗法 时间限制:1.0s 内存限制:256.0MB问题描述 古时丧葬活动中经常请高僧做法事。仪式结束后,有时会有“高僧斗法”的趣味节目,以舒缓压抑的气氛。 节目大略步骤为:先用粮食(一般是稻米)在地上“画”出若干级台阶(表示N级浮屠)。又有若干小和尚随机地“站”在某个台阶上。最... 阅读全文
posted @ 2015-04-05 23:32 寻找&星空の孩子 阅读(1996) 评论(0) 推荐(1)
摘要:历届试题 买不到的数目 时间限制:1.0s 内存限制:256.0MB问题描述小明开了一家糖果店。他别出心裁:把水果糖包成4颗一包和7颗一包的两种。糖果不能拆包卖。小朋友来买糖的时候,他就用这两种包装来组合。当然有些糖果数目是无法组合出来的,比如要买 10 颗糖。你可以用计算机测试一下,在这种包装... 阅读全文
posted @ 2015-04-04 15:35 寻找&星空の孩子 阅读(415) 评论(1) 推荐(0)
摘要:历届试题 矩阵翻硬币 时间限制:1.0s 内存限制:256.0MB问题描述 小明先把硬币摆成了一个 n 行 m 列的矩阵。 随后,小明对每一个硬币分别进行一次 Q 操作。 对第x行第y列的硬币进行 Q 操作的定义:将所有第 i*x 行,第 j*y 列的硬币进行翻转。 其中i和j为任意使操作... 阅读全文
posted @ 2015-04-03 16:12 寻找&星空の孩子 阅读(677) 评论(0) 推荐(0)
摘要:C -Chinese remainder theorem againTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uDescription我知道部分同学最近在看中国剩余定理,就这个定理本身,还是比较简单的:假设m1,... 阅读全文
posted @ 2015-03-31 23:00 寻找&星空の孩子 阅读(360) 评论(0) 推荐(0)
摘要:基础练习 十六进制转八进制 时间限制:1.0s 内存限制:512.0MB问题描述 给定n个十六进制正整数,输出它们对应的八进制数。输入格式 输入的第一行为一个正整数n (1#include#include#includeusing namespace std;int num[400005],... 阅读全文
posted @ 2015-03-31 00:09 寻找&星空の孩子 阅读(35448) 评论(0) 推荐(0)
摘要:RomanticTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3218 Accepted Submission(s): 1274Prob... 阅读全文
posted @ 2015-03-26 13:21 寻找&星空の孩子 阅读(315) 评论(0) 推荐(0)
摘要:BiorhythmsTime Limit:1000MSMemory Limit:10000KTotal Submissions:117973Accepted:37026DescriptionSome people believe that there are three cycles in a pe... 阅读全文
posted @ 2015-03-25 21:54 寻找&星空の孩子 阅读(849) 评论(0) 推荐(0)
摘要:欧几里得算法作用:计算两个数的最大公约数。算法:欧几里德算法又称辗转相除法,用于计算两个整数a,b的最大公约数。用gcd(a, b)表示a和b的最大公约数。gcd函数的基本性质:gcd(a,b)=gcd(b,a)=gcd(-a,b)=gcd(|a|,|b|)=gcd(a,b-a)C实现:typede... 阅读全文
posted @ 2015-03-24 23:21 寻找&星空の孩子 阅读(269) 评论(0) 推荐(0)