摘要: #includeusing namespace std;mapm;int a[200000+5];int main(){ int i,n,tot; string s; while(~scanf("%d",&n)) { m.clear(); ... 阅读全文
posted @ 2015-08-26 12:29 xryz 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 题意是求a到b的闭区间内有多少个数与n互质,考虑到数据范围比较大,所以我们先用欧拉函数的方式将n的因子分解出来。对于每个因子我们采用dfs来组合他们,并求出范围内和他们不互质的数的个数。这里我们采用容斥原理来处理重复。#includeusing namespace std;typed... 阅读全文
posted @ 2015-08-26 10:45 xryz 阅读(110) 评论(0) 推荐(0) 编辑