Protected: 历年 NOI 试题报告 This content is password protected. To view it please enter your password below: Password:
P1447:「NOI2010」能量采集题解 解法 这道题是一道裸题,考察莫比乌斯反演和 Dirichlet 卷积的知识。 在这里我们规定\(n<m\),这两者调换不会对答案产生影响。然后我们来观察这个计数规律,发现每一个点对答案的贡献至少为\(1\),附加的贡献其实就是当前线段上除了本身的整点(整数坐标点)个数的两倍,换句话说就是: \[ ans = \sum_{i = 1}^n \sum_{j = 1}^m 1 + 2( gcd(i, j) – 1 ) \] Continue reading →