摘要: 这是对HDU1085的扩展,注意数组范围要4倍的n C++ include using namespace std; const int maxn = 2333; int G[2][maxn],n; int main(){ while(scanf("%d",&n)^ 1){ memset(G,0,s 阅读全文
posted @ 2018-01-12 19:12 Caturra 阅读(147) 评论(0) 推荐(0)
摘要: 年轻人的第一道母函数入门题 C++ include using namespace std; const int maxn = 1000+2000+5000+1; define rep(i,j,k) for(int i = j; i a b c){ if(!a&&!b&&!c) break; mem 阅读全文
posted @ 2018-01-12 11:39 Caturra 阅读(125) 评论(0) 推荐(0)
摘要: f[n]:sigma(i,n),i using namespace std; const int maxn = 1e6+11; const int Limit = 1e6; typedef unsigned long long ll; ll phi[maxn]; void euler(int n){ 阅读全文
posted @ 2018-01-12 10:35 Caturra 阅读(123) 评论(0) 推荐(0)
摘要: ```C++ include using namespace std; const int maxn = 1e6+11; const int N = 1e6; typedef long long ll; bitset isnprime; ll prime2[maxn 2]; int sai(){ i 阅读全文
posted @ 2018-01-12 09:24 Caturra 阅读(141) 评论(0) 推荐(0)