码迷,mamicode.com
首页 >  
搜索关键字:prime    ( 2475个结果
HDU 5317(2015D)
RGCDQ Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1320    Accepted Submission(s): 573 Problem Description Mr. Hdu is interested...
分类:其他好文   时间:2015-07-29 19:13:19    阅读次数:191
poj 1258 Agri-Net【最小生成树(prime算法)】
Agri-NetTime Limit:1000MSMemory Limit:10000KTotal Submissions:44827Accepted:18351DescriptionFarmer John has been elected mayor of his town! One of his...
分类:编程语言   时间:2015-07-29 19:05:20    阅读次数:132
BZOJ 1101: [POI2007]Zap( 莫比乌斯反演 )
求 answer = ∑ [gcd(x, y) = d] (1 using namespace std;const int maxn = 50009;bool check[maxn];int mu[maxn], prime[maxn], N = 0;void init() { memset(chec...
分类:其他好文   时间:2015-07-29 18:58:15    阅读次数:159
2015.07.28 (3)
做多校被虐成狗了---什么都不会啊~~还是觉得把能够想懂一点的,不管是看的别人的题解或者代码的,还是看的标程的,都记录一下--加油------1001 Magician1002 RGCDQ先筛素数,然后记录prime[1] = 2;prime[2] = 3;prime[3] = 5;prime[4]...
分类:其他好文   时间:2015-07-29 11:56:56    阅读次数:107
POJ 3126 Prime Path
给定两个四位素数a b,要求把a变换到b变换的过程要保证 每次变换出来的数都是一个 四位素数,而且当前这步的变换所得的素数 与 前一步得到的素数 只能有一个位不同,而且每步得到的素数都不能重复。求从a到b最少需要的变换次数。无法变换则输出Impossible输入:第一行 是一个数T 表示下面有T个测...
分类:其他好文   时间:2015-07-29 10:13:04    阅读次数:139
【leetcode】204 - Count Primes
Description:Count the number of prime numbers less than a non-negative number,n.Hint:Let's start with aisPrimefunction. To determine if a number is pr...
分类:其他好文   时间:2015-07-29 00:34:37    阅读次数:138
素环数 Prime Ring Problem ,UVa 524
DescriptionA ring is composed of n (even number) circles as shown in diagram. Put natural numbers into each circle separately, and the sum of numbers....
分类:其他好文   时间:2015-07-28 21:01:59    阅读次数:116
南阳oj 语言入门 素数 题目169 素数距离 题目24
?? 素数  题目169 #include  #include int main(){ int prime(int a);  int i,j,n,rd,ld,p;  scanf("%d",&n);  while(n--){  int num,lnum,rnum;  scanf("%d",&num);  if(num==1){  printf("2\n");  contin...
分类:编程语言   时间:2015-07-28 10:53:20    阅读次数:132
POJ 2417/BZOJ 3239(Discrete Logging-BSGS)[Template:数论]
Discrete Logging Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 4236   Accepted: 1948 Description Given a prime P, 2 31, an integer B, 2 BL == N (mod...
分类:其他好文   时间:2015-07-28 00:51:53    阅读次数:111
(easy)LeetCode 204.Count Primes
Description:Count the number of prime numbers less than a non-negative number,n.Credits:Special thanks to@mithmattfor adding this problem and creating...
分类:其他好文   时间:2015-07-27 20:53:48    阅读次数:194
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!