码迷,mamicode.com
首页 >  
搜索关键字:prime    ( 2475个结果
hdu2098 分拆素数和 素数筛
将一个偶数拆成两个素数的和,欧拉筛暴力 1 #include<stdio.h> 2 #include<string.h> 3 #define N 10001 4 int prime[10001]; 5 bool check[10001]; 6 int n,i,ans,tot=0,j; 7 8 voi ...
分类:其他好文   时间:2017-03-19 11:06:42    阅读次数:197
素筛模板
1 #include 2 #include 3 4 #define MAX_N 10000000 5 6 using namespace std; 7 8 bool flag[MAX_N]; 9 int prime[MAX_N]; 10 11 void solve() 12 { 13 memset(... ...
分类:其他好文   时间:2017-03-18 23:43:50    阅读次数:254
UVA10200 Prime Time
1 /* 2 UVA10200 Prime Time 3 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1141 4 素数 概率论 暴力 5 6 输出的时... ...
分类:其他好文   时间:2017-03-17 19:21:49    阅读次数:226
软测第三次作业
/******************************************************* * Finds and prints n prime integers * Jeff Offutt, Spring 2003 ****************************** ...
分类:其他好文   时间:2017-03-15 16:48:14    阅读次数:183
uva 11825
Miracle Corporations has a number of system services running in a distributed computer system which is a prime target for hackers. The system is basic ...
分类:其他好文   时间:2017-03-15 00:29:20    阅读次数:181
Use the following method printPrimes() for questions a-d (inside the textbook)
1. Codes from the textbook /******************************************************* * Finds and prints n prime integers * Jeff Offutt, Spring 2003 *** ...
分类:Windows程序   时间:2017-03-14 22:56:49    阅读次数:263
软件测试-hw3
int curPrime; // Value currently considered for primeness 8. int numPrimes; // Number of primes found so far. 9. boolean isPrime; // Is curPrime prime ...
分类:其他好文   时间:2017-03-14 21:09:40    阅读次数:194
[转]opencv2-新特性及Mat
opencv2-新特性及Mat 转:http://www.cnblogs.com/shouhuxianjian/p/4529192.html 本文参照《opencv_2.4.9tutorial》的core部分完成。因为功力还不足以学习侯捷那种大师一样去深入浅出的解析opencv的源码,也只能先学会怎 ...
分类:其他好文   时间:2017-03-14 15:45:23    阅读次数:486
复习基础素数
#include<iostream> #include<cstdio> #include<cmath> #define maxn 100009 using namespace std; typedef long long ll; int check_prime(int x)// 普通的素数判定 这里 ...
分类:其他好文   时间:2017-03-13 20:31:03    阅读次数:132
C++ Primer 第四版课后练习解答 习题1.19
注意:本随笔是直接参考《C++Primer(第四版)习题解答(完整版)》中的。此处主要是便于本人以后反复阅读。 习题1.19 如果上题给定的数1000和2000,程序将产生什么结果?修改程序,使每一行输出不超过10个数。 【解答】 用变量count 记录输出的数的个数;若count的值为10的整数倍 ...
分类:编程语言   时间:2017-03-13 19:19:33    阅读次数:184
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!