摘要: ## [题目链接](https://acm.ecnu.edu.cn/contest/673/statements/) 因为都是有[官方题解](https://olencer.github.io/docs/社会活动/2023acm/四川省赛题解.pdf)的,咱这个蒟蒻就在记录一下赛时通过以及后来补得一 阅读全文
posted @ 2023-06-26 21:46 Ke_scholar 阅读(236) 评论(0) 推荐(0) 编辑
摘要: # [A. 选择 ](https://acm.ecnu.edu.cn/contest/665/problem/A/) **多造几组数据可以发现** ​ **$dp[n] = dp[n / 2] + 1$.** **假如一个序列为$\{1,2,\cdots,n\}$,那我们从$n/2$后都减去$n/2 阅读全文
posted @ 2023-06-26 20:57 Ke_scholar 阅读(36) 评论(0) 推荐(0) 编辑
摘要: A. Programming Contest 签到题. 输入输出读完应该就懂了: 从y1枚举到y2,若枚举的年份不在停办年份里则答案加一 void solve() { int n,m; cin >> n; vector<int> a(N),year(N); cin >> m; for(int i = 阅读全文
posted @ 2023-06-26 17:28 Ke_scholar 阅读(9) 评论(0) 推荐(0) 编辑
摘要: E. Expenditure Reduction 从左右往右找到包含B字符的最近位置,然后从这个位置有从右到左找回去找到包含完所有B字符的位置,这个区间就是答案 #include <bits/stdc++.h> #define inf 0x3f3f3f3f #define endl '\n' #de 阅读全文
posted @ 2023-06-24 17:22 Ke_scholar 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 题目链接 Problem A. Drill Wood to Make Fire S * V >= n即可 #include<bits/stdc++.h> #define int long long #define endl '\n' using namespace std; const int N 阅读全文
posted @ 2023-06-01 23:06 Ke_scholar 阅读(27) 评论(0) 推荐(0) 编辑
摘要: A. Antiamuny wants to learn binary search 签到题. #include <map> #include <set> #include <cmath> #include <queue> #include <stack> #include <cstdio> #inc 阅读全文
posted @ 2023-06-01 22:03 Ke_scholar 阅读(48) 评论(0) 推荐(0) 编辑
摘要: A. The Text Splitting 题意:给出字符串长度,给出p和q两种切割方式,任选其中一种,把字符串分割输出结果。 题解:先进行判断,p和q是否能整个的分割n,利用p和q的函数关系判断(见代码),再计算有几个p几个q,再进行输出即可 void solve() { cin >> n >> 阅读全文
posted @ 2023-06-01 18:12 Ke_scholar 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑