摘要:
AtCoder Beginner Contest 253 E - Distance Sequence 思路:前缀和优化DP 要求$ |a[i]-a[i+1]|>=k\( 定于\)dp[i][j]:\(前\)i\(个数以\)j\(结尾的合法序列数列 \) dp[i][j] += dp[i-1][1~( 阅读全文
摘要:
AtCoder Beginner Contest 320 A - Leyland Number 思路:直接快速幂 // AC one more times // nndbk #include <bits/stdc++.h> using namespace std; typedef long long 阅读全文
摘要:
AtCoder Beginner Contest 318 A - Full Moon 思路:等差数列求项数 // AC one more times // nndbk #include <bits/stdc++.h> using namespace std; typedef long long ll 阅读全文