atcoder digit 060d arc

ARC157

## ARC157 ### A 简单分讨即可 ```cpp #include using namespace std; int Abs(int x) { return x>0?x:-x; } int n; int A,B,C,D; int main() { scanf("%d %d %d %d %d ......
ARC 157

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

ARC154

## ARC154 ### A 似乎是均值反着用,直接最大乘最小即可 ```cpp #include using namespace std; const int MOD=998244353; int n; string A,B; int main() { // freopen("date.in", ......
ARC 154

[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

ARC154 E

非常好题目!!! 求和不好搞的话,我们先把他转成期望!最后再乘上 $(\frac{n(n+1)}{2})^m$。 然后拆贡献,考虑 $i$ 的系数: $$ \sum_{j\lt i}[P_j\gt P_i]-\sum_{j\gt i}[P_j\lt P_i] $$ 然后是特别波特的一步!这个东西对于 ......
ARC 154

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

ARC 补题笔记 1

## ARC156 ### A. Non-Adjacent Flip >给定长度为 $n\ (3\le n\le 2\times10^5)$ 的 01 串,每次选定 $1\le i,j\le n$ 且 $|i-j|\ge2$,将 $i,j$ 位上的数字 $x$ 变为 $1-x$。求全部数字变为 $1 ......
笔记 ARC

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

AT_arc113_c 题解

[洛谷链接](https://www.luogu.com.cn/problem/AT_arc113_c)&[Atcoder 链接](https://www.luogu.com.cn/remoteJudgeRedirect/atcoder/arc113_c) 本篇题解为此题**较简单做法**及**较少 ......
题解 AT_arc 113 arc AT

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

[ARC143B] Counting Grids 题解

[Counting Grids](https://www.luogu.com.cn/problem/AT_arc143_b) ### 题目大意 将 $1\sim n^2$ 填入 $n\times n$ 的网格 $A$ 中,对于每个格子满足以下条件之一: - 该列中存在大于它的数。 - 该行中存在小于 ......
题解 Counting Grids 143B ARC

AT_arc041_b 题解

[洛谷链接](https://www.luogu.com.cn/problem/AT_arc041_b)&[Atcoder 链接](https://www.luogu.com.cn/remoteJudgeRedirect/atcoder/arc041_b) 本篇题解为此题较**简单做法**及**较少 ......
题解 AT_arc 041 arc AT

AT_arc149_a 题解

[洛谷链接](https://www.luogu.com.cn/problem/AT_arc149_a)&[Atcoder 链接](https://atcoder.jp/contests/arc149/tasks/arc149_a) 本篇题解为此题较**简单做法**及**较少码量**,并且码风优良, ......
题解 AT_arc 149 arc AT

AT_arc154_b 题解

[洛谷链接](https://www.luogu.com.cn/problem/AT_arc154_b)&[Atcoder 链接](https://www.luogu.com.cn/remoteJudgeRedirect/atcoder/arc154_b) 本篇题解为此题较**简单做法**及**较少 ......
题解 AT_arc 154 arc AT

AT_arc157_a 题解

## 思路 看数据范围时能发现,这 $N$ 啥用也没有,因为 $A+B+C+D=N-1$。 首先,$B$,$D$ 为 $0$ 且 $A$,$C$ 为 $0$ 的情况是不可能有的,因为既然有 `XX` 和 `YY` 字符串,那么一定会至少组成一个 `XY` 或 `YX`,输出 `No`; 然后,$\l ......
题解 AT_arc 157 arc AT

[ARC150F] Constant Sum Subsequence

Problem StatementWe have a sequence of positive integers of length $N^2$, $A=(A_1,\ A_2,\ \dots,\ A_{N^2})$, and a positive integer $S$. For this sequ ......
Subsequence Constant 150F ARC 150

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

Vue项目启动 报错error:0308010C:digital envelope routines::unsupported

出现这个错误是因为 node.js V17版本中最近发布的OpenSSL3.0, 而OpenSSL3.0对允许算法和密钥大小增加了严格的限制,可能会对生态系统造成一些影响. 解决方法 package.json增加配置"scripts": { "serve": "set NODE_OPTIONS op ......

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 报告