2022年10月23日

AcWing1016 最大上升子序列和

摘要: 原题链接 其实就是在原本的Lis的基础上,将求的数量变成了求最大的和 #include <bits/stdc++.h> #define pb push_back #define fi first #define se second #define all(x) (x).begin(), (x).en 阅读全文

posted @ 2022-10-23 19:40 chelly酱 阅读(21) 评论(0) 推荐(0)

AcWing1012 友好城市

摘要: 原题链接 /** * @Author: chelly * @Date: 2022-10-23 19:29:52 * * 对南北海岸随便一个进行从小到大的排序,然后对另一边做lis, * 如果另一边大小顺序不匹配就会出现交叉,就非法 */ #include <bits/stdc++.h> #defin 阅读全文

posted @ 2022-10-23 19:35 chelly酱 阅读(25) 评论(0) 推荐(0)

导航