Rated

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 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

CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!)

Preface 补题,经典不会F,看了会题解发现看不懂,索性直接开摆 A. Jagged Swaps 判断\(a_1\)是否为\(1\)即可 #include<cstdio> #include<iostream> #include<utility> #include<vector> #include ......
Div CodeTON Prizes Round Rated

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

[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 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 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

CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!)

看到B官方题解写了一堆,而如果能注意到一些性质,几行就写完了 题意:给一个A,B构成的字符串,可以将“AB”翻转成"BA",问最多可以进行多少次翻转? 实际上在手动模拟以后发现,由于题目限制了每个位置只能翻转一次,所以情况简单了不少。 只要还没过最后一个B,那么最后一个B之前的所有A就会被反转。真正 ......
Div CodeTON Prizes Round Rated

CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!)

CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!) A - Jagged Swaps 思路:a2到an的数只要相邻为逆序都可以交换,只需要判断a1是否为1即可 #include<bits/stdc++.h> using namespace std; # ......
Div CodeTON Prizes Round Rated

CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!)

2023 11 27 A. Jagged Swaps 题意是:给你一个数组进行无数次的操作 问你能不能单调 思路:通过观察发现进行操作大的一定会被放在后面,所以一定会单调,但是操作是从2开始的,所以下表1的地方一定要是1 using namespace std; int a[20]; void so ......
Div CodeTON Prizes Round Rated

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

CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!)

CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!) A - Jagged Swaps 解题思路: 若\(a[1] = 1\),则可以。 代码: #include <bits/stdc++.h> using namespace std; using ll ......
Div CodeTON Prizes Round Rated
共212篇  :1/8页 首页上一页1下一页尾页