codeforces round game 912
牛客周赛 Round 8
# [牛客周赛 Round 8](https://ac.nowcoder.com/acm/contest/63585#question) ## [A-小美的排列询问_牛客周赛 Round 8 (nowcoder.com)](https://ac.nowcoder.com/acm/contest/63 ......
round 9
大寄。 我忏悔,我对不起组长 zwb,我对不起 AK 的 Cindy,对不起比我高的 lxf 和 lzm。 T3 数组开小。 T4 计算每天翘课所对应的答案时没用暴力,而是自作聪明的用了双指针(贪心),导致一分没有。 T5 没调出来,改成了暴力。 T6 暴力打错了,导致换根没想出来。 ### T1 ......
[AGC056D] Subset Sum Game
# [[AGC056D] Subset Sum Game](https://www.luogu.com.cn/problem/AT_agc056_d) ## 一、题目大意: 一块黑板上写着 $n$ 个整数。第 $i$ 个整数记作 $a_i$。保证 $n$ 是偶数。此外,给定 $L,R$。 Alice ......
Educational Codeforces Round 153 (Rated for Div. 2)
# Preface 最近CF状态烂得一批,已经连续两场被D题腐乳了,再这样下去就真成抱队友大腿的混子了 但没想到因为D题比赛时贪心过的人太多了,后面一波叉掉了比赛时过的$\frac{1}{3}$的人导致竟然还能上分我是没想到的 没抓住暑假大好的上分机会,等开学后再想冲分就难咯 # A. Not a ......
Codeforces Round 893 (Div. 2) A-C题解
CF 893 (Div.2) A. Buttons 签到题。两人会优先选择c中的按钮来,避免自己的按钮消耗同时减少对方可选择的按钮。所以c % 2 == 1等价于a的按钮数+1,c % 2 == 0时相当于c按钮不存在,比较a b 按钮的数量来得出答案即可。 #include<iostream> u ......
Educational Codeforces Round 153 (Rated for Div. 2) C题题解
CF Edu 153 C. Game on Permutation 设必胜态指从这一格开始开始行动的某人一定能获胜,必败态同理。 从左到右遍历序列,如果左方有比自己的值的必输态,那么这一格一定可以转移到此必输态,所以这一格一定是必胜态 如果没有比自己的值小的必输态,则 比自己值小的均为必胜态。 此格 ......
Codeforces Round 893 Div.2 A~E2
# [Codeforces Round 893 Div.2 A~E2](https://codeforces.com/contest/1858) [CF1858A](https://www.luogu.com.cn/problem/CF1858A) > 有 $a+b+c$ 个球。 > 其中的 $a$ ......
P6638 「JYLOI Round 1」常规
容易把问题转换为求前缀和。设 $p$ 为当前最大的下标使得 $a_p \leq x$,则容易得到答案: $$ \text{ans} = \sum_{i = 1}^{p}\left\lfloor\dfrac{x - a_p}{k}\right\rfloor $$ 比较难直接维护,所以稍微化简一下: $ ......
Educational Codeforces Round 153 (Rated for Div. 2) A-A题解
# A. Not a Substring ### 题解 对于这个题,我们可以考虑两种可能的连续的子串: - 有两个及以上的相同的字符,比如`(((`,`()))`,那么我们就需要尽可能地构造出连续不相同的字符串,比如`()()()`就非常符合我们的要求,每一对都不一样。 - 有两个及以上的不相同的字 ......
CQBZ Round 10
# CQBZ round 10 心态考爆炸了,emmmm。 最大挂点:T5 原因: 主要:对二项式反演本质理解有问题。 次要:不会及时止损。 ## [jump](http://222.180.160.110:1024/contest/4108/problem/1) 不妨设 $h_0=0$,且固定这个 ......
Codeforces EduRound153 Editorial
# A 如果有 $()$ 那么肯定是不合法的 有两种很简单的构造,`()()()()...()` 和 `((((...))))`,如果一个串是第一种构造的子串那么一定不是第二种构造的子串,反之亦然。 使用 python 取之 # B 把 $m\% k$ 的余数补齐,再把多出来的 $1$ 价格 reg ......
普及模拟2 +【LGR-155-Div.3】洛谷基础赛 #3 &「NnOI」Round 2
# [普及模拟2](https://www.hszxoj.com/contest/408) ## $T1$ [地址](https://www.hszxoj.com/contest/408/problem/1) $0pts$ - 简化题意:判断一个 $IP$ 地址是否合法(数据保证字符串中存在且仅存在 ......
Educational Codeforces Round 153 (Rated for Div. 2)
Educational Codeforces Round 153 (Rated for Div. 2) A - Not a Substring 思路:找到串中最大的层数,若层数为1,构造层数大于1的即可;若层数大于1,构造层数为1的即可 #include<bits/stdc++.h> using n ......
CF-1860C Game on Permutation题解
题意:在一条数轴上,Alice可以跳到在你所在点前面且值比当前所在点小的点。每回合可以向任意符合要求的点跳一次。当轮到Alice的回合同时不存在符合要求的点,Alice就赢了。Alice可以选择一个点作为起始点,然后作为后手(赛时这里把我坑了)。问有多少个点是必胜的点。 $n\leq 3\times ......
「AWOI Round 2 C」数组操作?数组操作!
> [「AWOI Round 2 C」数组操作?数组操作! 洛谷](https://www.luogu.com.cn/problem/P9540 "「AWOI Round 2 C」数组操作?数组操作! 洛谷") 题目描述 给定两个长度为 $n$ 的数组 $a,b$ ,将它们合并得到一个长度为 $2\ ......
CodeForces 1860D Balanced String
[洛谷传送门](https://www.luogu.com.cn/problem/CF1860D "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1860/D "CF 传送门") 首先考虑一个子问题,给两个只含有 $0$ 和 $ ......
CodeForces 1860E Fast Travel Text Editor
[洛谷传送门](https://www.luogu.com.cn/problem/CF1860E "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1860/E "CF 传送门") 没场切。/ng 考虑将原问题转成: > 给长度为 ......
Educational Codeforces Round 153 (Rated for Div. 2)
# Educational Codeforces Round 153 (Rated for Div. 2) 这次的div2有点难度,当时b题思路对了,但是没有写好 [A题传送门](https://codeforces.com/contest/1860/problem/A) ## A题意: 给你一个只 ......
Python game engine framework All In One
Python game engine framework All In One
Ren'Py 视觉小说引擎是一款开放源代码的自由软件引擎,用来创作透过电脑叙述故事的视觉小说。
Ren'Py之名是Ren'ai与Python两词混合而成。
Ren'ai 为日文,意指“恋爱”,而 Python 是 Ren... ......
「AWOI Round 2 A」最大和
嘿嘿,来水题解了。[题目链接](https://www.luogu.com.cn/problem/P9538)。 ### 题目简化 给你一个数,从它的个位到最高位进行操作,对于其每一位,你可以选择让他增加 $1$,减少 $1$(如果当前位是 $0$,减 $1$ 后会退位) 或者不变。 ### 分析 ......
Codeforces Round 881 (Div. 3)
比赛链接:https://codeforces.com/contest/1843 ## A. Sasha and Array Coloring **题意**:一个数组,可以任意分成任意组,每组的贡献是组最大值减最小值,求最大总贡献 **思路**:一组内只有最大值和最小值有用,所以每组只由两个数组成即 ......
[LeetCode][55]jump-game
# Content You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your ......
SMU Summer 2023 Contest Round 15
# [SMU Summer 2023 Contest Round 15](https://codeforces.com/group/L9GOcnr1dm/contest/467333) ## [A. AB Balance](https://codeforces.com/group/L9GOcnr1d ......
SMU Summer 2023 Contest Round 14
# [SMU Summer 2023 Contest Round 14](https://codeforces.com/group/L9GOcnr1dm/contest/467332) ## [A. Potion-making](https://codeforces.com/group/L9GOcn ......
SMU Summer 2023 Contest Round 13
# [SMU Summer 2023 Contest Round 13](https://codeforces.com/group/L9GOcnr1dm/contest/467330) ## [A. Review Site](https://codeforces.com/group/L9GOcnr1 ......
SMU Summer 2023 Contest Round 12
# [SMU Summer 2023 Contest Round 12](https://codeforces.com/group/L9GOcnr1dm/contest/467329) ## [A. K-divisible Sum](https://codeforces.com/group/L9GO ......
Codeforces Round 893 (Div. 2)
# Preface 最战俘的一场,B题写挂一发后整个人脑子就不清醒了,放着D不写去写E1,然后忘了可持久化栈有一个经典的倍增写法,最主要当时暑假前集训我还上去讲了这个东西然后比赛的时候还没想起来 后面目送徐神爆切5题成功完成两场从蓝上橙,狠狠地把我这个在紫卡了半年的废物羞辱了一波 不过确实说实话我们 ......
Educational Codeforces Round 109 (Rated for Div. 2)
Educational Codeforces Round 109 (Rated for Div. 2) A - Potion-making 思路:求最小操作数即药水最简比 #include<bits/stdc++.h> using namespace std; #define int long lo ......
games101-homework-notes
Games101 作业笔记 Created: 2023-06-19T12:00+08:00 Published: 2023-08-17T16:23+08:00 Categories: ComputerGraphics [ToC] # pa0 使用宏节约 `angle / 180.0 * acos(- ......
Codeforces Round 883 (Div. 3)
比赛链接:https://codeforces.com/contest/1846 ## A. Rudolph and Cut the Rope **题意**:给n条绳子,知道一端所在高度坐标和各自绳长,他们另一端都连到一个糖果上,问至少剪掉多少绳子糖果能碰到地面 **思路**:显然只有坐标小于绳长的 ......