题解p9580 round game

【题解】[2023牛客多校] Distance

题目传送门:[[2023牛客多校] Distance](https://ac.nowcoder.com/acm/contest/57360/B) # 题意 对于任意两个元素个数相同的set:A、B,每次可以执行以下两种操作之一: + 将A中的任意元素加一 + 将B中的任意元素加一 $C(A, B)$ ......
题解 Distance 2023

P4795 [BalticOI 2018] 基因工程 题解

题目传送门:[Click](https://www.luogu.com.cn/problem/P4795)。 蒟蒻看见这道题,想了足足一个小时,过后顿有所悟,故作此篇。 首先,看到题目,光是数据就已经达到了 $\operatorname{O}(nm)$ 的级别,再看一看数据范围:$3 \leq n, ......
基因工程 题解 基因 BalticOI 工程

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

暑期竞赛培训 Day 16 <继续写题解>

# - [1] [蓝桥杯 2013 省 A] 剪格子 洛谷P8601 ## 题目描述 如图 $1$ 所示,$3\times 3$ 的格子中填写了一些整数。 ![](https://cdn.luogu.com.cn/upload/image_hosting/hsfjsi38.png) **我们沿着图中 ......
题解 Day 16 lt gt

P4169 题解

## 题意 二维平面上有 $n$ 个点,给你 $m$ 次操作,每次操作可以插入一个点或者询问所有点中距离给定点最近的哈密顿距离。$n,m\le 3\times 10^5.$ ## 分析 这是一道 K-D Tree 的裸题。 而对于这道题,我们还需要考虑插入操作。我们给出两种方式: 1. 按很多题解的 ......
题解 P4169 4169

AT_ttpc2015_g 题解

洛谷的 RMJ 总是 UKE,所以这一题是在 ATcoder 上做的,[记录一](https://atcoder.jp/contests/ttpc2015/submissions/44132887),[记录二](https://atcoder.jp/contests/ttpc2015/submiss ......
题解 AT_ttpc 2015 ttpc AT

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

UVA333 题解

## 大意: 给定一个字符串 $s$ 判断 $s$ 是否符合要求。 1. 由数字,`-` 和大写英文数字 `X`,空格组成,`X` 代表 $10$ 且只能在最后出现。 2. 依次相加前面的数字的总和可以被 $11$ 整除,也就是前缀和,而且刚好 $s$ 只有 $10$ 个数字。 ## 坑点: 1. ......
题解 UVA 333

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

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

[安洵杯 2019]game

## [安洵杯 2019]game 将文件放入IDA中打开,查看**main()**函数 ![image-20230713103733078](https://img2023.cnblogs.com/blog/2957075/202307/2957075-20230713151815759-6416 ......
2019 game

CF958E1 Guard Duty (easy) 题解

[题面传送门(luogu)](https://www.luogu.com.cn/problem/CF958E1) | [题面传送门(CF)](https://codeforces.com/problemset/problem/958/E1) 本题的翻译好像少了点东西(建议直接阅读英文题面,推荐一个[ ......
题解 Guard 958E Duty easy

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

games101 HomeWork7

# Games101 HomeWork7 ## 导航 [导航](https://www.cnblogs.com/zhywyt/p/17576370.html) ## 多线程 **这次的作业,我想先教大家实现多线程,再进行操作。多线程多我的吸引力实在是太大了。废话不多说,我们直接开始:** **多线程 ......
HomeWork7 HomeWork games 101

T1的题解

一道小清新的思维题!和 $bocchi$ 酱一样可爱的喵 **30 pts** 首先典中典套路:破环成链,数组复制一份。 设 $to[i] = \max(\mathbb j) (j\geq i \wedge \sum_{i \leq l \leq j} a_l \leq k)$ 枚举起始下标,容易想 ......
题解

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

P4826 [USACO15FEB] Superbull S题解

#Superbull S题解 ###[题目传送门(可点击)](https://www.luogu.com.cn/problem/P4826) #题面 ##题目描述 $Bessie$和她的朋友们正在一年一度的$Superbull$锦标赛中打球,而$Farmer$ $John$负责让比赛尽可能激动人心。 ......
题解 Superbull P4826 USACO 4826

「题解」AGC034F RNG and XOR

$f_i$ 为变成 $i$ 的期望步数,那么 $f_0=0$,$f_i=1+\sum_{j=0}^{2^n-1}f_j\cdot p_{i\oplus j}$,理解为从 $i$ 走到 $0$ 的期望步数即可。 尝试用集合幂级数描述这个东西,如果不管 $f_0$ 那么就是 $F=F\times P+I ......
题解 034F AGC 034 RNG

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

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

JSC 2019 Qual D 题解

[problem](https://www.luogu.com.cn/problem/AT_jsc2019_qual_d) & [blog](https://www.cnblogs.com/liangbowen/p/17604061.html)。 是一道不难想,但是有趣的构造题阿!没有题解,我来一发 ......
题解 2019 Qual JSC

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

【csp2020】 方格取数 题解

[洛谷传送门](https://www.luogu.com.cn/problem/P7074) ## 1.题目大意 给定一个 $n*m$ 的矩阵,矩阵中每个点 $(i,j)$ 都有一个权值 $f_{(i,j)}$。每次可以向上,向下或向右走。问从 $(1,1)$ 走到 $(n,m)$,经过的路径上点 ......
题解 方格 2020 csp

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

【题解】Luogu[P5022] [NOIP2018 提高组] 旅行

[Link](https://www.luogu.com.cn/problem/P5022) 因为是道NOIP,那么我们不妨按照考场上的策略一点一点想。 先看部分分,有一档有很明显的特征 $n=m-1$ 这显然构成一棵树,对于一棵树,我们想把他按照题目的要求遍历完,一定是像dfs的遍历顺序一样,对于 ......
题解 Luogu P5022 5022 2018

CCPC Changchun 2020 D, Meaningless Sequence题解

听说是签到题。 不难看出设x为i二进制个数下1的个数(还是难的),则a_i=c^x。那么我们只需要考虑所有0到n的个数。 当n为1111时,可以得到为(1+c)^n次方,那么我们把答案看成两部分一部分是1到111...和1000到n, 那么当si位为1时,可以看成是n去掉前一位后再乘以c,递推得到每 ......
题解 Meaningless Changchun Sequence CCPC