摘要: # [SMU Summer 2023 Contest Round 7](https://codeforces.com/group/L9GOcnr1dm/contest/464081) ## [A. Two Rival Students](https://codeforces.com/group/L9 阅读全文
posted @ 2023-07-28 20:01 Ke_scholar 阅读(25) 评论(0) 推荐(0)
摘要: 23暑假友谊赛No.2 A-雨_23暑假友谊赛No.2 (nowcoder.com) #include <bits/stdc++.h> using namespace std; signed main() { ios::sync_with_stdio(false);cin.tie(nullptr); 阅读全文
posted @ 2023-07-26 19:48 Ke_scholar 阅读(21) 评论(0) 推荐(0)
摘要: SMU Summer 2023 Contest Round 6 A. There Are Two Types Of Burgers 从0枚举到汉堡的最大个数,取最大值 #include <bits/stdc++.h> #define int long long using namespace std 阅读全文
posted @ 2023-07-25 15:57 Ke_scholar 阅读(31) 评论(0) 推荐(0)
摘要: # [Dashboard - Codeforces Round 886 (Div. 4) - Codeforces](https://codeforces.com/contest/1850) ## [A. To My Critics](https://codeforces.com/contest/1 阅读全文
posted @ 2023-07-24 19:47 Ke_scholar 阅读(84) 评论(0) 推荐(0)
摘要: # Toyota Programming Contest 2023#4(AtCoder Beginner Contest 311) ## [A - First ABC (atcoder.jp)](https://atcoder.jp/contests/abc311/tasks/abc311_a) * 阅读全文
posted @ 2023-07-24 10:25 Ke_scholar 阅读(56) 评论(0) 推荐(0)
摘要: 6930. 检查数组是否是好的 - 力扣(LeetCode) 首先判断数组长度是不是最大值 + 1, 然后排个序,判断0到n - 2是不是都是1到最大值的一个排列,满足这些返回true就行了 class Solution { public: bool isGood(vector<int>& num) 阅读全文
posted @ 2023-07-23 18:50 Ke_scholar 阅读(20) 评论(0) 推荐(0)
摘要: 第二次比赛题解 P1138 第 k 小整数 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) 主要了解set的用法,set会自动去重和排序 #include <bits/stdc++.h> using namespace std; signed main() { ios::sync_ 阅读全文
posted @ 2023-07-22 18:50 Ke_scholar 阅读(49) 评论(0) 推荐(0)
摘要: SMU Summer 2023 Contest Round 5 A. Points in Segments \(\mathcal{O}(n \times m)\) 做法数据范围小,直接把每次的\(l - r\)跑一遍标记一下,最后跑一遍循环统计哪些没有被标记的并且输出就好了 #include <bi 阅读全文
posted @ 2023-07-21 17:03 Ke_scholar 阅读(14) 评论(0) 推荐(0)
摘要: 时间复杂度 \(\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{ 阅读全文
posted @ 2023-07-21 11:50 Ke_scholar 阅读(63) 评论(0) 推荐(0)
摘要: 23暑假友谊赛(牛客小白月赛23) A-马猴烧酒 注意到他给的行是一个比较小的数,所以我们可以去对行进行一个搜索,每次去搜索将某些行消灭后再去找列里边有哪些需要单独消灭的,这里我们可以将需要消灭的列存入一个set里边,这样即使每次碰到重复的列也不用担心了,如果set的size小于给定的b次的话,说明 阅读全文
posted @ 2023-07-20 11:30 Ke_scholar 阅读(48) 评论(0) 推荐(0)