随笔分类 - CF
CF的比赛
摘要:记忆化数组记录从这个点的最长下降序列,然后乘以这个点的度,就是ans,维护即可。 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 1e5+10; const
阅读全文
摘要:水题 1 #include <cstdio> 2 #include <algorithm> 3 4 using namespace std; 5 6 int N,M,save[1000]; 7 8 int main() 9 { 10 scanf("%d%d",&N,&M); 11 for(int i
阅读全文
摘要:614A-Link/Cut Tree 比较水,注意64位int仍然可能溢出。 #include <cstdio> #include <algorithm> #include <cstring> using namespace std; typedef unsigned long long int L
阅读全文

浙公网安备 33010602011771号