显然当且仅当$\gcd(i,j)=1$时才对答案有贡献,化简得\[\begin{eqnarray*}ans&=&\sum_{i=1}^n\sum_{j=1}^i\mu(ij)[\gcd(i,j)=1]\\ &=&\sum_{i=1}^n\sum_{j=1}^i\mu(ij)\sum_{d|i,d.....
分类:
其他好文 时间:
2015-12-21 18:29:12
阅读次数:
142
B. The Best Gift Emily's birthday is next week and Jack has decided to buy a present for her. He knows she loves books so he goes to the local booksh....
分类:
其他好文 时间:
2015-12-20 01:51:17
阅读次数:
192
对于这题本人刚开始的时候觉得应该用DFS来解决实现这个问题,但由于本人对于DFS并不是太熟,所以就放弃了这个想法;但又想了想要按照这个要求实现问题则必须是黑白相间,然后把是字符是'B'或'W'改为'-',即可;下面贴一下我的代码吧 1 #include 2 #include 3 #include 4...
分类:
其他好文 时间:
2015-12-19 00:03:21
阅读次数:
254
1. git init 创建一个仓库2. git config user.name zcc 告诉git你是zcc3. git config user.email 976325486@qq.com 配置我的邮箱4. git config --global user.name zcc 加一个--glo....
分类:
其他好文 时间:
2015-12-11 22:13:39
阅读次数:
132
一、NSArray1.1 简单创建方法由难到简 NSArray *arr = [[NSArray alloc] init]; NSArray *arr = [NSArray arrayWithObject:@"zcc"];// 数组中的nil是结束符 NSArray *arr...
分类:
其他好文 时间:
2015-12-11 14:45:46
阅读次数:
253
Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which cou...
分类:
其他好文 时间:
2015-12-06 11:28:02
阅读次数:
156
ArrayTime Limit: 20 SecMemory Limit: 256 MB题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5587DescriptionVicky is a magician who loves math. She has gr...
分类:
其他好文 时间:
2015-11-29 21:20:44
阅读次数:
368
C. Marina and VasyaMarina loves strings of the same length and Vasya loves when there is a third string, different from them in exactly t characters. ...
分类:
其他好文 时间:
2015-11-27 00:41:56
阅读次数:
236
1.CDNJShttps://cdnjs.com/librariesFork me on GitHub Everyone loves theGoogle CDNright? EvenMicrosoft runs their own CDN. The problem is, they only hos...
分类:
Web程序 时间:
2015-11-21 00:23:37
阅读次数:
315
DZY Loves Topological SortingProblem DescriptionA topological sort or topological ordering of a directed graph is a linear ordering of its vertices su...
分类:
其他好文 时间:
2015-11-10 20:55:05
阅读次数:
257