深夜无事可干啊 C++ include using namespace std; const int maxn = 1e6+11; typedef long long ll; bitset isnprime; int prime[maxn]; int sai(int n){ isnprime[0]= ...
分类:
其他好文 时间:
2018-01-13 11:04:03
阅读次数:
144
pallord-rho模板 传送门 不能srand,不能srand,不能srand 为此RE了40min //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdi ...
分类:
其他好文 时间:
2018-01-10 00:07:15
阅读次数:
185
题意 $求ans=\sum_{i=1}^{n}\sum_{j=1}^{n}lcm(i, j)$ n,m define RG register define IL inline define Fill(a, b) memset(a, b, sizeof(a)) using namespace std; ...
分类:
其他好文 时间:
2018-01-09 20:10:36
阅读次数:
156
题目链接 Prime Gift 题意 给定一个素数集合,求第k小的数,满足这个数的所有质因子集合为给定的集合的子集。 保证答案不超过$10^{18}$ 考虑二分答案。 根据折半的思想,首先我们把这个集合的数分成两组。 然后分别生成这两组质数所能表示出的正整数的集合。 然后把这个集合sort一下,我们 ...
分类:
其他好文 时间:
2018-01-07 00:49:53
阅读次数:
156
PAT 1015. Reversible Primes A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in t ...
分类:
其他好文 时间:
2018-01-05 22:33:29
阅读次数:
217
1.install centos7.32.install quartus_prime_complete : quartus, ocl sdk for fpga, component3.environment variableexport ALTERAOCLSDKROOT="/home/wchao/i ...
分类:
其他好文 时间:
2018-01-05 11:07:15
阅读次数:
140
Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1 * p2^k2 *…*pm^km. Input Specif ...
分类:
其他好文 时间:
2018-01-01 16:51:31
阅读次数:
176
Description Input 第一行:CAS,代表数据组数(不大于350),以下CAS行,每行一个数字,保证在64位长整形范围内,并且没有负数。你需要对于每个数字:第一,检验是否是质数,是质数就输出Prime 第二,如果不是质数,输出它最大的质因子是哪个。 第一行:CAS,代表数据组数(不大于 ...
分类:
编程语言 时间:
2017-12-30 20:04:54
阅读次数:
190
1、书单: 核弹头推荐 C++必读书单 http://coredumper.cn/index.php/2017/05/21/c_plus_plus_booklist/ C++程序设计:原理与实践(基础篇)(原书第2版)(Programming: Principles and Practice Usi ...
分类:
编程语言 时间:
2017-12-26 15:18:59
阅读次数:
129
题目描述 Z小镇是一个景色宜人的地方,吸引来自各地的观光客来此旅游观光。Z小镇附近共有N个景点(编号为1,2,3,…,N),这些景点被M条道路连接着,所有道路都是双向的,两个景点之间可能有多条道路。也许是为了保护该地的旅游资源,Z小镇有个奇怪的规定,就是对于一条给定的公路Ri,任何在该公路上行驶的车 ...
分类:
其他好文 时间:
2017-12-25 23:23:55
阅读次数:
157