牛客827921411号
牛客827921411号
全部文章
分类
题解(3)
归档
标签
去牛客网
登录
/
注册
Intolter_blog
全部文章
(共3篇)
分析通项
显然,当 时, 。 对 ,只需要经过三步就可以成功: 把上面的 n-1 对圆盘移到 B 柱上; 把最下面的一对圆盘移到 C 柱上; 把 B 柱上的 n-1 对圆盘移到 C 柱上。 故有。 可以化为 。 由等比数列的通项公式可知, 。 代码: #include <iostream> ...
2020-02-05
1
606
上个代码
这道题我没有压位的高精度都能在几十ms内ak,看来高精度的题的确效率要求是比较宽松的。 #include <algorithm> #include <iostream> #include <string> #include <vector> usin...
2020-02-05
0
603
使用欧拉筛解这道题
#include <algorithm> #include <iostream> #include <vector> using namespace std; vector<int> get_primes_less_than(int n) { ...
2020-02-04
0
774