码迷,mamicode.com
首页 >  
搜索关键字:prime    ( 2475个结果
POJ-2689 Prime Distance (两重筛素数,区间平移)
Prime DistanceTime Limit:1000MSMemory Limit:65536KTotal Submissions:13961Accepted:3725DescriptionThe branch of mathematics called number theory is abo...
分类:其他好文   时间:2015-08-04 10:54:09    阅读次数:96
C/C++ Prime学习要点1——实现memcpy库函数
实现一个Memcpy函数。 Memcpy函数用于 把资源内存(src所指向的内存区域) 拷贝到目标内存(dest所指向的内存区域); 拷贝多少个?有一个size变量控制拷贝的字节数。 函数原型:void *memcpy(void *dest, void *src, unsigned int count); 用法:(1)可以拷贝任何类型的对象,因为函数的参数类型是void*(未定义类型指针)...
分类:编程语言   时间:2015-08-04 09:26:23    阅读次数:203
【算法】米勒-拉宾素性检验
Prime or Not: Given the number, you are to answer the question: "Is it prime?" Input: t – the number of test cases, then t test cases follows. [t ≤ 500] Each line contains one integer: N [2 ≤ N ≤ 2...
分类:编程语言   时间:2015-08-04 08:13:41    阅读次数:480
NOJ 2079 Prime (莫比乌斯反演)
NOJ 2079 Prime (莫比乌斯反演基础题)...
分类:其他好文   时间:2015-08-04 00:42:07    阅读次数:113
[leedcode 204] Count Primes
Description:Count the number of prime numbers less than a non-negative number,n.public class Solution { public int countPrimes(int n) { //筛选...
分类:其他好文   时间:2015-08-04 00:15:09    阅读次数:95
Prime Ring Problem
Prime Ring ProblemTime Limit : 4000/2000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 18Accepted Submission(s) : 7Probl...
分类:其他好文   时间:2015-08-03 22:29:13    阅读次数:148
BFS POJ 3126 Prime Path
题目传送门 1 /* 2 题意:从一个数到另外一个数,每次改变一个数字,且每次是素数 3 BFS:先预处理1000到9999的素数,简单BFS一下。我没输出Impossible都AC,数据有点弱 4 */ 5 /*******************************...
分类:其他好文   时间:2015-08-02 21:21:00    阅读次数:117
UVA - 524 Prime Ring Problem(dfs回溯法) 解题心得
原题DescriptionA ring is composed of n (even number) circles as shown in diagram. Put natural numbersinto each circle separately, and the sum of numbers...
分类:其他好文   时间:2015-08-02 19:48:34    阅读次数:151
【容斥+素数】 HDU 2841 Visible Trees
通道题意:求一个区间[1,m]内与i的互质的数的个数。这里1#include #include typedef long long LL;const int maxn = 100010;LL ans;int n,m;int fac[maxn];int prime[maxn];int facCnt;v...
分类:其他好文   时间:2015-08-02 19:45:56    阅读次数:118
HDU 1016 Prime Ring Problem
DescriptionA 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 ...
分类:其他好文   时间:2015-08-02 18:13:37    阅读次数:124
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!