Welcome To Ke_schol|

Ke_scholar

园龄:2年2个月粉丝:30关注:10

随笔分类 -  SMU2023训练记录

关于时间复杂度
摘要:时间复杂度 \(\mathcal{O}(1) < \mathcal{O}(log_2{N}) < \mathcal{O}(Nlog_2{N})<\mathcal{O}(N^2) < \mathcal{O}(N^3)<\mathcal{O}(2^N)<\mathcal{O}(N!)<\mathcal{
31
0
0
23暑假友谊赛
摘要:23暑假友谊赛(牛客小白月赛23) A-马猴烧酒 注意到他给的行是一个比较小的数,所以我们可以去对行进行一个搜索,每次去搜索将某些行消灭后再去找列里边有哪些需要单独消灭的,这里我们可以将需要消灭的列存入一个set里边,这样即使每次碰到重复的列也不用担心了,如果set的size小于给定的b次的话,说明
21
0
0
第五次作业题解
摘要:第五次作业题解 P3156 【深基15.例1】询问学号 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) \(vector\)的输入 for (auto &i : a) cin >> i; for(int i = 0;i < n;i ++) cin >> a[i]; for(int
386
2
2
SMU Summer 2023 Contest Round 4
摘要:SMU Summer 2023 Contest Round 4 A. Telephone Number 满足第一个8后面存在10个字符即可 #include <bits/stdc++.h> #define endl '\n' #define int long long using namespace
13
0
0
SMU Summer 2023 Contest Round 3
摘要:SMU Summer 2023 Contest Round 3 A. Curriculum Vitae 题意就是要求\(1\)后面不能有\(0\)的情况下的子序列最长长度, 也就是求一个最长不下降子序列,不过由于这是个\(01\)序列,也可以分别做一个前缀和求出\(0\)的数量,后缀和求\(1\)的
10
0
0
SMU Summer 2023 Contest Round 2
摘要:SMU Summer 2023 Contest Round 2 A. Treasure Hunt 当\(x1 - x2\)的差值与\(y1-y2\)的差值都能被\(x,y\)整除时,且商之和为2的倍数就一定可以到达 #include<bits/stdc++.h> #define endl '\n'
8
0
0
SMU Summer 2023 Contest Round 1
摘要:SMU Summer 2023 Contest Round 1 A. The Contest 当 \(m\) 为 \(0\) 和 完成时间大于最后一个时刻时,说明都无法在规定条件内完成,输出\(-1\). 将时间段拆开放一个数组循环, 找到第一个大于等于完成时间的位置,若此时\(i\) 为奇数, 说
4
0
0
SMU Spring 2023 Contest Round 7
摘要:A. Programming Contest 签到题. 输入输出读完应该就懂了: 从y1枚举到y2,若枚举的年份不在停办年份里则答案加一 void solve() { int n,m; cin >> n; vector<int> a(N),year(N); cin >> m; for(int i =
10
0
0
SMU Spring 2023 Contest Round 6
摘要:E. Expenditure Reduction 从左右往右找到包含B字符的最近位置,然后从这个位置有从右到左找回去找到包含完所有B字符的位置,这个区间就是答案 #include <bits/stdc++.h> #define inf 0x3f3f3f3f #define endl '\n' #de
6
0
0
SMU Spring 2023 Contest Round 5(2023 (ICPC) Jiangxi Provincial Contest -- Official Contest)
摘要:题目链接 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
31
0
0
SMU Spring 2023 Contest Round 4(第 21 届上海大学程序设计联赛 春季赛)
摘要:A. Antiamuny wants to learn binary search 签到题. #include <map> #include <set> #include <cmath> #include <queue> #include <stack> #include <cstdio> #inc
63
0
0
SMU Spring 2023 Trial Contest Round 11
摘要:A. The Text Splitting 题意:给出字符串长度,给出p和q两种切割方式,任选其中一种,把字符串分割输出结果。 题解:先进行判断,p和q是否能整个的分割n,利用p和q的函数关系判断(见代码),再计算有几个p几个q,再进行输出即可 void solve() { cin >> n >>
5
0
0
SMU Spring 2023 Contest Round 3(2023年湘潭大学新生赛)
摘要: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
30
0
0
2023 SMU RoboCom-CAIP 选拔赛
摘要:前言 更详细题解可以参考咱学长的( 2023 SMU RoboCom-CAIP 选拔赛.zip A. 小斧头 f_k 表示满足条件的j = k 的(i,j)对的数量.如上图中第四行即为f1至f5的元素,f1 = 1即有(1,1)满足条件,f2 = 2即有(1,2),(2,2)满足条件,后面同理,然后
24
0
0
SMU Spring 2023 Contest Round 2(待补
摘要:M. Different Billing #include <map> #include <set> #include <cmath> #include <queue> #include <cstdio> #include <vector> #include <climits> #include <
16
0
0
SMU Spring 2023 Contest Round 1(MINEYE杯第十六届华中科技大学程序设计邀请赛)
摘要:B. Contest Preparation 对n<=m和n==0时特判一下 #include <iostream> #include <cstdio> #include <algorithm> #include <string> #include <cstring> #include <vecto
31
0
0
SMU Spring 2023 Trial Contest Round 10
摘要:A. Remove Duplicates 题意大概就是从左到右数字最先数完的最先输出 所以我们可以在输入每个数时记录每个数的出现次数,然后在循环一遍,每次该数字的次数减1,当数字的次数只剩1的时候就输出这个数字. #include <bits/stdc++.h> //#define inf 0x3f
8
0
0
SMU Spring 2023 Trial Contest Round 9
摘要:A. Wrong Subtraction 在k次操作里, 将n的最后一位数减1,如果是0就去掉,模拟一下就好了. #include <bits/stdc++.h> //#define inf 0x3f3f3f3f #define endl '\n' #define int long long usi
11
0
0
西南民族大学 春季 2023 训练赛 7
摘要:题目详情 - L1-1 人与神 (pintia.cn) 换成php直接输出( To iterate is human, to recurse divine. 题目详情 - L1-2 两小时学完C语言 (pintia.cn) void solve() { cin >> n >> k >> m; cou
15
0
0
西南民族大学 春季 2023 训练赛 6
摘要:题目详情 - L1-1 今天我要赢 (pintia.cn) void solve() { cout << "I'm gonna win! Today!" << endl; cout << "2022-04-23" << endl; } 题目详情 - L1-2 种钻石 (pintia.cn) void
19
0
0
点击右上角即可分享
微信分享提示
深色
回顶
收起