摘要:
普通的n^2的筛法居然比线性筛法快,不知道以后该用哪个了……View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 1000000bool prime[maxn];int main(){ //freopen("D:\\t.txt", "r", stdin); memset(prime, true, sizeof(prime)); for 阅读全文
posted @ 2011-03-01 09:30
undefined2024
阅读(239)
评论(0)
推荐(0)
摘要:
简单的考察输入输出的题。View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;int main(){ //freopen("D:\\t.txt", "r", stdin); int n, s; scanf("%d%d", &n, &s); s--; for (int i = 1; i <= n; i++) { s += 阅读全文
posted @ 2011-03-01 08:13
undefined2024
阅读(223)
评论(0)
推荐(0)

浙公网安备 33010602011771号