HDU 1792 给了两个互质的数A,B,求不能用Ax+By(x =0,y =0)表示的最大的数和不能表示的数的个数 传送 HDU 2866 Special Prime 指存在n,m $n^3+p \cdot n^2=m^3$的素数p 求不大于L的Special Prime的个数 传送 HDU 10 ...
分类:
其他好文 时间:
2018-08-16 23:45:20
阅读次数:
232
[Arc080F]Prime Flip Description 你有无限多的“给给全”,编号为1,2,3,...。开始时,第x1,x2,...,xN个“给给全”是躺着的,其它的“给给全”是趴着的 你可以进行一些操作,每个操作大概是这样的: 选择一个不小于3的质数p,然后将连续的p个“给给全”翻过来 ...
分类:
其他好文 时间:
2018-08-14 20:01:44
阅读次数:
152
C++中的多位数组,严格来说是数组的数组。 初始化多维数组 多维数组的下标引用 指针和多维数组 对于多维数组中二级元素的声明需要格外注意,当然我们可以通过auto来代替这种声明,或者使用typedef来进行一次声明多次使用。 本节内容的全部代码 ...
分类:
编程语言 时间:
2018-08-13 20:59:47
阅读次数:
170
没有链接 描述: 给p,q,求a^2+b^2 = p q解的个数,p,q是素数 想锤死出题人的感觉 题解 首先这是个结论题 然后这是证明 代码 ...
分类:
其他好文 时间:
2018-08-13 15:57:36
阅读次数:
123
Description Given a positive integer N, your task is to calculate the sum of the positive integers less than N which are not coprime to N. A is said t ...
分类:
其他好文 时间:
2018-08-05 11:49:38
阅读次数:
127
Description Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given po ...
分类:
其他好文 时间:
2018-08-05 00:37:08
阅读次数:
120
[抄题]: Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary represen ...
分类:
其他好文 时间:
2018-08-04 21:38:30
阅读次数:
138
解析 当a和b满足$a = b \times prime$时,我们说a,b有冲突关系,将所有数看成是图中的顶点,那么a和b有冲突关系,就在a,b之间连一条边。题目是:给定一些数,从这些数中选出一些数组成一个集合,使这个集合中的每两个数都没有冲突关系,也就是每两个顶点之间都没有边,问这个集合最多可以有 ...
分类:
编程语言 时间:
2018-08-04 01:00:22
阅读次数:
176
虽然AK了但是手速不够快而且罚时爆炸QAQ.... A.Prime Ring Problem 找素数环,经典深搜问题,要注意找完排列再判断素数为超时,正确的做法是边搜边判断,注意输出格式== 1 #include <iostream> 2 #include <cstdio> 3 #include < ...
分类:
其他好文 时间:
2018-08-01 22:24:43
阅读次数:
192
K - Prime Ring Problem K - Prime Ring Problem K - Prime Ring Problem 题目大意是给出 1~n 个数 第一个数必定是 1 ,使得无论那两个相邻的数相加,都是质数(即大于1的自然数中,除了1和它本身以外不再有其他因数); 打印出所有可能 ...
分类:
其他好文 时间:
2018-08-01 17:16:33
阅读次数:
171