题意: 求有多少对质数(a,b)满足ausing namespace std;const int INF = 1000002;bool f[INF];int ok[80000],out[10000];int n, sum, ans;void sift (int n) { for (int i...
分类:
其他好文 时间:
2015-03-09 23:57:47
阅读次数:
151
pprime解题报告—— icedream61 博客园(转载请注明出处)-------------------------------------------------------------------------------------------------------------...
分类:
其他好文 时间:
2015-03-09 22:20:03
阅读次数:
136
crypt1解题报告—— icedream61 博客园(转载请注明出处)-------------------------------------------------------------------------------------------------------------...
分类:
其他好文 时间:
2015-03-09 14:16:56
阅读次数:
133
我想了很久了,后来还是把N分解质因数,枚举各种组合,反正也不多吧,按题目条件,然后就过了。#include #include #include #include #include #define LL __int64using namespace std; LL prime[1000...
分类:
其他好文 时间:
2015-03-09 12:24:21
阅读次数:
127
问题:输入两个整数 a 和 b(5 2 #include 3 using namespace std; 4 5 const int ARR_SIZE = 5951; 6 7 const int t[ARR_SIZE] = { 8 5, 7, ...
分类:
其他好文 时间:
2015-03-09 10:50:43
阅读次数:
433
详细题目点击:http://acm.hdu.edu.cn/showproblem.php?pid=1002
Problem Description
I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.
...
分类:
其他好文 时间:
2015-03-09 09:28:55
阅读次数:
178
Design an algorithm to find the kth number such that the only prime factors are 3, 5, and 7.The eligible numbers are like 3, 5, 7, 9, 15 ...ExampleIf ...
分类:
其他好文 时间:
2015-03-09 07:01:19
阅读次数:
183
#include #include #includeusing namespace std;//高效判定素数bool prime(int n){ if(n==2) return true; if(n%2==0) return false; int sqrtn=(int)sqrt((double)n)...
分类:
其他好文 时间:
2015-03-08 22:56:30
阅读次数:
171
注意结构体队列的使用,在队列中,一条完整的路径才是正确的,中间的歧路最后还是走不通转载:http://blog.csdn.net/yulanarti/article/details/1787971 ——> 说明sprintf()的作用注意 sprintf(num, "%d", cur.num);//...
分类:
其他好文 时间:
2015-03-08 22:55:58
阅读次数:
187
指针与引用的区别:1、指针本身就是一个对象,允许对指针赋值和拷贝,而且在指针的生命周期内它可以先后指向几个不同的对象;其二:指针无需在定义时赋值。指针在块作用域内定义如果没有被初始化,也将拥有一个不确定的值。 空指针: 得到空指针最直接的办法就是用字面值nullptr来初始化指针,这是C+ ...
分类:
编程语言 时间:
2015-03-08 15:35:48
阅读次数:
135