codeforces replace 794g all

Educational Codeforces Round 160 (Rated for Div. 2) A~C

A. Rating Increase 题意: 将一个字符串分成两个整数a和b,要求没有前导0,且a < b 思路: 遍历字符串s,若当前位置不是0,则拆分字符串,比较大小 // #include <bits/stdc++.h> #include <iostream> #include <string ......
Educational Codeforces Round Rated 160

Educational Codeforces Round 160 (Rated for Div. 2)

基本情况 A题秒了。 B题卡了实在太久,BC题最后虽然都过了,但是耗时太久。感觉C对我来说更好写。 B. Swap and Delete 经典+3。 总是一条路偏要走到黑了才会想着换思路,早该换了。 一开始想了一大堆乱七八糟的思路,但都错了。 后面往简单了想,这题毕竟最后必须要左对齐的,直接从左往右 ......
Educational Codeforces Round Rated 160

【题解】CodeForces-1913

CodeForces-1913A Rating Increase 依题意模拟。 提交记录:Submission - CodeForces CodeForces-1913B Swap and Delete 交换免费就是能任意重排,从头开始尽量填相反的,剩下只能删去了。 提交记录:Submission ......
题解 CodeForces 1913

【题解】CodeForces-1905

CodeForces-1905A Constructive Problems 发现沿着对角线放就行了,答案是 \(\max(n+m)\)。 提交记录:Submission - CodeForces CodeForces-1905B Begginer's Zelda 最优操作每次删两个叶子(除了最后一 ......
题解 CodeForces 1905

Educational Codeforces Round 160 (Rated for Div. 2)

比赛录屏 \(A. Rating Increase\) https://codeforces.com/contest/1913/submission/237734923 \(B. Swap and Delete\) https://codeforces.com/contest/1913/submis ......
Educational Codeforces Round Rated 160

Educational Codeforces Round 160

总结 被edu撅飞力 只会前三题,掉绿指日可待 我这种彩笔还是不适合div.2 A 直接模拟,注意细节 #include<bits/stdc++.h> #define ll long long using namespace std; ll p[15] = {1}; void solve() { l ......
Educational Codeforces Round 160

Educational Codeforces Round 132 (Rated for Div. 2)

基本情况 AB秒了。C跨度有点太大,题解暂时都还没理解。 C. Recover an RBS Problem - C - Codeforces 待补题 ......
Educational Codeforces Round Rated 132

Attention Is All You Need

Attention Is All You Need * Authors: [[Ashish Vaswani]], [[Noam Shazeer]], [[Niki Parmar]], [[Jakob Uszkoreit]], [[Llion Jones]], [[Aidan N. Gomez]], ......
Attention Need All You Is

Codeforces Round 834 (Div. 3)

Codeforces Round 834 (Div. 3) A. Yes-Yes? 题意:就是Y后面跟e,e后面跟s,s后面跟Y #include <iostream> using namespace std; void solve() { string x; cin >> x; int l = x ......
Codeforces Round 834 Div

Codeforces Round 839 (Div. 3)

Codeforces Round 839 (Div. 3) A. A+B? 跳过太水了、、、、、 #include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int a,b; sc ......
Codeforces Round 839 Div

上海法院起诉自如租房价格欺诈全程记录分享 All In One

上海法院起诉自如租房价格欺诈全程记录分享 All In One 收集证据,打 12348 法律援助电话咨询,和解不成,正式起诉(起诉书、自诉、缴费、开庭、答辩状...) 自如租房电费欺诈 All In One ......
全程 法院 价格 All One

Educational Codeforces Round 131 (Rated for Div. 2)

基本情况 AB秒了。C知道是二分答案,check死活写不出来。 C. Schedule Management Problem - C - Codeforces 错误分析 这题比较绕,搞了一个对应关系,大脑转不过来。 写check的时候完全想不出合理的思路。 很明显的要用桶来计数,但是怎么用不知道了。 ......
Educational Codeforces Round Rated 131

[AGC016D] XOR Replace 题解

题目链接 点击打开链接 题目解法 很有思维难度的一道题 首先考虑简化操作(或者说用一种比较好的方法表示) 假设我们选择交换的位置为 \(x\),不难发现,操作等价于交换 \(sumxor\) 和 \(x\) 于是,有解的条件就好判了,即 \(\{b_i\}\subseteq \{a_i\}\bigc ......
题解 Replace 016D AGC 016

Educational Codeforces Round 159 (Rated for Div. 2)

Educational Codeforces Round 159 (Rated for Div. 2) A - Binary Imbalance 解题思路: 有一对\((0,1)\),那么\(0\)就能无限增长。 代码: #include <bits/stdc++.h> using namespac ......
Educational Codeforces Round Rated 159

Codeforces Round 915 (Div. 2)

基本情况 A题还没进入状态,卡了快10分钟。 B题一开始想复杂了,以为是树的直径,后面推出来发现针对叶子数目讨论就行了,正确思路出来太慢了(一个半小时)。 C题留了半个多小时,随便口胡了一个LIS思路,但是判断无解没思路。 C. Largest Subsequence Problem - C - C ......
Codeforces Round 915 Div

Educational Codeforces Round 134 (Rated for Div. 2)

基本情况 AB秒了。 C搞了一个错的二分答案,虽然过样例了。 C. Min-Max Array Transformation 错误分析 没有进一步推导性质,而是觉得数据单调递增估计是二分,然后就无脑写,实际上 check 的正确性没有保证。 bool check(int ind, int now) ......
Educational Codeforces Round Rated 134

Codeforces Round 817 (Div. 4)

基本情况 ABCD秒了。 E一眼二位前缀和,但是板子就是不熟,硬生生拖了半小时。 E. Counting Rectangles Problem - E - Codeforces 真没啥好说的 二位前缀和就是不熟练、不透彻。 挂篇博客复习 ......
Codeforces Round 817 Div

Codeforces Round 855 (Div. 3)

Codeforces Round 855 (Div. 3) A. Is It a Cat? 题意:要求: 字符串必须以只包含字母 "m "或 "M "的非空序列开始 必须紧跟由'e'或'E'字符组成的非空序列 必须紧接着仅由字符'o'或'O'组成的非空序列 必须紧接着是仅由字符'w'或'W'组成的非 ......
Codeforces Round 855 Div

Codeforces Round 863 (Div. 3)

Codeforces Round 863 (Div. 3) A. Insert Digit 题意:插入一个字母使得这个数字最大化 思路:只要从前往后便利就行 #include <iostream> using namespace std; void solve() { int n, k; cin > ......
Codeforces Round 863 Div

Codeforces Round 913 (Div. 3)

Codeforces Round 913 (Div. 3) A:ABC A. Rook 简单题,就两个循环搞定(直接上码) #include <bits/stdc++.h> using namespace std; void solve() { char a; int b; cin >> a >> ......
Codeforces Round 913 Div

Codeforces Round 867 (Div. 3)

Codeforces Round 867 (Div. 3) A:ABCD (E差一点点,最后把那种特殊情况想出来然后没写上去就结束了) A. TubeTube Feed 题意:给两个数组分别是时间和价值,要价值最大但是只能选一个 思路:最开始以为是01背包,结果只选一个,一个一个枚举就行 #incl ......
Codeforces Round 867 Div

Codeforces Round 913 (Div. 3)

CF1907总结 A.Rook 题面翻译 给出车在国际象棋棋盘中的位置,输出其可到达的坐标(不必在意顺序)。 车可以横着或竖着走任意格数。 分析 题意明了,输出车所在行和列所有格子的序号(除车所在位置外)。 code #include <bits/stdc++.h> using namespace ......
Codeforces Round 913 Div

Codeforces Round 891 (Div3)

Codeforces Round 891 (Div. 3) A. Array Coloring 这个我vp的时候写复杂了,想不到答案的思路这么清晰,将两部分分别看,将偶数加进去其奇偶性不变,只有奇数加进去才会改变奇偶性,so只有改变偶数次奇偶性才能使其奇偶性相同,所以cnt%2==0. #inclu ......
Codeforces Round Div3 891 Div

Codeforces Round 816 (Div. 2) VP

基本情況 A秒了,B错一次之后也过了,C没思路。 B. Beautiful Array Problem - B - Codeforces void solve() { long long n, k, b, s; memset(ans, 0, sizeof(ans)); std::cin >> n > ......
Codeforces Round 816 Div VP

Codeforces Round 815 (Div. 2)

基本情况 脑子太不清楚了。 A题有思路,但是各种细节问题(数论题太不熟练了),错了好几次才过。 B题直接分析数据愣猜一个解,猜对了。 A. Burenka Plays with Fractions Problem - A - Codeforces 难点在分析输出 \(1\) 的情况。 我的想法是通分 ......
Codeforces Round 815 Div

Codeforces Round 915 (Div. 2)

A. Constructive Problems 看了一眼数据,猜测可能是n,m里的最大 #include<bits/stdc++.h> using namespace std; void solve(){ int a,b; cin>>a>>b; int ans=max(a,b); cout<<an ......
Codeforces Round 915 Div

Codeforces Round 915 (Div. 2)

Codeforces Round 915 (Div. 2) 唉,菜狗。 A - Cover in Water int main() { IOS; for (cin >> _; _; --_) { cin >> n >> m; cout << max(n, m) << '\n'; } return 0 ......
Codeforces Round 915 Div

Codeforces Round 915 (Div

Codeforces Round 915 (Div. 2) 题解 A.Constructive Problems 直接找规律,或者手玩一下发现按照对角线斜着放最优(不会证),答案即为 \(max(n, m)\) 。 B.Begginer's Zelda 每次我们选择的端点一定是叶子结点,最优性是显然 ......
Codeforces Round 915 Div

Codeforces Round 910 (Div. 2) D. Absolute Beauty(数论)

Codeforces Round 910 (Div. 2) D. Absolute Beauty 思路: 将每个 \(a_i\) 与 \(b_i\) 转化为线段,大数在后,小数在前 即 L ( min) —— R (max) 对于 \(b_i\) 和 \(b_j\) 的 交换 : ​ L1 —— R ......
数论 Codeforces Absolute Beauty Round

Codeforces Round 910 (Div. 2) B. Milena and Admirer(数论)

Codeforces Round 910 (Div. 2) B. Milena and Admirer 思路: 要使数组非递减,则可以先进行倒序遍历,对于当前的 \(a_i\) , 要使 \(a_i\le a_{i+1}\) 我们可以进行贪心,让 \(a_i\) 分完尽可能使每个 \(a_i / k ......
数论 Codeforces Admirer Milena Round
共2078篇  :5/70页 首页上一页5下一页尾页