码迷,mamicode.com
首页 >  
搜索关键字:prime    ( 2475个结果
Kruscal 、 Prime Template
Kruscal Template :很裸的KruscalTemplate(求最小生成树中最长路,即最短路中最长路)//#pragma comment(linker, "/STACK:16777216") //for c++ Compiler#include #include #include #in...
分类:其他好文   时间:2015-05-14 13:45:47    阅读次数:114
ubuntu 15.04安装显卡驱动,出现登录界面闪烁得解决方案(dell 3420 )
1。按照帖子中的步骤,安装了nvidia-331 nvidia-setting nvidia-prime http://jingyan.baidu.com/article/046a7b3efe8c58f9c27fa98b.html2. 重启后发现进不了图形登录界面了(屏幕一直在闪,一会儿黑屏,一会....
分类:系统相关   时间:2015-05-14 00:43:11    阅读次数:220
humble number(hd1058)
Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15,...
分类:其他好文   时间:2015-05-13 00:42:55    阅读次数:113
HDU 2138 How many prime numbers
How many prime numbersTime Limit: 1000msMemory Limit: 32768KBThis problem will be judged onHDU. Original ID:213864-bit integer IO format:%I64d Java cl...
分类:其他好文   时间:2015-05-12 13:17:52    阅读次数:102
HDU_1016
#include #include #include #include using namespace std; const int Max = 40; bool prime[Max]; bool vis[Max]; int A[Max]; int n; void IsPrime() { prime[0] = prime[1] = 0; prime[2] = 1; for(i...
分类:其他好文   时间:2015-05-11 21:51:44    阅读次数:121
LeetCode:Count Primes
题目描述: Description: Count the number of prime numbers less than a non-negative number, n click to show more hints. 思路:利用厄拉多塞筛法。具体操作:先将 2~n 的各个数放入表中,然后在2的上面画一个圆圈,然后划去2的其他倍数;第一个既未画圈又没有被划去的数是3,将它画圈,...
分类:其他好文   时间:2015-05-11 16:08:03    阅读次数:126
解题报告 之 HOJ2276 SOJ2498 Count prime
HOJ2276, SOJ2498 ,Count prime,区间素数筛,数论 Given an integer interval [L, R](L <= R <= 2147483647, R - L <= 1000000), please calculate the number of prime(s) in the interval....
分类:其他好文   时间:2015-05-10 09:47:50    阅读次数:179
UVA 10200 Prime Time 暴力水题
一个简单的暴力水题,只是输出方式让人无语。。。 #include #include int prime(int n) { int i; for(i=2;i*i<=n;i++) { if((n%i)==0) return 0; } return 1; } int main() { int num[10010...
分类:其他好文   时间:2015-05-09 23:40:32    阅读次数:211
hdu 1016 Prime Ring Problem
dfs水题 #include #include #define maxn 20+5 #define pr 100000 using namespace std; int n; int visit[maxn]; int re[maxn]; int ans; int u[pr]={0}; void prime() { int i,j; u[0]=1,u[1]=1; for(i=2;i<pr;...
分类:其他好文   时间:2015-05-09 16:30:25    阅读次数:105
Count Primes
Description:Count the number of prime numbers less than a non-negative number,nclick to show more hints.References:How Many Primes Are There?Sieve of ...
分类:其他好文   时间:2015-05-09 13:11:21    阅读次数:119
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!