Description:Count the number of prime numbers less than a non-negative number,n 1 int countPrimes(int n) { 2 int i,j; 3 bool *primer = malloc(...
分类:
其他好文 时间:
2015-05-15 01:17:42
阅读次数:
104
Again Prime? No time.
Input: standard input
Output: standard output
Time Limit: 1 second
The problem statement is very easy. Given a number n you have to determine the largest power of m, not ne...
分类:
其他好文 时间:
2015-05-14 20:37:11
阅读次数:
118
Again Prime? No time.Input: standard inputOutput: standard outputTime Limit: 1 secondThe problem statement is very easy. Given a number n you have to ...
分类:
其他好文 时间:
2015-05-14 20:18:06
阅读次数:
128
#include #include #include using namespace std;int main(){ bool prime; int m,k,i,n=0; for (m=101;m<=200;m=m+2) //偶数必然不是素数,所以不需要检验 { prime = true; ...
分类:
其他好文 时间:
2015-05-14 20:17:03
阅读次数:
107
问题描述自从我的双显卡的笔记本装上Ubuntu 14 后,风扇狂转、发热巨大。网上一搜索估计是显卡驱动不太行。最近英伟达的Nvidia Prime可以完美地切换双显卡,安装这个软件后,风扇就不会狂转,发热也没有那么大了。(我的电脑是G710+HD4000)安装Nvidia Prime
在“系统设置”–“软件和更新”中找到“附加驱动”。默认使用的是开源的 Nouveau 驱动。这里我们选Nvidia...
分类:
系统相关 时间:
2015-05-14 18:44:46
阅读次数:
162
题目链接:http://poj.org/problem?id=2689题意:给出一个区间[L, R],找出区间内相连的,距离最近和距离最远的两个素数对。其中(1 2 #include 3 typedef long long LL; 4 const int MAXN = 50000; 5 const....
分类:
其他好文 时间:
2015-05-14 13:50:40
阅读次数:
126
Kruscal Template :很裸的KruscalTemplate(求最小生成树中最长路,即最短路中最长路)//#pragma comment(linker, "/STACK:16777216") //for c++ Compiler#include #include #include #in...
分类:
其他好文 时间:
2015-05-14 13:45:47
阅读次数:
114
1。按照帖子中的步骤,安装了nvidia-331 nvidia-setting nvidia-prime http://jingyan.baidu.com/article/046a7b3efe8c58f9c27fa98b.html2. 重启后发现进不了图形登录界面了(屏幕一直在闪,一会儿黑屏,一会....
分类:
系统相关 时间:
2015-05-14 00:43:11
阅读次数:
220
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
最近正好需要统计下某项目代码行数,然后就找代码行数统计工具。以前找到过一个正则表达式,但是只有在VS2010下有用,VS2012和VS2013下的统计就不好使了。接着搜索了一下代码行数统计绿色工具免费版,看到花花绿绿的浮动窗口和卧虎藏龙的下载链接,感觉非常令人生厌,而且,有些国产软件下载总是让你一不...
分类:
其他好文 时间:
2015-05-12 22:20:25
阅读次数:
275