热身赛

校第一次热身赛

A.数列倒序 #include <bits/stdc++.h> using namespace std; const int N = 10010; int a[N]; int main() { for(int i = 1; i <= 10 ; i ++) cin >> a[i]; for(int i ......
热身赛 第一次

校 第三次热身赛

A.Buy Lottery Tickets 根据题意直接进行暴力dfs,因为一个return 错了四次 ; #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 10; int a[N], ans[N]; bool st[ ......
热身赛

2023 合肥站 热身赛 B Problem F. Flower’s Land 换根dp 依赖背包

传送门。 求出包含某个点连通块大小为K的权值和最大值。 钦定1为根节点,只求根节点的答案,其实是一个依赖性01背包问题可以$nk$的时间内解决。 考虑进行换根操作,由于背包是取max的背包没办法进行背包的删除,然而取前后缀背包背包的合并为$k^2$复杂度过高。 当时还有一个想法是点分树,但是维护的信 ......
热身赛 背包 Problem Flower 2023
共3篇  :1/1页 首页上一页1下一页尾页