ATCODER

AtCoder Beginner Contest (ABC) 313 D-E

Tasks - AtCoder Beginner Contest 313 PS:当时看到D过的比E多就一直在考虑D,但还没做出来,其实个人感觉E比D简单。 D - Odd or Even 交互题。有n个数,最多可以询问n次然后要求判断出这n个数的奇偶性。每次可以询问数组里任意k个元素的和是不是奇数 ......
Beginner AtCoder Contest ABC 313

AtCoder Beginner Contest 313

# AtCoder Beginner Contest 313 ## G - Redistribution of Piles ### 题意翻译: 给定一个数列$a_i(a_i>0, i\in[1,n])$,和一个数$s$(初值为0),有两种操作 - A - 全局非零数减一,减去的和加到$s$ - B ......
Beginner AtCoder Contest 313

AtCoder Beginner Contest 313 A-E Code

比赛链接:AtCoder Beginner Contest 313 - AtCoder A: #include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int ......
Beginner AtCoder Contest Code 313

AtCoder Beginner Contest 313

> ~~貌似这次很难,还好去吃烧烤了~~ ## [A - To Be Saikyo (abc313 A)](https://atcoder.jp/contests/abc313/tasks/abc313_a) ### 题目大意 给定$n$个数$a_i$,问第一个数要成为唯一的最大的数,应该加多少。 ......
Beginner AtCoder Contest 313

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

Toyota Programming Contest 2023#4(AtCoder Beginner Contest 311)

# Preface 补下好久之前打的比赛博客 这场前面都写的挺稳的,然后一到G就降智了没写出来 # A - First ABC 签到 ```cpp #include #include #include #include #include #include #include #include #inc ......
Contest Programming Beginner AtCoder Toyota

nfls15095 Atcoder-abc123_d 蛋糕

Atcoder-abc123_d AT 小卖部从下学期开始售卖带有数字形状的蛋糕,$X$,$Y$ 和 $Z$ 种蛋糕分别带有 $1$ 形,$2$ 形和 $3$ 形蜡烛,而且每个蛋糕都有美味值,如下所示: - 带有 $1$ 形蜡烛的美味值有: $A_1,A_2,\cdots,A_X$ - 带有 $2$ ......
Atcoder-abc 蛋糕 Atcoder 15095 nfls

Practice on Codeforces and Atcoder in July

## [$1844E$](https://codeforces.com/problemset/problem/1844/E) 题意: 定义一个矩形 $a$ 是好的,当且仅当其满足以下条件: 1. 矩形中每一个元素 $x$ 都为 $A,B,C$ 其中之一 2. 每一个 $2\times 2$ 的子矩形 ......
Codeforces Practice Atcoder July and

Practice on Codeforces and Atcoder in June

# $Practice$ $on$ $codeforces$ $in$ $June$ wk,误删了4个题,但我不想补了 ## [$CF1839D$](https://codeforces.com/contest/1839/problem/D) 题意:给一个正整数序列 $a$,给定 $k$ 个 0,将 ......
Codeforces Practice Atcoder June and

Practice on Codeforces and Atcoder in May

# CF补题题解2023.5 说明:CF题直接去luogu看翻译,AT题会附上简要题意 ## [CF1821E](https://codeforces.com/contest/1821/problem/E) 先考虑如何高速计算权值 一个显而易见的贪心是尽量在右边取括号消除,设右括号为 1,左括号为 ......
Codeforces Practice Atcoder May and

UNIQUE VISION Programming Contest 2023 Summer(AtCoder Beginner Contest 312)

# Preface 最唐氏的一集,尽情欣赏ABC E题战俘的丑态 这场打的时候就很抽象,各种傻逼错误频发,从B题一路WA到G题 还好发现E后面的题更简单后马上把FG写了,不然要爆炸了 # A - Chord 签到 ```cpp #include #include #include #include ......
Contest Programming Beginner AtCoder UNIQUE

AtCoder Beginner Contest 165

# AtCoder Beginner Contest 165 https://atcoder.jp/contests/abc165 ## C - Many Requirements dfs ```CC #include using namespace std; const int N = 15, M ......
Beginner AtCoder Contest 165

AtCoder Beginner Contest 312

# A - Chord ```cpp #include using namespace std; int32_t main() { ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr); string s; cin >> s ......
Beginner AtCoder Contest 312

[UNIQUE VISION Programming Contest 2023 Summer(AtCoder Beginner Contest 312) - AtCoder](https://atcoder.jp/contests/abc312)

# [UNIQUE VISION Programming Contest 2023 Summer(AtCoder Beginner Contest 312) - AtCoder](https://atcoder.jp/contests/abc312) ## [A - Chord (atcoder.j ......
Contest AtCoder Programming 312 Beginner

[ARC119F] AtCoder Express 3

有简单做法,但是pb大神讲了自动机做法。 这么有趣的自动机不去做?亏大发。 有两个重要的观察。 当你出现长度大于 $4$ 的连续段时,一定会向后走一次并跳过这一段。 某些时候,当你能用同样的步数走到最后的两个格子,且中一个是 $\rm A$,一个是 $B$ 时,可以看作你处于一个既能是 $\rm A ......
AtCoder Express 119F ARC 119

Atcoder-Beginner-Contest-312 A~Ex

# [$Atcoder-Beginner-Contest-312$](https://atcoder.jp/contests/abc312/) AB过于简单,在此略去。 ## [$C-Invisible$ $Hand$](https://atcoder.jp/contests/abc312/task ......

AtCoder Beginner Contest 312

## [A - Chord (abc312 A)](https://atcoder.jp/contests/abc312/tasks/abc312_a) ### 题目大意 给定一个长度为$3$的字符串,问是不是`ACE, BDF, CEG, DFA, EGB, FAC, GBD`中的一个。 ### ......
Beginner AtCoder Contest 312

(AtCoder Beginner Contest 312)

(AtCoder Beginner Contest 312) A - Chord #include<bits/stdc++.h> using namespace std; #define int long long //#define int __int128 typedef pair<int,in ......
Beginner AtCoder Contest 312

Atcoder ABC259H Yet Another Path Counting

首先可以想到有组合数的方法: 令起点为 $(x1, y1)$,终点为 $(x2, y2)$,则路径方案数就为 $\binom{x2 + y2 - x1 - y1}{x2 - x1}$,这样设有 $k$ 个相同颜色的点,时间复杂度就为 $O(k^2)$。 再考虑到还有 $\text{DP}$ 方法: ......
Counting Atcoder Another 259H Path

Atcoder ARC060D Digit Sum

看到 $n\le 10^{11}$,考虑按根号分为两部分处理。 对于 $b\le \sqrt{n}$,考虑直接暴力算 $\operatorname{f}(b, n)$ 判断是否等于 $s$,这部分的计算量是 $O(\sqrt{n})$ 级别的。 对于 $\sqrt{n} n$,这个时候 $\oper ......
Atcoder Digit 060D ARC 060

AtCoder Beginner Contest 311

AtCoder Beginner Contest 311 First ABC 思路:找到第一个a,b,c都出现的位置 #include<bits/stdc++.h> using namespace std; #define int long long //#define int __int128 t ......
Beginner AtCoder Contest 311

AtCoder Beginner Contest 311

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

AtCoder Grand Contest 040 E Prefix Suffix Addition

[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc040_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc040/tasks/agc040_e "AtCoder 传送门") 比较神奇的题。 考 ......
Addition AtCoder Contest Prefix Suffix

Toyota Programming Contest 2023#4(AtCoder Beginner Contest 311)

# Toyota Programming Contest 2023#4(AtCoder Beginner Contest 311) ## [A - First ABC (atcoder.jp)](https://atcoder.jp/contests/abc311/tasks/abc311_a) * ......
Contest Programming Beginner AtCoder Toyota

Atcoder ARC058E Iroha and Haiku

题目中的式子转化一下即存在一位 $i$ 使得到 $i$ 时的后缀和存在 $X + Y + Z, Y + Z, Z$,再发现 $X + Y + Z\le 17$,考虑状压。 设 $f_{i, j}$ 为填了 $i$ 个数当前后缀和中存在的数的状态为 $j$(只存 $0\sim X + Y + Z$ 的 ......
Atcoder Iroha Haiku 058E ARC

AtCoder Beginner Contest 311 G One More Grid Task

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc311_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc311/tasks/abc311_g "AtCoder 传送门") 考虑一维怎么做。 ......
Beginner AtCoder Contest More Grid

Atcoder ABC311F Yet Another Grid Task

发现 $(i, j)$ 若为黑色则就会有一个 $(i, j)$ 为最高点的阶梯形的图形被染黑(阶梯形指对于 $1\le i\le x$ 第 $i$ 列第 $x - i + 1$ 行及以下都是黑色)。 那么能发现其实每个列只需要记录最高的黑色点行数即可,因为及其以下的点肯定都是黑色。 考虑设 $f_{ ......
Atcoder Another 311F Grid Task

Atcoder ABC311G One More Grid Task

可以想到枚举最小值同时算出包含其的最大矩阵和。 考虑枚举行的上下界,再枚举最小值然后求出最大的列的范围,因为 $a_{i, j}\ge 1$ 列的范围越广矩阵和也越大。 考虑如何算出列的范围,令第 $i$ 列在选中的行的范围内的最小值为 $mn_i$,则对于 $mn_i$ 的列 的范围 $[l, r ......
Atcoder 311G More Grid Task

「解题报告」Toyota Programming Contest 2023#4(AtCoder Beginner Contest 311)

比赛地址:[Toyota Programming Contest 2023#4(AtCoder Beginner Contest 311) - AtCoder](https://atcoder.jp/contests/abc311) 后记:大家都太强了%%%,如果我做不出第四题就要掉分了。。。 ## ......
Contest Programming Beginner AtCoder 报告

Atcoder ARC058B Iroha and a Grid

考虑从第 $b$ 列与第 $b + 1$ 之间分开这个矩阵,钦定 $(i, b)$ 下一步必须走到 $(i, b + 1)$,可以发现这样是不会漏算或算重的。 于是就可以用乘法原理算出这个 $i$ 的贡献:$\binom{(i - 1) + (b - 1)}{i - 1}\times \binom{ ......
Atcoder Iroha 058B Grid ARC