codeforces round div2 915

Codeforces Round 827 (Div. 4)

# [Dashboard - Codeforces Round 827 (Div. 4) - Codeforces](https://codeforces.com/contest/1742) ## A Sum 简单题 ```c++ void solve() { int a, b, c; cin >> ......
Codeforces Round 827 Div

Codeforces 1855B:Longest Divisors Interval 最长的连续约数区间

# [1855B.Longest Divisors Interval](https://codeforces.com/contest/1855/problem/B "Codeforces 1855B") ## Description: - 对于一个整数 $n$ $(1\leq n \leq 10^{ ......
约数 区间 Codeforces Divisors Interval

Codeforces Round 449 (Div. 1) D. Nephren Runs a Cinema 卡特兰数

[luogu链接](https://www.luogu.com.cn/problem/CF896D) 题意不再赘述。 优先枚举的应该是$VIP$用户,枚举范围应该是$[0,n-l]$ 之后总客户数为$s=n-i$ 再考虑枚举$100$的总人数为$x$ 则要求$s-2x\in [l,r]$ 这部分方案 ......
卡特兰 Codeforces Nephren Cinema Round

Educational 151 DIV2 T3 strong password

## T3 strong password 1. 就是对于输入的每一个 $l,r$ ,我们遍历 $s[l]~s[r]$,对于每次遍历,我们设置一个临时指针 $cur$ ,然后通过指针右移寻找所需要的值 2. 在外面我们弄两个指针,分别代表每次遍历 $[l,r]$ 的区间的指针 $nmx$ 和全局指针 ......
Educational password strong DIV2 151

SMU Summer 2023 Contest Round 9(2019 山东省大学生程序设计竞赛)

# 2019 山东省大学生程序设计竞赛 # A. Calandar **纯模拟吧(~~感觉我做麻烦了(?)~~,** **就是如果问的是未来的日期,就用相隔天数取模后加上这天的星期,** **如果问的是曾经的,就用这天的星期减去相隔天数的取模后的数,因为是减法,记得加模数** ```c++ #inc ......
程序设计 Contest 大学生 程序 Summer

Educational Codeforces Round 38 C- F

# Educational Codeforces Round 38 C - F https://codeforces.com/contest/938 今天写出了三题ovo ## C. Constructing Tests 多画几个图就能发现,对于 $n\times n$ 的正方形来说,要使得 $m\ ......
Educational Codeforces Round 38

SMU Summer 2023 Contest Round 8(2019 陕西省大学生程序设计竞赛)

# [SMU Summer 2023 Contest Round 8](https://codeforces.com/group/L9GOcnr1dm/contest/464880)(2019 陕西省大学生程序设计竞赛) ## B - Grid with Arrows(欧拉图) 题意:一个总规模为$ ......
程序设计 Contest 大学生 程序 Summer

Ceil and floor of the dataframe in Pandas Python – Round up and Truncate

In this article, we will discuss getting the ceil and floor values of the Pandas Dataframe. First, Let’s create a dataframe. Example: Python3 # import ......
and dataframe Truncate Pandas Python

SMU Summer 2023 Contest Round 6

# Problem - D. Number Of Permutations [传送门](https://codeforces.com/group/L9GOcnr1dm/contest/462070/problem/D) > [==容斥原理==](https://blog.csdn.net/weixi ......
Contest Summer Round 2023 SMU

SMU Summer 2023 Contest Round 1

# [Problem - A The Contest](https://codeforces.com/group/L9GOcnr1dm/contest/450888/problem/A)(纯属眼瞎) ```cpp #include using namespace std; typedef long ......
Contest Summer Round 2023 SMU

SMU Summer 2023 Contest Round 2

# [Problem - A Treasure Hunt](https://codeforces.com/group/L9GOcnr1dm/contest/450889/problem/A) ```cpp #include using namespace std; typedef long long ......
Contest Summer Round 2023 SMU

SMU Summer 2023 Contest Round 3

# [Problem - A - Curriculum Vitae](https://codeforces.com/group/L9GOcnr1dm/contest/450890/problem/A) ````cpp #include using namespace std; const int N ......
Contest Summer Round 2023 SMU

HDU 多校 2023 Round #5 题解

# HDU 多校 2023 Round #5 题解 $\text{By DaiRuiChen007}$ ## A. Typhoon [Problem Link](https://acm.hdu.edu.cn/showproblem.php?pid=7324) **题目大意** > 给一条 $n$ 个 ......
题解 Round 2023 HDU

Codeforces Round 887 (Div. 1)

# Preface 补一篇好久之前打的CF的博客,说实话其实B题我当时怎么想的已经忘的七七八八了 这场第一眼看A没啥思路,就先去把B这个构造写了,中间想了挺久的大概40min才写出来 然后回头一看A发现可以倒着做,就是个丁真题了然后15min写完 后面看C刚开始以为是个贪心,后面又感觉是个DP,但状 ......
Codeforces Round 887 Div

Codeforces Round #879 Div.2

[link](https://codeforces.com/contest/1834) 前言:VP了一把,rk731,如果赛上有这发挥就好了。 果然,D是分水岭,一直都是。 ## [Unit Array](https://codeforces.com/contest/1834/problem/A) ......
Codeforces Round 879 Div

[Ynoi Easy Round 2021] TEST_152(颜色段数均摊+扫描线)

### [题目传送门](https://www.luogu.com.cn/problem/P8512) ## solution 简单题,考虑正着做扫描线,维护最后一次覆盖每个位置的修改时间,这个可以用 $set$ 维护颜色段数均摊。 那么显然对于一个以当前位置为右端点的询问,其答案就是所有最后修改时 ......
扫描线 颜色 Round Ynoi Easy

Educational Codeforces Round 88

# A. Berland Poker 先尽可能的吧小丑给一个人,在把剩下的小丑尽可能的平分,最后计算差值即可。 ```cpp #include using namespace std; void solve() { int n, m, k, t; cin >> n >> m >> k, t = n ......
Educational Codeforces Round 88

Educational Codeforces Round 104

https://codeforces.com/contest/1487 # A. Arena 统计与最小值不同的数字数量。 ```cpp #include using namespace std; #define int long long const int M = (1 > n; vector ......
Educational Codeforces Round 104

Codeforces Round 889 (Div. 2) A-E

[传送门,不用谢。](https://codeforces.com/contest/1855) A 给出排列每次可以交换两个数字,求最少多少次使得排列为错排。 考虑在原位的数字个数为$cnt$ 则答案显然为$(cnt+1)>>1$ B 求一个最大区间满足其中说有数字被$n$整除 极其有趣,注意到样例 ......
Codeforces Round 889 A-E Div

Codeforces Round 889 (Div. 2) A-D

## A. Dalton the Teacher 题意:给出一个排列,问使得排列变为1,2,...,n的最小的交换操作次数 ### Solution 统计a[i]!=i的个数,答案就是除以二向上取整 ```c++ void solve() { int n;cin>>n; int res=0; for ......
Codeforces Round 889 A-D Div

Educational Codeforces Round 36 (Rated for Div. 2)

# Educational Codeforces Round 36 (Rated for Div. 2) https://codeforces.com/contest/915 浓浓ds味的一场edu ## A. Garden 找最大因子 ```CC #include using namespace ......
Educational Codeforces Round Rated Div

牛客周赛 Round 5

# [牛客周赛 Round 5](https://ac.nowcoder.com/acm/contest/62033) ## [A-游游的字母变换_牛客周赛 Round 5 (nowcoder.com)](https://ac.nowcoder.com/acm/contest/62033/A) `` ......
Round

1848 Round 885 (Div. 2)

## Vika and Her Friends > 给定一张网格图,Vika 在 $(x, y)$ 处,她的 $k$ 个朋友分别在 $(x_{1 \sim k}, y_{1 \sim k})$ 处,每次所有人都必须移动到相邻各格子,询问 Vika 能否永远逃离她烦人的朋友 考虑对格子进行黑白染色,每 ......
Round 1848 885 Div

1851 Round 888 (Div. 3)

## Escalator Conversations 判断两人台阶是否为 $k$ 的倍数且在 $(0, m)$ 内即可 ```c++ #include using namespace std; signed main() { int T; scanf("%d", &T); for (int n, m ......
Round 1851 888 Div

1853 Round 887 (Div. 2)

## Desorting > 定义一次操作为选定一个 $i$ ,令 $a_{1 \sim i}$ 自增, $a_{i + 1 \sim n}$ ,自减,求使得整个序列无序的最小操作次数 若序列一开始就无序,输出 $0$ 否则找到相邻两数差值最小的位置,在这个位置不断使用操作,可以证明这是最优方案 ` ......
Round 1853 887 Div

1855 Round 889 (Div. 2)

## Dalton the Teacher > 给定序列 $a_{1 \sim n}$ ,定义一次操作为交换序列中的某两个数,求使得 $\forall i, a_i \not = i$ 的最少操作次数 > > 对于所有数据,$n \leq 10^5$ 计算出 $a_i = i$ 的位置数量 $sum ......
Round 1855 889 Div

Educational Codeforces Round 152 (Rated for Div. 2)

# Preface 经典秒完SB题然后开始坐牢1h,写了个E的假算法T在24个点就不管了打lol去了 妈的怎么稍微难点的题就是想不到呢 # A. Morning Sandwich 签到 ```cpp #include #include #include #include #include #incl ......
Educational Codeforces Round Rated 152

Codeforces Round 889 (Div. 2)

# [Codeforces Round 889 (Div. 2)](https://codeforces.com/contest/1855) ## T1 ​ 思路:我们将 $i \ne p_i$ 的数量记下来,再判断这个数的奇偶性,如果为偶,那么答案就为这个数 / 2,如果为奇,那么就是这个数 / ......
Codeforces Round 889 Div

Codeforces Round 885 (Div. 2) 题解

# A. Vika and Her Friends 看一下样例就可以发现,Vika 以及她的朋友都不能走对角线,在这种情况下 Vika 和朋友的距离为 **偶数**,且朋友一定追不上 Vika 所以直接判断 Vika 和朋友的距离是否都为偶数即可 # B. Vika and the Bridge 显 ......
题解 Codeforces Round 885 Div

Codeforces Round 887 (Div. 2)

# [Codeforces Round 887 (Div. 2)](https://codeforces.com/contest/1853) ## [A. Desorting](https://codeforces.com/contest/1853/problem/A) ### 题目大意 给出一个长 ......
Codeforces Round 887 Div