摘要: gcd(x,y)(1 gcd(x/k,y/k)=1,k是x的质因数 的个数 Σφ(x/k) (1 2 using namespace std; 3 typedef long long ll; 4 int phi[10000001],n; 5 bool unPrime[10000001]; 6 ll ... 阅读全文
posted @ 2014-11-01 17:27 AutSky_JadeK 阅读(265) 评论(0) 推荐(0)
摘要: ∵∑gcd(i, N)(1 gcd(x/ki,N/ki)=1 (1 2 #include 3 using namespace std; 4 typedef long long ll; 5 ll n,ans; 6 int phi(ll x) 7 { 8 ll res=x; 9 for(... 阅读全文
posted @ 2014-11-01 15:06 AutSky_JadeK 阅读(232) 评论(0) 推荐(0)
摘要: 判断堆:递归判断每个节点的孩子是否都比其父亲大(小)。判断BST:中序遍历是否有序。 1 #include 2 using namespace std; 3 #define lc (rtb[i-1]) {f2=0; break;}18 if(f2) return 1;19 retur... 阅读全文
posted @ 2014-11-01 08:09 AutSky_JadeK 阅读(226) 评论(0) 推荐(0)
TVアニメ「Charlotte(シャーロット)」公式サイト TVアニメ「Charlotte(シャーロット)」公式サイト