addition atcoder regular contest

Atcoder Regular Contest 118 F - Growth Rate

想到插值其实就挺套路的了吧…… 设 $dp_{i,j}$ 表示有多少种方法确定 $a_i\sim a_n$ 使得 $a_i=j$。那么有 $dp_{i,j}=\sum\limits_{k\ge ja_i}dp_{i+1,k}$。边界条件是 $dp_{n+1,1\sim m}=1$。不难发现复杂度与值 ......
Atcoder Regular Contest Growth Rate

Atcoder AGC062C Mex of Subset Sum

对 $a_i$ 从小到大进行排序,因为想到若 $ a_{i - 1}$ 肯定是能保证取不到的。 对排完序的 $a_i$ 做一个前缀和 $s_i = \sum\limits_{j = 1}^n$,令 $A_i$ 为 $a_{1\sim i}$ 中无法表示为子序列之和且 $ s_{i - 1} > x$ ......
Atcoder Subset 062C AGC 062

SMU Summer 2023 Contest Round 1

SMU Summer 2023 Contest Round 1 A - The Contest 思路:求出最短解决问题总时间,在所有区间找出大于等于总时间的最短时刻。 #include<bits/stdc++.h> using namespace std; #define int long long ......
Contest Summer Round 2023 SMU

SMU Summer 2023 Contest Round 2

SMU Summer 2023 Contest Round 2 A - Treasure Hunt 思路:判断 Δx 和 Δy 能否分别整除 x 和 y ,求出需要的步数,两者的步数须同奇或同偶 #include<bits/stdc++.h> using namespace std; //#defi ......
Contest Summer Round 2023 SMU

SMU Summer 2023 Contest Round 3

SMU Summer 2023 Contest Round 3 A - Curriculum Vitae 思路:要求0后不能有1,当某个数都不删时,值为前面所有的0的个数加后面所有1的个数,求出最大即可 #include<bits/stdc++.h> using namespace std; #de ......
Contest Summer Round 2023 SMU

SMU Summer 2023 Contest Round 3

[A. Curriculum Vitae](http://https://codeforces.com/group/L9GOcnr1dm/contest/450890/problem/A "A. Curriculum Vitae") 题意:给出一串01序列,可以删除任意个元素,使得1后面没有0 思路 ......
Contest Summer Round 2023 SMU

AtCoder Beginner Contest 294

# A - Filter ```cpp #include using namespace std; #define int long long int32_t main() { ios::sync_with_stdio(false) , cin.tie(nullptr) , cout.tie(nul ......
Beginner AtCoder Contest 294

SMU Summer 2023 Contest Round 2

[A. Treasure Hunt](http://https://codeforces.com/group/L9GOcnr1dm/contest/450889/problem/A "A. Treasure Hunt") 题意:给出船的出发位置和目的地,给出四种移动方式。 思路:路程要被整除。横移纵 ......
Contest Summer Round 2023 SMU

AtCoder Beginner Contest 309 - D(最短路)

[toc] 题目传送门:[abc 309](https://atcoder.jp/contests/abc309) 前面的简单题就不放了 # [D - Add One Edge](https://atcoder.jp/contests/abc309/tasks/abc309_d) **题意:** 给 ......
Beginner AtCoder Contest 309

SMU Summer 2023 Contest Round 1

[A. The Contest](http://https://codeforces.com/group/L9GOcnr1dm/contest/450888/problem/A "A. The Contest") 题意:要做n道题,每道题花费时间a[i],但是只有几个时间段可以提交,问最早什么时间可 ......
Contest Summer Round 2023 SMU

AtCoder Beginner Contest 162

# AtCoder Beginner Contest 162 ABCD全暴力 E数学题看不懂,感性理解 F线性dp,非常基础我不会,寄 ## E - Sum of gcd of Tuples (Hard) 看了题解发现好多做法都是推一堆式子,我实在看不懂(卷积莫反啥啥的呜呜呜) 然后看见这个感觉比较 ......
Beginner AtCoder Contest 162

Atcoder Regular Contest 114 F - Permutation Division

显然分成 $k$ 段以后,最大化形成的排列的字典序的策略是将所有段按第一个元素的大小降序排列。 由于最终排列的字典序肯定 $\ge$ 原排列的字典序,因此我们考虑最大化最终排列与原排列的 LCP,这部分就考虑二分答案,记 $dp_i$ 表示以 $p_1$ 开始 $p_i$ 结尾的 LDS 的长度,那 ......
Permutation Division Atcoder Regular Contest

Atcoder Regular Contest 117 F - Gateau

首先答案显然满足可二分性,于是不管三七二十一先上个二分。 不难发现题目中的限制形如: - $s_{i+n-1}-s_{i-1}\ge X_i(i\le n)$ - $s_{i-1}-s_{i-n-1}\le s_{2n}-X_i(i>n)$ 转换一下限制就变成 $s_{i+n}-s_{i}\in[l ......
Atcoder Regular Contest Gateau 117

Atcoder Regular Contest 156 E - Non-Adjacent Matching

感觉可能没有银牌的难度(?),感觉有的铜牌题比这要难一些。 先猜一下什么样的 $\{x_i\}$ 是合法的。结论是 $\forall i,x_i+x_{i\bmod n+1}\le S-(x_i+x_{i\bmod n+1})$,且 $S$ 是偶数。必要性显然。充分性就考虑如果不存在任何一个 $i$ ......

AtCoder Regular Contest 164 A~C

A题都没做出来(被自已菜晕 ## A. **Ternary Decomposition** [A - Ternary Decomposition (atcoder.jp)](https://atcoder.jp/contests/arc164/tasks/arc164_a) ### 题意 给定一个正 ......
AtCoder Regular Contest 164

2022-2023 Winter Petrozavodsk Camp, Day 4: KAIST+KOI Contest 部分题解(持续更新)

[比赛链接](https://codeforces.com/gym/104345) # L [题面](https://codeforces.com/gym/104345/problem/L) ## Description 称由 $n$ 个点组成的无向图为简单的当且仅当满足如下条件: - 对于任意两个 ......
题解 Petrozavodsk Contest 部分 Winter

SMU Summer 2023 Contest Round 3

# [SMU Summer 2023 Contest Round 3](https://codeforces.com/group/L9GOcnr1dm/contest/450890) ## [A. Curriculum Vitae](https://codeforces.com/group/L9GO ......
Contest Summer Round 2023 SMU

【DP】DMOPC '21 Contest 8 P5 - Tree Building

[Problem Link](https://dmoj.ca/problem/dmopc21c8p5) 给定 $n,m$ 和一个长为 $m$ 的代价序列,对于一棵 $n$ 个节点,每个节点度数不超过 $m$ 的树,定义它的代价为 $\sum\limits_{i=1}^n a_{deg_i}$。求代价 ......
Building Contest DMOPC Tree 39

AtCoder Beginner Contest 161

# AtCoder Beginner Contest 161 https://atcoder.jp/contests/abc161 这套不算难,但是sb我还是写不出来是为什么呢 F是个妙妙题 ## C - Replacing Integer WA了一次所以放上来 ```CC #include #de ......
Beginner AtCoder Contest 161

AtCoder Beginner Contest 309 Ex Simple Path Counting Problem

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc309_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc309/tasks/abc309_h "AtCoder 传送门") 挺妙的题。 考虑 ......
Beginner Counting AtCoder Contest Problem

AtCoder Grand Contest 012 D Colorful Balls

[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc012_d "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc012/tasks/agc012_d "AtCoder 传送门") 不错的题。bx E ......
Colorful AtCoder Contest Grand Balls

The 2019 ICPC China Shaanxi Provincial Programming Contest(2019陕西省赛)

## B. Grid with Arrows 并查集一下。 ```cpp #include "bits/stdc++.h" using namespace std; using i64 = long long; struct UnionFind { int n; vector f; UnionFin ......
2019 Programming Provincial Contest Shaanxi

AtCoder Regular Contest 164 E Segment-Tree Optimization

[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc164_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc164/tasks/arc164_e "AtCoder 传送门") 妙妙题。 我们考虑 ......

Atcoder ABC 309 F

# [Atcoder ABC 309 F](https://atcoder.jp/contests/abc309/tasks/abc309_f) ## 题意 n个盒子,长宽高为$x,y,z,$(长宽高是相对的,可以任意调换),问是否有一个盒子可以完全容纳另一个盒子,即存在一个$A_i={x_i,y_ ......
Atcoder ABC 309

AtCoder Beginner Contest 309 G Ban Permutation

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc309_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc309/tasks/abc309_g "AtCoder 传送门") 前置知识:[[AR ......
Permutation Beginner AtCoder Contest 309

atcoder绿题选做

ABC305:E https://atcoder.jp/contests/abc305/tasks/abc305_e 题意:给定一个无向图,给定k个守卫,每个守卫有h[i]的耐力值,如果是一个在图中是被保护的要满足和守卫的距离至少为h[i],让你升序打印所有被守卫的点 解题思路:可以从守卫出发,看守 ......
atcoder

SMU Summer 2023 Contest Round 2

# [SMU Summer 2023 Contest Round 2](https://codeforces.com/group/L9GOcnr1dm/contest/450889) ## [A. Treasure Hunt](https://codeforces.com/group/L9GOcnr ......
Contest Summer Round 2023 SMU

atcoder总结

### ABC126E: 把 $Z_i$ 看成 $a_{Z_i}$了 `terrible` ### ABC[126F](https://www.luogu.com.cn/problem/AT_abc126_f) 一对数对另一数的贡献:可以看出来只有这种情况 $...aba...$ $a$把一个 $b ......
atcoder

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 ......
Contest Summer Round 2023 SMU

[Leetcode Weekly Contest]351

链接:[LeetCode](https://leetcode-cn.com/contest/weekly-contest-351/) ## [Leetcode]6451. 找出最大的可达成数字 给你两个整数 num 和 t 。 如果整数 x 可以在执行下述操作不超过 t 次的情况下变为与 num 相 ......
Leetcode Contest Weekly 351