Round

Pinely Round 3 (Div. 1 + Div. 2)

A. Distinct Buttons #include<bits/stdc++.h> using namespace std; void solve(){ int n; cin>>n; int a=0,b=0,c=0,d=0; for(int i=1;i<=n;i++){ int x,y; cin ......
Div Pinely Round

题解 P9993【[Ynoi Easy Round 2024] TEST_133】

就硬把 线段树 3 和 数列分块入门 2 揉到一起出。 维护原数组 \(a\) 及其历史最大值 \(hist\),对每个块,维护块内 \(a\) 升序排序后结果 \(p\)、块内 \(a\) 升序排序后历史最大值前缀和 \(prehist\)、块加标记 \(add\)、块历史和加标记 \(hista ......
题解 P9993 Round 9993 2024

LibreOJ#535. 「LibreOJ Round #6」花火

LibreOJ#535. 「LibreOJ Round #6」花火 \(n\) 个烟火排成一排,从左到右高度分别为 \(h_1,h_2,\cdots,h_n\),这些高度两两不同。 每次 Yoko 可以选择两个相邻的烟火交换,这样的交换可以进行任意多次。 每次 Yoko 还可以选择两个不相邻的烟火交 ......
LibreOJ Round 535

Codeforces Round 915 (div2) E

E. Tree Queries [题目链接](https://codeforces.com/contest/1904/problem/EProblem - E - Codeforces) 题意概括: 给定一棵大小为 \(n\) 的树,回答如下询问,询问之间相互独立: 给定一个点 \(x\) 与 \( ......
Codeforces Round div2 915 div

Codeforces Round 917 (Div. 2)

基本情况 A题秒了,B题卡了一年。 B. Erase First or Second Letter Problem - B - Codeforces 卡题分析 两方面原因 没有变通,一开始的思路是公式算出总字串数再想办法找重复的减掉,但搞了一个小时都不可行,应该早点换成正着来找的思路。 没有更深入的 ......
Codeforces Round 917 Div

CF contest 1909 Pinely Round 3 (Div. 1 + Div. 2) 题解(Vanilla的掉分赛)

[Pinely Round 3 (Div. 1 + Div. 2) - Codeforces](https://codeforces.com/contest/1909) $$ \color{purple}\large\textbf{世界上只有一种真正的英雄主义,} $$ $$ \color{red}... ......
题解 Div contest Vanilla Pinely

Pinely Round 3 (Div. 1 + Div. 2)

A 构造题,分两种情况考虑 上下都行,左右选一个 左右都行,上下选一个 void solve() { int n; cin >> n; vector<pair<int, int> > a(n); for(auto &t : a) cin >> t.x >> t.y; sort(a.begin(), ......
Div Pinely Round

Pinely Round 3 (Div. 1 + Div. 2) A~D

A. Distinct Buttons // #include <bits/stdc++.h> #include <iostream> #include <string> #include <cstring> #include <vector> #include <algorithm> #inclu ......
Div Pinely Round

Pinely Round 3 (Div. 1 + Div. 2)

\(A.Distinct Buttons\) https://codeforces.com/contest/1909/submission/238508091 \(B.Make Almost Equal With Mod\) https://codeforces.com/contest/1909/s ......
Div Pinely Round

Codeforces Round 651 (Div. 2)C. Number Game(数学思维数论)

C. Number Game 我们考虑那些状态是必胜态 我的回合时n为奇数(除1外),直接除以n则必胜 下面偶数的情况稍复杂 偶数我们能进行的操作只有除以一个奇数,需要考虑怎么把当前状态变为对手的必败态 偶数一定含2的因子,\(n=2^k*q,q为奇数\) 当\(k=1时如果q\)是一个质数那么只能 ......
数论 Codeforces 思维 数学 Number

Codeforces Round 638 (Div. 2)B. Phoenix and Beauty

B. Phoenix and Beauty 这道题目学到的东西: 从给出的数据范围观察,得到一些有用信息(峰哥教的) 考虑无解的情况‘ 其实这题考虑怎么操作是比较难的,如果能想出来满足条件的结果就比较好了(我在说什么我自己也不知道,算了直接看下面的图吧) 假设\(k=3\),下面是我们得到的结果数列 ......
Codeforces Phoenix Beauty Round 638

Codeforces Round 916 (Div. 3)

目录写在前面ABCDE1/E2FG1G2写在最后 写在前面 比赛地址:https://codeforces.com/contest/1914。 第二天没早八打个 div3 休闲娱乐保持下手感,然而 div3 都 AK 不了了,纯纯废物一个,天天上大学导致的。 唉,一学期碰上好几个 byd 恼弹老师, ......
Codeforces Round 916 Div

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

Codeforces Round 914 (Div. 2)A~D

A. Forked! 题意:有骑士,国王,王后,给出骑士的攻击方式,骑士的攻击方式类似象棋中的马,一个方向长度为1,一个方向长度为2,有8个位置,骑士的两方向攻击长度为a,b,当a,b不等的时候,有8个位置,相同则有4个位置,询问骑士能同时攻击到国王和王后的位置有几个(采用多组输入形式) 范围:给出 ......
Codeforces Round 914 Div

Codeforces Round 916 (Div. 3)

A. Problemsolving Log map枚举字母 #include<bits/stdc++.h> using namespace std; void solve(){ int n; string s; cin>>n>>s; int ans=0; s=" "+s; map<char,int> ......
Codeforces Round 916 Div

Codeforce Round 916(div3)

Codeforces Round 916(div3) [Problem - A - Codeforces]:Problemsolving Log A.题 直接看样例进行分析,发现每一次出现的字符代表着用了1分钟来看这道题,每道题都有固定的解题时间,只要达到了这个解题时间,就可以将这题解出来 , 答案 ......
Codeforce Round div3 916 div

Codeforces Round 916 (Div. 3)(A~E2)

A 统计一下每个字母的出现次数然后输出即可 #include <bits/stdc++.h> #define rep(i,a,b) for(register int i = (a); i <= (b); ++i) #define fep(i,a,b) for(register int i = (a) ......
Codeforces Round 916 Div E2

CF Round 916 (Div. 3)

link A 开个桶。 B 因为 \(k \leq n-1\),尝试让 \(a_2\) 到 \(a_{k+1}\) 有贡献,让 \(a\) 的前 \(k\) 项升序排列,剩余项降序排列即可。 C 假设只做前 \(x\) 个任务(\(x \leq k\)),那么答案 \(f_i\) 最大为 \(\su ......
Round 916 Div CF

Codeforces Round 916 (Div. 3) (A~E2)

A. Problemsolving Log 签到题,对于给出的字符串,用数组记录每个字母出现的次数,然后遍历一边记录数组,如果对应的字母出现次数大于它的位次,则说明该字母对应的题目被解出来了,最后输出解题数量即可 void solve() { int n; cin >> n; string s; c ......
Codeforces Round 916 Div E2

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

CF Round 906 (Div. 1)

CF Round 906 (Div. 1) C. Doremy's Drying Plan (√2000 / *2600) Easy ver. 可以得出只有被覆盖 1 / 2 次的才能被消除。 覆盖一次枚举线段,覆盖两次枚举点。 Hard ver. D. Game of Stacks (*3000) ......
Round 906 Div CF

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

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
共1294篇  :2/44页 首页上一页2下一页尾页