Educational

Educational Codeforces Round 152 (Rated for Div. 2)

layout: ../../layouts/MarkdownPostLayout.astro title: 'Educational Codeforces Round 152 (Rated for Div. 2)' pubDate: 2024-01-11 description: '一些训练' au ......
Educational Codeforces Round Rated 152

vp Educational Codeforces Round 160 (Rated for Div. 2)

ABC很顺畅,没有卡住然后到最后D都做不出来 D我感觉是一个类似计数dp的东西但是我找不到统计的规律但是可以得到一些性质:一个数字如果想被删掉,那它直到它左边的比它小的数字为止所有数字都要先删掉,它才能被删掉 发现自己如果不去想DP,会去往贪心的方向想,这题就是那种贪心没法完全被判断掉的因为贪心也有 ......
Educational Codeforces Round Rated 160

Educational Codeforces Round 160 (Rated for Div. 2)

A 直接模拟,注意细节 #include<bits/stdc++.h> #define ll long long using namespace std; ll p[15] = {1}; void solve() { ll x; cin >> x; int len = 0; while(x / p[ ......
Educational Codeforces Round Rated 160

Educational Codeforces Round 151 (Rated for Div. 2)补题A~D

Educational Codeforces Round 151 (Rated for Div. 2) A. Forbidden Integer 思路 分别处理x=1和x≠1的情况 ac代码 #include <bits/stdc++.h> using namespace std; using i6 ......
Educational Codeforces Round Rated 151

Educational Codeforces Round 160 (Rated for Div. 2)

A. Rating Increase 字符串处理 #include<bits/stdc++.h> using namespace std; void solve(){ string s; cin>>s; int n=s.size(); s=" "+s; for(int i=1;i<=n-1;i++) ......
Educational Codeforces Round Rated 160

Educational Codeforces Round 160 (Rated for Div. 2) 题解A~D

Educational Codeforces Round 160 (Rated for Div. 2) A. Rating Increase 纯暴力,分割字符串,如果n1<n2就输出,如果遍历完整个数组都不存在n1<n2就输出-1. const int N = 2e5 + 10; int toint ......
题解 Educational Codeforces Round Rated

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

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

Educational Codeforces Round 131 (Rated for Div. 2)

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

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

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

Educational Codeforces Round 139 (Rated for Div. 2) D. Lucky Chains(数论)

Educational Codeforces Round 139 (Rated for Div. 2) D. Lucky Chains 思路: 假设幸运为k , 则 gcd(x+k,y+k) ≠ 1 , k取最小整数(k>=0) 由此可设 因子为 d , (x+k)%d = 0 , (y+k)%d ......
数论 Educational Codeforces Chains Round

Educational Codeforces Round 159 (Rated for Div. 2) C. Insert and Equalize (贪心+数论)

Educational Codeforces Round 159 (Rated for Div. 2) C. Insert and Equalize 思路: 首先对 \(a\) 进行排序, 然后对所有差值取gcd ,获得可用的最大因子 \(gc\), 答案有两种情况: 一种是 \(a_{n+1}\) ......

Educational Codeforces Round 158 (Rated for Div. 2)C. Add, Divide and Floor(思维/数学)

C. Add, Divide and Floor 这里我们选择固定最小数不变,然后每次让其他数向最小数靠近,模拟一下可以发现,只要最大值变为和最小值一样,其他都会和最小值一样。 #include <bits/stdc++.h> #define rep(i,a,b) for(register int ......
Educational Codeforces 思维 数学 Divide

Educational Codeforces Round 158 (Rated for Div. 2)

Preface 补题,妈的现在Edu E都做不来这搞毛啊 A. Line Trip 签到 #include<cstdio> #include<iostream> #include<utility> #include<vector> #include<cstring> #include<cmath> ......
Educational Codeforces Round Rated 158

Educational Codeforces Round 154 (Rated for Div. 2)

Educational Codeforces Round 154 (Rated for Div. 2) # Name A Prime Deletion x14422 B Two Binary Strings x10743 C Queries for the Array x3639 D Sorting ......
Educational Codeforces Round Rated 154

Educational Codeforces Round 159 总结

最失败的一集。 C 开题顺序搞错,不小心先开了C,以为是A。还好C不难。 题意大概是在给定的数组最后添一个数(所有数两两不同),再自定义一个数 \(k\) ,数组中每个数可以加上若干个 \(k\) ,最后使得所有数字相等。要求加 \(k\) 的次数最少。 如果不加最后一个数,那么显然把所有的数加到与 ......
Educational Codeforces Round 159

Educational Codeforces Round 159 (Rated for Div. 2)

A - Binary Imbalance 如果全是 0 则显然输出 YES。对至少有一个 1 的情况,如果存在 0 则一定存在一个 0 和 1 挨在一起的位置,一直往这中间加 0 即可满足要求。 于是只要字符串包含 0 就是 YES,全 1 就是 NO。 Submission B - Getting ......
Educational Codeforces Round Rated 159

[CF1902] Educational Codeforces Round 159 A~E 题解

[CF1902] Educational Codeforces Round 159 A~E 题解 A. Binary Imbalance 很快观察到如果有不同的相邻元素,那么一定有解,意味着如果全是 1 无解,其他有解 B. Getting Points 题面很长,可以发现,最好的偷懒方式一定是把所 ......
题解 Educational Codeforces Round 1902

[Educational Codeforces Round 159 (Rated for Div. 2)](https://codeforces.com/contest/1902)

Educational Codeforces Round 159 (Rated for Div. 2) 好困,差点没打 A - Binary Imbalance #include <bits/stdc++.h> #define int long long #define endl '\n' usin ......

Educational Codeforces Round 158 (Rated for Div. 2)

Educational Codeforces Round 158 (Rated for Div. 2) A EDU的题总是感觉写起来怪怪的 #include <bits/stdc++.h> #define int long long #define endl '\n' using namespace ......
Educational Codeforces Round Rated 158

Educational Codeforces Round 159 (Rated for Div. 2)

Educational Codeforces Round 159 (Rated for Div. 2) 基本情况 A题秒了。 B题想出来贪心思想,也想出来怎么找最优解了,但实现极其复杂繁琐,最后以先超时优化后又错误的结果告终。 B. Getting Points 明显越后面开始学收益越高。 然后写了 ......
Educational Codeforces Round Rated 159

Educational Codeforces Round 52 E

提炼 显然我们可以把每一段拆开来单独考虑 我们该段有 A^len 选择 右边肯定只要不是相同 我们的集合就+1 Alen*(Alen -1) 当然要是相同也要算1 A^len 中间当然就是随便选啥都可以 void solve() { int n,m,A;cin>>n>>m>>A; vector<in ......
Educational Codeforces Round 52

Educational Codeforces Round 157 (Rated for Div. 2)

目录D. XOR Construction Educational Codeforces Round 157 (Rated for Div. 2) D. XOR Construction 方法一: 由题得 $ b_{i + 1} = a_i \oplus b_i = \cdots = b_1 \op ......
Educational Codeforces Round Rated 157

Educational Codeforces Round 16 E

提炼 首先观察范围发现是1e7 好像是dp 但是发现直接朴素的dp发现是有环的 跑了一发dijk带log 答案是肯定没过 我们可以想一下 如果我要是一个10 我肯定不会从11转移过来 因为我不如先去5 再2 如果我要是一个9 我可以从8+1转移过来 也可以从52-1转移过来 这样我们就消除了环 in ......
Educational Codeforces Round 16

Educational Codeforces Round 158 (Rated for Div. 2)

A. Line Trip There is a road, which can be represented as a number line. You are located in the point \(0\) of the number line, and you want to travel ......
Educational Codeforces Round Rated 158

Educational Codeforces Round 158 (Rated for Div. 2)

A - Line Trip 最后一段需要往返。 \[ans = \max(\max\limits_{i=1}^{n} a_i-a_{i-1},2(x-a_n)) \]Submission B - Chip and Ribbon 相当于问:每次给一个区间减一,最少需要选择多少个区间使得所有数变成 \( ......
Educational Codeforces Round Rated 158
共264篇  :1/9页 首页上一页1下一页尾页