随笔分类 - 数学
摘要:约瑟夫问题 准备了下初赛,然而发现有好多约瑟夫问题都不会... 首先是明确一下问题及其细节. 问题是有$n$个人,从$0$开始标号(这样接下来的运算会比较方面,因为%%%),围成环状,数到第$k$个人就杀掉,再继续数数,问最后留下的是哪个人. $k=2$的特殊情况. 我们考虑一轮杀下来,再重新编号的
阅读全文
摘要:http://www.matrix67.com/blog/archives/234
阅读全文
摘要:D. Winter is here time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output D. Winter is here time
阅读全文
摘要:懵逼乌斯反演//Hang in the air 首先以下断言成立! 1.ε(n)=∑d|nμ(d) 2.n=∑d|nφ(d) 第一类莫比乌斯反演 f(n)=Σd|ng(d) <=> g(d)=Σd|nμ(n/d)f(d) 第二类莫比乌斯反演 f(d)=Σd|ng(n) <=> g(d)=Σd|nf(
阅读全文
摘要:1289 - LCM from 1 to n Given an integer n, you have to find lcm(1, 2, 3, ..., n) lcm means least common multiple. For example lcm(2, 5, 4) = 20, lcm(3
阅读全文

浙公网安备 33010602011771号