摘要:
1656D - K-good n is k-good if and only if $ n \geq 1 + 2 + \ldots + k = \frac{k(k+1)}{2}.$ \(n \equiv 1 + 2 + \ldots + k \equiv \frac{k(k+1)}{2} \pmod 阅读全文
摘要:
树,dp,组合数 #include <bits/stdc++.h> //#pragma GCC optimize(2) using namespace std; const int N = 1e5 + 7; const int mod = 998244353; typedef long long L 阅读全文