随笔分类 -  数学方法:组合数学

摘要:因为论文的题解写得太好了,直接贴。 阅读全文
posted @ 2016-10-27 22:06 TenderRun 阅读(358) 评论(0) 推荐(0)
摘要:Description 上帝说,不要圆,要方,于是便有了这道题。由于我们应该方,而且最好能够尽量方,所以上帝派我们来找正方形 上帝把我们派到了一个有N行M列的方格图上,图上一共有(N+1)×(M+1)个格点,我们需要做的就是找出这些格点形 成了多少个正方形(换句话说,正方形的四个顶点都是格点)。但是 阅读全文
posted @ 2016-10-26 18:35 TenderRun 阅读(525) 评论(0) 推荐(0)
摘要:Necklace of Beads Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 7763 Accepted: 3247 Description Beads of red, blue or green colors are co 阅读全文
posted @ 2016-08-20 08:49 TenderRun 阅读(250) 评论(0) 推荐(0)
摘要:Description 神犇YY虐完数论后给傻×kAc出了一题 给定N, M,求1<=x<=N, 1<=y<=M且gcd(x, y)为质数的(x, y)有多少对 kAc这种傻×必然不会了,于是向你来请教…… 多组输入 神犇YY虐完数论后给傻×kAc出了一题 给定N, M,求1<=x<=N, 1<=y 阅读全文
posted @ 2016-07-27 21:38 TenderRun 阅读(117) 评论(0) 推荐(0)
摘要:题目描述: 对于给出的n个询问,每次求有多少个数对(x,y),满足a≤x≤b,c≤y≤d,且gcd(x,y) = k,gcd(x,y)函数为x和y的最大公约数。 输入格式: 第一行一个整数n,接下来n行每行五个整数,分别表示a、b、c、d、k 输出格式: 共n行,每行一个整数表示满足要求的数对(x, 阅读全文
posted @ 2016-07-26 16:53 TenderRun 阅读(206) 评论(0) 推荐(0)
摘要:Description 小 X 自幼就很喜欢数。但奇怪的是,他十分讨厌完全平方数。他觉得这些 数看起来很令人难受。由此,他也讨厌所有是完全平方数的正整数倍的数。然而 这丝毫不影响他对其他数的热爱。 这天是小X的生日,小 W 想送一个数给他作为生日礼物。当然他不能送一 个小X讨厌的数。他列出了所有小X 阅读全文
posted @ 2016-07-25 16:28 TenderRun 阅读(221) 评论(0) 推荐(0)
摘要:Cubes You are given 12 rods of equal length. Each of them is colored in certain color. Your task is to determine in how many different ways one can co 阅读全文
posted @ 2016-07-09 17:10 TenderRun 阅读(387) 评论(0) 推荐(0)
摘要:He's Circles He's Circles He wrote n letters "X" and "E" in a circle. He thought that there were 2n possibilities to do it, because each letter may be 阅读全文
posted @ 2016-07-09 16:02 TenderRun 阅读(819) 评论(0) 推荐(0)