摘要:
"题目链接" ; solution: 根据画图模拟可以知道除第一次纯下降 其余每次都是一半一半的增加 S=h+h+h/2+h/4+h/8+...; 即S=h+2h=3h cpp include using namespace std; const int mod=1e9+7; long long a 阅读全文
摘要:
I COOL i like sky i like sunshine i do picnic in spring with happy and laughing the good day is Monday is a beautiful beginning of every week i wanna 阅读全文
摘要:
"题目链接" 思路:按题目推一点点可以得出答案为 sigma (i k) n/i+d(n%i =k) cpp include using namespace std; const int N = 1e7+10; const int mod = 1e9+7; int n,k; int main(){ 阅读全文
摘要:
"题目链接" 思路:dp,f[i]表示构成i所需要的最小步数 cpp //swj么么哒 include using namespace std; int n; const int N = 1000000; int f[N],mi[N]; int cnt=0; int main() { cin n; 阅读全文
摘要:
"题目链接" 题目大意 求每个点对的lca深度的和 以每一层分析,得出通式 由于1e9的数据范围要化简表达式得到O(能过) 瞎搞后就是2^(2n+2) (4n+2) 2^n 2 code: cpp include using namespace std; const long long mod = 阅读全文