codeforces round 894

【LGR-150-Div.2】洛谷 8 月月赛 I & RiOI Round 2

## T1 一直没有详细看过位运算的我瑟瑟发抖。出题人给了帮助(有用但是不多)。直接讲考试想法: 首先,手玩样例后,果断猜测:将两个数转化为二进制之后,把头对齐,然后找出不同位,再加上二者位数之差。结果:$0Pts$ 之后,又想了很久,发现了 按位与等价于将原来二进制数中的1变为0,按位或等价于将原 ......
月月 Round RiOI LGR 150

Codeforces Global Round 24 D. Doremy's Pegging Game

首先我们可以假设最后一个删除的peg编号是x,那么可以发现每个编号结尾的方案数是一样的,可以只专注计算最后删1号peg的方案数,然后乘一下就好 然对于1来说,我们需要找到一个(x, y) 的组合,x和y之间允许剩pegs,但是1到x,以及y到1之间的pegs都被移除,这个状态在此时依然没有触碰blu ......
Codeforces Pegging Global Doremy Round

Educational Codeforces Round 151

# [Educational Codeforces Round 151](https://codeforces.com/contest/1845) ## T1 就是大水题~~但写了很长时间~~。 构造题。首先分类讨论: 1. 当 $x\ne1$ 时我们构造的序列长度就为 $n$ ,序列就是 $n$ ......
Educational Codeforces Round 151

Practice on Codeforces and Atcoder in August

## [Educational Codeforces Round 151 A~E](https://www.cnblogs.com/oierpyt/p/17598936.html) ## [Codeforces Round #879 Div.2](https://www.cnblogs.com/oi ......
Codeforces Practice Atcoder August and

Educational Codeforces Round 151 (Rated for Div. 2) 题解

# A. Forbidden Integer 显然,当 $x\not=1$ 时,直接输出 $n$ 个 $1$ 即可 否则,如果 $n$ 为奇数,那就输出 $\lfloor\frac{n}{2}\rfloor-1$ 个 $2$ 和 $3$;如果 $n$ 为偶数,那就输出 $\frac{n}{2}$ 个 ......
题解 Educational Codeforces Round Rated

Codeforces Round 776 (Div. 3)(vp)

# [Dashboard - Codeforces Round 776 (Div. 3) - Codeforces](https://codeforces.com/contest/1650) ## A Deletions of Two Adjacent Letters **题意:看看与题目给的字符一 ......
Codeforces Round 776 Div vp

P9437 『XYGOI round1』一棵树 题解

赛时一眼换根 dp,然后调调调了大概 1h+。 [题目传送门](https://www.luogu.com.cn/problem/P9437) ### 什么是换根 dp 在大多数树形 dp 中,我们只考虑对根的贡献,而一部分题目需要算出对所有点的贡献,一个比较显然的做法是对每个点都跑一次树形 dp, ......
题解 round1 P9437 XYGOI round

Balanced Round 题解

[原题链接](https://codeforces.com/contest/1850/problem/D)。 #### 题目大意 给你一些数,问至少删掉多少数后两两不大于 k。 我们可以画图理解。 ![](https://cdn.luogu.com.cn/upload/image_hosting/9 ......
题解 Balanced Round

Codeforces Round 882 (Div. 2)

[link](https://codeforces.com/contest/1847) 题号:CF1847A~F ## [A](https://codeforces.com/contest/1847/problem/A) 题意: 给定一个数组 $\{x_1,x_2,\cdots,x_n\}$ 和一个 ......
Codeforces Round 882 Div

Codeforces 1850H:The Third Letter 带权并查集

# [1850H.The Third Letter](https://codeforces.com/contest/1850/problem/H "Codeforces 1850H") ## Description: - $n$ 个人,$m$ 个条件,每次给出两个人 $a_i$ 和 $b_i$ 一维 ......
Codeforces Letter 1850H Third 1850

Codeforces Round 882 (Div. 2)

# [Codeforces Round 882 (Div. 2)](https://codeforces.com/contest/1847) ## [A.The Man who became a God](https://www.luogu.com.cn/problem/CF1847A) ### 题 ......
Codeforces Round 882 Div

【反思】Sadness Fan Club Round 3 赛后反思

## Sadness Fan Club Round 3 赛后反思 被薄纱了: ![图挂了就是没有了](https://cdn.luogu.com.cn/upload/image_hosting/15gl6gr2.png) 推歌:Bao The Whale《Cirtus Love》 小鲸鱼粉色那个皮好 ......
Sadness Round Club Fan

Codeforces Round 424 (Div. 1)D. Singer House

[传送门](https://codeforces.com/problemset/problem/830/D) 显然要自底向上进行$dp$ 深度相同的子树结构相同所以可以利用深度来代表子树。 那么就应该统计出有向路径的个数。 考虑路径由链所拼成。那么状态里应该有有向链的条数。 设$f_{i,j}$表示 ......
Codeforces Singer Round House 424

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

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