{"author_name":"h0rnet","width":"100%","title":"CFR 547 C. Mike and Foam ( Mobius Inversion )","author_url":"https://blog.hatena.ne.jp/h0rnet/","categories":["Codeforces","Mobius"],"provider_name":"Hatena Blog","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/h/h0rnet/20170313/20170313233433.png","provider_url":"https://hatena.blog","blog_url":"https://h0rnet.hatenablog.com/","url":"https://h0rnet.hatenablog.com/entry/2017/03/13/CFR_547_C__Mike_and_Foam_%28_Mobius_Inversion_%29","type":"rich","published":"2017-03-13 23:46:44","version":"1.0","description":"Problem - 547C - Codeforces\u984c\u610f\uff1a \u7d66 N \u500b\u6578\u5b57\u7684\u6578\u5217 A\u3002\u63a5\u8457 Q \u7b46\u64cd\u4f5c\uff0c\u6bcf\u6b21\u5c07 A[ idx ] \u53d6\u51fa / \u653e\u5165\u4e00\u500b\u6ac3\u5b50\u3002\u6c42\u6bcf\u6b21\u64cd\u4f5c\u5b8c\uff0c\u6ac3\u5b50\u88e1\u6709\u591a\u5c11\u7121\u5e8f\u5c0d\uff0c\u5176\u6700\u5927\u516c\u56e0\u6578\u70ba 1\u3002\u8cc7\u6599\u898f\u6a21\uff1a N, Q \u2264 2e5 max{ A } \u2264 5e5 TL: 2000 ms\u89e3\u6cd5\uff1a \u4ee4 p \u5e8f\u5217\u70ba\u7576\u524d\u6ac3\u5b50\u88e1\u7684\u503c\uff0cN \u70ba p \u5e8f\u5217\u7684\u5927\u5c0f\uff1a \u5728\u7d66\u5b9a\u7684\u6578\u64da\u7bc4\u570d\u5167\uff0c\u6bcf\u6b21\u64cd\u4f5c\u81f3\u591a\u53ea\u6703\u66f4\u6539 2^6 \u500b bai \u503c\uff0c\u56e0\u6b64\u66b4\u529b\u7dad\u8b77 bai \u503c\u548c\u7b54\u6848\u5373\u53ef\u3002\u6642\u9593 / \u7a7a\u9593\u8907\u96dc\u5ea6\uff1a O( MAXA lg MAXA + Q * 2^6 ) / O( MAXA ) #include <bits/st\u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fh0rnet.hatenablog.com%2Fentry%2F2017%2F03%2F13%2FCFR_547_C__Mike_and_Foam_%2528_Mobius_Inversion_%2529\" title=\"CFR 547 C. Mike and Foam ( Mobius Inversion ) - 0w1\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","blog_title":"0w1"}