atcoder equal 100d arc

AtCoder Beginner Contest 242 Ex Random Painting

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc242_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc242/tasks/abc242_h "AtCoder 传送门") 好久没复习过 mi ......
Beginner Painting AtCoder Contest Random

AtCoder ABC228D 题解

## [ABC299D] Find by Query题解 ### 0x00 题目分析 #### [题目传送门](https://www.luogu.com.cn/problem/AT_abc299_d) 经过分析,我们得到的几个**关键信息**: > - $n \le 2 \times 10^5$ ......
题解 AtCoder 228D ABC 228

AtCoder ABC056D 题解

## [题目直达](https://www.luogu.com.cn/problem/AT_arc070_b) ## 0x00 思路 从大到小枚举每个元素,同时加入 $sum$ 进行累计,当 $k \le sum$ 时,便会返现之前的元素可以构成“好的组”(因为他们都大于 $p_i$),即有用的,所 ......
题解 AtCoder 056D ABC 056

AtCoder ABC047D 题解

## 题意理解&分析: 大概的题意应该是十分清晰的,就是一个人要从 $1$ 到 $n$ 的城市中买苹果。另一个人要其中调整价格。 这里的调整也不需要太多,就 $1$ 就可以了。但是,如果有多组购买方案可以得到**相同**的利润,就还需要将其他相同的价格**一并调整**。这道题的**关键**就在于求出 ......
题解 AtCoder 047D ABC 047

AtCoder ABC108C 题解

这是一道 AtCoder 的 ABC108C Triangular Relationship 题目。 ### 题目翻译 给定 $N$ 和 $K$,找出所有满足 $a+b,b+c,c+a$ 均为 $K$ 的倍数的 $(a,b,c)$,其中 $a,b,c$ 都是 $\le N$ 的正整数。$a,b,c$ ......
题解 AtCoder 108C ABC 108

AtCoder Beginner Contest 221 G Jumping sequence

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc221_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc221/tasks/abc221_g "AtCoder 传送门") 这个数据范围让我们 ......
Beginner sequence AtCoder Contest Jumping

AtCoder Beginner Contest 291 DEF

# [AtCoder Beginner Contest 291](https://atcoder.jp/contests/abc291) ## D - Flip Cards ### Problem Statement 题意:$N$张卡片,编号$1$到$N$,每张卡片有正反两面,写有数字,初始状态都是 ......
Beginner AtCoder Contest 291 DEF

AtCoder Beginner Contest 294 E

# [AtCoder Beginner Contest 294](https://atcoder.jp/contests/abc294) ## E - 2xN Grid ### Problem Statement 题意:给你$2$行长度为$L$的矩阵。告诉你格子里面的数字,以$vi$ $li$的形式 ......
Beginner AtCoder Contest 294

AtCoder Beginner Contest 302 ABCDEF

# [AtCoder Beginner Contest 302](https://atcoder.jp/contests/abc302) ## **A - Attack** ### Problem Statement 题意:敌人有$A$的耐力值,每次攻击敌人可以减少$B$的耐力值,问多少次敌人耐力值 ......
Beginner AtCoder Contest ABCDEF 302

AtCoder Beginner Contest 305 ABCDE

# [AtCoder Beginner Contest 305](https://atcoder.jp/contests/abc305) ## A - Water Station ### Problem Statement 题意:水站每$5km$设一个,给你一个$N$ $km$的位置,问你离它最近的 ......
Beginner AtCoder Contest ABCDE 305

ARC114F Permutation Division

## 题意 给定一个 $1 \sim N$ 的排列,Alice 把它划分成 $k$ 段,Bob 把这 $k$ 段任意排列。Alice 想让字典序最小,Bob 想让字典序最大。请问最后的排列。 数据范围: $1\le k\le N\le 2 \times 10^5$。 ## 题解 首先 Bob 的排序 ......
Permutation Division 114F ARC 114

AtCoder Beginner Contest 275 G Infinite Knapsack

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc275_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc275/tasks/abc275_g "AtCoder 传送门") 原问题等价于: > ......
Beginner Infinite Knapsack AtCoder Contest

ARC117F Gateau

## 题意 有一个 $2N$ 个位置的圆,每个位置可以放任意多个物品(可以不放)。有 $2N$ 条要求,形如第 $i \sim i+N-1$ 范围内的位置上总共至少有 $A_i$ 个物品($0\le i<2N$,其中第 $j(j\ge 2N)$ 号位置其实是 $j-2N$ 号)。问放置的物品总数至少 ......
Gateau 117F ARC 117

AtCoder Beginner Contest 253 Ex We Love Forest

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc253_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc253/tasks/abc253_h "AtCoder 传送门") 没做出来。 考虑求 ......
Beginner AtCoder Contest Forest Love

Leetcode Hot 100 & 560. Subarray Sum Equals K

参考资料: 考点:子串 & [题干] 1 Input: nums = [1,1,1], k = 2 2 Output: 2 这道题说实话看得我一脸懵,第一时间想到的自然是双层循环遍历的一个$O(n^2)$的解法,也就是官方的解法一。但是使用这种解法会超时(Python语言是这样的,评论区有人提到了) ......
Leetcode Subarray Equals Hot 100

AtCoder Beginner Contest 298 Ex Sum of Min of Length

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc298_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc298/tasks/abc298_h "AtCoder 传送门") 挺无脑的。是不是因 ......
Beginner AtCoder Contest Length of

AtCoder Beginner Contest 251 G Intersection of Polygons

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc251_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc251/tasks/abc251_g "AtCoder 传送门") 经典结论,一个点 ......

“==”和“equals”的区别

“==”既可以比较引用对象,也可以比较基本数据类型。当是引用对象时,比较其地址是否一样,是否为同一对象。基本数据类型则比较其值。 “equals” 是object的一个方法。比较时看是否重写equals方法。默认是比较是否为同一对象,但是例如 String类重写了,可以比较字符串值是否相等。 ......
equals

AtCoder Beginner Contest 220 G Isosceles Trapezium

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc220_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc220/tasks/abc220_g "AtCoder 传送门") 简单题。 首先肯定 ......
Isosceles Trapezium Beginner AtCoder Contest

AtCoder Beginner Contest 227 E Swap

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc227_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc227/tasks/abc227_e "AtCoder 传送门") 感觉是很裸的题。 ......
Beginner AtCoder Contest Swap 227

AtCoder Beginner Contest 249 G Xor Cards

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc249_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc249/tasks/abc249_g "AtCoder 传送门") 好题。 套路地,考 ......
Beginner AtCoder Contest Cards 249

子类重写equals

Java的equals()方法是在Object超类中定义的,其他例如String类调用的equals()方法都是被重写过的: > Object类中的equals()方法: ```Java public boolean equals(Object obj) { return (this == obj) ......
子类 equals

AtCoder Beginner Contest 305 题解 A - F

## [A](https://atcoder.jp/contests/abc305/tasks/abc305_a) - Water Station ### 题目大意 找到离给定的数最近的一个 $5$ 的倍数输出即可。 ### 解题思路 我们取这个数对 $5$ 的上下界,也就是整数除以 $5$ 再乘以 ......
题解 Beginner AtCoder Contest 305

AtCoder Beginner Contest 219 H Candles

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc219_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc219/tasks/abc219_h "AtCoder 传送门") 套路化了。 比较显 ......
Beginner AtCoder Contest Candles 219

AtCoder Beginner Contest 223 H Xor Query

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc223_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc223/tasks/abc223_h "AtCoder 传送门") 考虑一个无脑做法: ......
Beginner AtCoder Contest Query 223

AtCoder Beginner Contest 215 H Cabbage Master

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc215_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc215/tasks/abc215_h "AtCoder 传送门") 考虑第一问。 发现 ......
Beginner AtCoder Contest Cabbage Master

AtCoder Regular Contest 141 C Bracket and Permutation

[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc141_c "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc141/tasks/arc141_c "AtCoder 传送门") 考虑给出 $S$, ......
Permutation AtCoder Regular Contest Bracket

AtCoder Beginner Contest 273(E)

# AtCoder Beginner Contest 273(E) ## E(链式结构,思维) [E](https://atcoder.jp/contests/abc273/tasks/abc273_e) 题目大意就是原本有一个空的序列,我们后面会进行$q$次操作,每次操作我们都需要输出此时的序列的 ......
Beginner AtCoder Contest 273

Atcoder ARC071E TrBBnsformBBtion

考虑把所有的 `B` 都变为 `A` 来处理,因为 `A` 和 `B` 是可以互换的,就只需要判断 $s_{a_i\cdots b_i}$ 和 $t_{c_i\cdots d_i}$ 对应的 `A` 的个数能不能在操作后相等。 `A` 的个数前缀和维护即可。 考虑 1 操作,发现其实可以 $1$ 个 ......
TrBBnsformBBtion Atcoder 071E ARC 071

AtCoder Beginner Contest 265 F Manhattan Cafe

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc265_f "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc265/tasks/abc265_f "AtCoder 传送门") 考虑 dp,$f_ ......
Manhattan Beginner AtCoder Contest Cafe