码迷,mamicode.com
首页 >  
搜索关键字:prime    ( 2475个结果
经常使用虚拟现实仿真软件总汇(zz)
经常使用虚拟现实仿真软件总汇(zz)http://hi.baidu.com/busycai/blog/item/fe57e41e5f25fa1c403417b2.html2007年09月07日 星期五 17:37视景驱动类: OpenGVS 4.5 Vega 3.7 Vega Prime 1...
分类:其他好文   时间:2015-02-20 15:14:57    阅读次数:203
SGU 116 Index of super-prime 数论+完全背包+输出方案
第一次写背包问题的【输出方案】
分类:其他好文   时间:2015-02-19 22:59:54    阅读次数:374
HDU 1241 Prime Ring Problem
#include #include #include #include #define maxn 25 #define inf 0x3f3f3f3f using namespace std; int n; int a[maxn]; bool vis[maxn]; bool prime(int n){ for(int i=2;i*i<=n;i++){ if(n%i==0)re...
分类:其他好文   时间:2015-02-18 14:07:38    阅读次数:160
poj 3006 Dirichlet's Theorem on Arithmetic Progressions
DescriptionIfaanddare relatively prime positive integers, the arithmetic sequence beginning withaand increasing byd, i.e.,a,a+d,a+ 2d,a+ 3d,a+ 4d, ......
分类:其他好文   时间:2015-02-17 23:33:27    阅读次数:134
hdu 2138 How many prime numbers
How many prime numbersTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7017Accepted Submission(s): ...
分类:其他好文   时间:2015-02-17 17:36:16    阅读次数:128
线筛 初见
o(n)的复杂度,筛出各种神奇。bzoj2190仪仗队#include#includeusing namespace std;int phi[40001]={0},prime[40001]={0};bool flag[40001]={false};void work(int n){ int i...
分类:其他好文   时间:2015-02-16 18:19:08    阅读次数:147
SPOJ Problem 2: Prime Generator
嗯。。在SPOJ上刷的第二题。一开始不知道哪错了,后来发现i出现了两遍。。因为m#include#includeint n,i,j,t,m,k,tot;int a[100005],b[4000];int prime[40000];int shai(int s){ int i,j; mem...
分类:其他好文   时间:2015-02-14 22:31:29    阅读次数:152
高效素数判断
bool prime(int n){ int i = 7, j, q; if(n == 1) return false; if(n == 2 || n == 5 || n == 3) return true; if(n % 2 == 0 || n % 3 == 0 || ...
分类:其他好文   时间:2015-02-14 11:00:45    阅读次数:130
hdu 1016 Prime Ring Problem DFS解法 纪念我在杭电的第一百题
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime. Note: the number of first circle should always be 1. Input n (0 < n < 2...
分类:其他好文   时间:2015-02-12 22:56:33    阅读次数:437
【史前巨坑】数论模板整合
跪了一下午数论 整理了一下数论模板 这是个史前巨坑,有空慢慢填 #include #include #include #include #include #define MAXN 1000000 using namespace std; bool not_prime[MAXN]; int prime_number[MAXN]; int nu; int factor[MAXN];//顺手记录一...
分类:其他好文   时间:2015-02-12 21:29:22    阅读次数:178
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!