03 2024 档案

摘要:第 8 场 小白入门赛 第一题: 解题思路: 乘一下。 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<ll, ll>; #define fi first #define 阅读全文
posted @ 2024-03-23 21:48 value0 阅读(17) 评论(0) 推荐(0)
摘要:ABC 345 F - Many Lamps 解题思路: 每次选取一条边,要么亮两个,要么灭两个,要么一灭一暗。亮的个数的奇偶性不变,所以不可能亮奇数个。 考虑每个连通块。如果是偶数个一定能全亮,奇数个则最少一个不亮。 对于两暗的,需要时通过操作点亮是一定的。 考虑一明一暗时是加入边的操作意味什么: 阅读全文
posted @ 2024-03-17 17:09 value0 阅读(93) 评论(0) 推荐(0)
摘要:Codeforces Round 934 (Div. 2) A - Destroying Bridges 解题思路: 完全图每个点的连边数为\(n - 1\)。 \(k < n - 1\):都可到达。 \(k \geq n - 1\):将点\(1\)的边删完,只能呆在点\(1\)。 代码: #inc 阅读全文
posted @ 2024-03-17 14:02 value0 阅读(431) 评论(0) 推荐(0)
摘要:Codeforces Round 908 (Div. 2) A - Secret Sport 解题思路: 有一说一,没看很懂,感觉最后赢的就是赢了。。。 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; u 阅读全文
posted @ 2024-03-16 16:54 value0 阅读(24) 评论(0) 推荐(0)
摘要:Educational Codeforces Round 163 (Rated for Div. 2) A - Special Characters 解题思路: 一个相同的连续段会贡献两个特殊字符,所以答案一定是偶数,找个不同的数分隔开即可。 代码: #include <bits/stdc++.h> 阅读全文
posted @ 2024-03-16 08:09 value0 阅读(508) 评论(1) 推荐(0)
摘要:Codeforces Round 933 (Div. 3) A - Rudolf and the Ticket 解题思路: 暴力。 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; using pii = 阅读全文
posted @ 2024-03-12 22:29 value0 阅读(93) 评论(0) 推荐(0)
摘要:Toyota Programming Contest 2024#3(AtCoder Beginner Contest 344) A - Spoiler 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; us 阅读全文
posted @ 2024-03-10 02:13 value0 阅读(43) 评论(0) 推荐(0)
摘要:牛客小白月赛88 A 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<ll, ll>; typedef double db; #define fi first #defi 阅读全文
posted @ 2024-03-08 21:31 value0 阅读(42) 评论(0) 推荐(0)
摘要:Codeforces Round 932 (Div. 2) A - Entertainment in MAC 解题思路: 如果翻转字符小于原字符,那么一直翻转即可。 否则,翻转\(n - 1\)次,然后添加一次。 代码: #include <bits/stdc++.h> using namespac 阅读全文
posted @ 2024-03-06 12:15 value0 阅读(62) 评论(0) 推荐(0)
摘要:牛客周赛 Round 35 小红的字符串切割 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<ll, ll>; typedef double db; #define fi 阅读全文
posted @ 2024-03-03 21:58 value0 阅读(65) 评论(0) 推荐(0)
摘要:牛客周赛 Round 35 小红的字符串切割 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<ll, ll>; typedef double db; #define fi 阅读全文
posted @ 2024-03-03 18:06 value0 阅读(22) 评论(0) 推荐(0)
摘要:第 387 场周赛 将元素分配到两个数组中 I 解题思路: 暴力比较放置。 代码: class Solution { public: vector<int> resultArray(vector<int>& nums) { vector<int> a, b; int n = nums.size(); 阅读全文
posted @ 2024-03-03 15:28 value0 阅读(11) 评论(0) 推荐(0)
摘要:Codeforces Round 931 (Div. 2) A - Too Min Too Max 解题思路: 最大、最小、次大、次小。 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; using pii 阅读全文
posted @ 2024-03-02 01:09 value0 阅读(268) 评论(0) 推荐(0)
摘要:Codeforces Round 930 (Div. 2) A - Shuffle Party 解题思路: \(1\)会按着\(2\)的整数次幂往后跳。 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; u 阅读全文
posted @ 2024-03-01 00:35 value0 阅读(622) 评论(0) 推荐(1)