题解p9580 round game
Codeforces Round 883 (Div. 3)
# Codeforces Round 883 (Div. 3) 题目链接:[Codeforces Round 883 (Div. 3)](https://codeforces.com/contest/1846 "Codeforces Round 883 (Div. 3)") ## A. Rudolp ......
洛谷 P4869 albus就是要第一个出场 题解
[洛谷 P4869 albus就是要第一个出场](https://www.luogu.com.cn/problem/P4869) #### 题意 给定一个长度为 $n$ 的序列 $A$,设**可重**集合 $S=\left\{\operatorname{xor}_{i=1}^nA_ix_i\mid ......
CF878E 题解
# CF878E Numbers on the blackboard 题解 ## Links [洛谷](https://www.luogu.com.cn/problem/CF878E) [Codeforces](https://codeforces.com/problemset/problem/87 ......
AT_abc306_h 题解
# AT_abc306_h Balance Scale 题解 ## Links [洛谷](https://www.luogu.com.cn/problem/AT_abc306_h) [AtCoder](https://atcoder.jp/contests/abc306/tasks/abc306_h ......
luoguP3403跳楼机 题解【同余最短路】
[题面](https://www.luogu.com.cn/problem/P3403) 题意: 可以发现操作四相当于是每次有了回到起点的机会,那么问题就变成了求满足:$Ax+By+Cz = k,k\leq h$ 所有的 $k$。 考虑忽略 $x$,这样只需要求出所有的通过 $y, z$ 能到达的小 ......
Educational Codeforces Round 96 (Rated for Div. 2)E
You are given a string s. You have to reverse it — that is, the first letter should become equal to the last letter before the reversal, the second le ......
2023年7月6日普及组南外集训题解
# A 阿伦 ## 题目描述 Aron要去给朋友买礼物。 前面有$n$个人在排队,其中有一些独自前来的顾客和一些组团前来的顾客。 相邻的穿着一样的衣服的顾客在同一团队里。 一个团队里只要第一个人买了就会离开。 问Aron会在第几个排到 ## 输入格式 第一行一个$n$,表示前面有多少个人 接下来共$ ......
Luogu CF633B 【A Trivial Problem】题解
一段理解起来特别容易的代码 (目前来看是最短的) ## 思路 由于末尾0的个数就是阶乘中分解出10的个数,也就是分解出2的个数与5的个数中的最小值; 显然5的个数小于2的个数,即找出分解出的5的个数。 **比较容易推出:当 $n$ 为 $5^{k}$ 的倍数时,其阶乘分解出 $5$ 的个数即为 $n ......
SMU Summer 2023 Contest Round 1
# [SMU Summer 2023 Contest Round 1](https://codeforces.com/group/L9GOcnr1dm/contest/450888) ## [A. The Contest](https://codeforces.com/group/L9GOcnr1d ......
Educational Codeforces Round 29
# Educational Codeforces Round 29 https://codeforces.com/contest/863 复健训练 太久没练直接变身傻逼(难道原来就不是吗,笑) ## A. Quasi-palindrome 直接去除后缀0即可(WA了两发评价为弱智) ```CC #i ......
牛客周赛 Round 2 A~D
A #include <iostream> #include <cstring> #include <string> #include <algorithm> #include <cmath> #include <set> #include <utility> #include <vector> # ......
CODE FESTIVAL 2017 Final J 题解
[problem](https://www.luogu.com.cn/problem/AT_cf17_final_j) & [blog](https://www.cnblogs.com/liangbowen/p/17542298.html)。 萌萌点分治,积累个 trick /qq。 > 对于完全图 ......
P2886题解
title: P2886题解 date: 2023-05-15 16:18:46 tags: 题解 cover: https://d-sketon.top/img/backimg/bg9.jpg # 题目大意 给定起点 $S$ 和终点 $T$,求从起点到终点**恰好**经过 $N$ ($N$ 给定) ......
P4016题解
title: P4016题解 date: 2023-05-22 14:05:46 tags: 题解 cover: https://d-sketon.top/img/backimg/bg23.jpg 本题是一个比较经典的问题(环形均分纸牌问题),我也不知道为什么它在网络流 24 题里面出现。但是作为一 ......
P3599题解
title: P3599题解 date: 2023-05-29 10:58:58 tags: 题解 cover: https://img.paulzzh.com/touhou/konachan/jpeg/068aa04808f99c146d186a4b1006ffef.jpg 本题是一道比较典的构造 ......
CF1421E题解
title: CF1421E题解 date: 2023-05-25 21:06:45 tags: 题解 cover: https://img.paulzzh.com/touhou/konachan/image/5558d2c6085f80d3cfeade810d7aa417.jpg [题目链接](h ......
NOIP2013-2023题解
title: NOIP2013-2023题解 date: 2023-06-12 21:24:37 tags: 题解 cover: https://img.paulzzh.com/touhou/konachan/jpeg/9f3e2443fc9d396c24bff395564565db.jpg ~~本 ......
CF1545D-题解
title: CF1545D 题解 date: 2023-06-05 19:36:13 tags: 题解 cover: https://img.paulzzh.com/touhou/konachan/image/bdf79fcf8026aae582a32911c942c8b0.jpg [题目链接]( ......
AT-abc214-g题解
title: AT_abc214_g题解 date: 2023-05-30 21:12:20 tags: 题解 cover: https://i.imgloc.com/2023/05/30/Vt18Rz.jpeg # 题目描述 给定两个排列 $p, q$,要求统计满足 $\forall i, r_i ......
Largest-Smallest-Cyclic-Shift题解
title: Largest Smallest Cyclic Shift题解 date: 2023-06-05 11:22:16 tags: 题解 cover: https://img.paulzzh.com/touhou/konachan/image/f7e83305150ed53be7ccf88 ......
CF1827D 题解
[problem](https://www.luogu.com.cn/problem/CF1827D) & [blog](https://www.cnblogs.com/liangbowen/p/17541713.html)。 很好的题。用到一些关于重心的 trick。 不妨认为只有一个重心 $\t ......
P1672 [USACO05FEB] Feed Accounting S 题解
给 $c$ 个区间表示牛吃草的时间段,每头牛每天吃 $1$ 千克,问距今天(即运来饲料 $f_2$ 千克的时间)最近的送饲料 $f_1$ 千克的时间是什么时候? ......
攀拓(PAT)- 程序设计(乙级)2023年夏季考试仿真卷题解
#B-1 唯手熟尔 思路:getchar一个读入到string中进行判断 代码: ``` #include using i64 = long long; #pragma GCC optimize(2) #define IOS std::ios::sync_with_stdio(false), std ......
Educational Codeforces Round 22
# A. The Contest 想一想就知道,提交的时间无所谓,所以我们选择全部做完后的第一个时间间隔提交即可 ```cpp #include using namespace std; #define int long long int read() { int x = 0, f = 1, ch ......
CF1034D 题解
## CF1034D 总评:非常牛逼的 $3500$。 求第 $k$ 大的价值可以二分一个 $m$,变成求价值 $\ge m$ 的区间**个数**,设其为 $C(m)$。求出第 $k$ 大价值 $M$ 后,本题求前 $k$ 大的价值和,这便要求我们求价值 $\ge m$ 的区间**价值和** ......
CF1601F Two Sorts 题解--zhengjun
[link](https://www.luogu.com.cn/problem/CF1601F) 这里提供一种不用 meet in middle 的方法,速度比较可观。 #### 发现性质 开始简单的推一下式子。 $\sum (i-a_i)\bmod p=\sum (rk_i-i+p\times\l ......
C++题解——格子游戏
####题目链接:[一本通](http://ybt.ssoier.cn:8088/problem_show.php?pid=1347 "一本通") [TFLSOJ](http://oj.tfls.net/p/570 "TFLSOJ") ##思路:使用并查集给点连接,如果在连接过程中遇到已连接的点二次 ......
CF1328E 题解
[problem](https://www.luogu.com.cn/problem/CF1328E) & [blog](https://www.cnblogs.com/liangbowen/p/17540450.html)。 提供一个代码上不一样(?)的做法。 找到询问集合中,深度最大的点 $mx ......
CF1334A Level Statistics 题解
## CF1334A Level Statistics 题解 ### 思路分析 有 $4$ 种情况会导致记录有问题。 - $c_i const int MaxN = 1e2 + 5; int t; int n; int c[MaxN], p[MaxN]; void solve() { scanf(" ......
Codeforces Round 882 题解
## [Codeforces Round 882 (Div. 2)](https://codeforces.com/contest/1847 "Codeforces Round 882 (Div. 2)") ## [A. The Man who became a God](https://codef ......