摘要: Problem A. 签到啦 从大到小排序,累加大于行李w时输出下标即可 int ans; void solve() { cin >> n >> m; int ans = 0; vector<int> a(n); for(int i = 0;i < n;i ++){ cin >> a[i]; } s 阅读全文
posted @ 2023-05-14 13:32 Ke_scholar 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 前言 更详细题解可以参考咱学长的( 2023 SMU RoboCom-CAIP 选拔赛.zip A. 小斧头 f_k 表示满足条件的j = k 的(i,j)对的数量.如上图中第四行即为f1至f5的元素,f1 = 1即有(1,1)满足条件,f2 = 2即有(1,2),(2,2)满足条件,后面同理,然后 阅读全文
posted @ 2023-05-14 13:06 Ke_scholar 阅读(21) 评论(0) 推荐(0) 编辑
摘要: M. Different Billing #include <map> #include <set> #include <cmath> #include <queue> #include <cstdio> #include <vector> #include <climits> #include < 阅读全文
posted @ 2023-05-14 12:49 Ke_scholar 阅读(13) 评论(0) 推荐(0) 编辑
摘要: B. Contest Preparation 对n<=m和n==0时特判一下 #include <iostream> #include <cstdio> #include <algorithm> #include <string> #include <cstring> #include <vecto 阅读全文
posted @ 2023-05-14 12:47 Ke_scholar 阅读(27) 评论(0) 推荐(0) 编辑