atcoder-abc medicine atcoder abc
AtCoder Beginner Contest(abc) 297
*** ## B - [chess960](https://atcoder.jp/contests/abc297/tasks/abc297_b) #### 题目大意 >给定一串字符串, 里面一定包含2个' B ', 2个' R ', 1个' K ', 问该字符串是否满足以下两个条件, 一是两个'B' ......
AtCoder Beginner Contest 296 Ex Unite
[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc296_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc296/tasks/abc296_h "AtCoder 传送门") 不错的 dp。 考 ......
AtCoder Beginner Contest 227 H Eat Them All
[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc227_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc227/tasks/abc227_h "AtCoder 传送门") 好奇特的题。 考虑 ......
AtCoder Beginner Contest 306(ABC 306) E~F补题
# E ### 题目大意 给定数字\$k\$,规定数组 $A$ 的函数 $f(A)$ :$A$ 数组前 $k$ 大数字的和 - 如 $A=[1,~3,~7,~4]$ ,$k=2$ ,则 $f(A)=7+4=11$ 现在给定最大数组长度 $n$ ,有 $q$ 组操作,每次将第 $x$ 个数字修改为 $ ......
AtCoder Beginner Contest 228 G Digits on Grid
[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc228_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc228/tasks/abc228_g "AtCoder 传送门") ?这啥啊,不会。 ......
[ABC307G] Approximate Equalizatio
# [ABC307G] Approximate Equalizatio ## 题意 给定一个数组 $a_i$ ,有两种操作。 1. $a_i+1,a_{i+1}-1$ 2. $a_i-1,a_{i+1}+1$ 问最少花费多少次操作能使数组的极差不超过 $1$。 ## 题解 容易发现总和不变,由于极差 ......
AtCoder Beginner Contest 072
# A - Sandglass2 ```cpp #include using namespace std; #define int long long int32_t main() { int a , b; cin >> a >> b; cout using namespace std; #defi ......
AtCoder Beginner Contest 238 Ex Removing People
[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc238_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc238/tasks/abc238_h "AtCoder 传送门") 考虑期望转计数,方 ......
AtCoder Beginner Contest 307 Ex Marquee
[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc307_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc307/tasks/abc307_h "AtCoder 传送门") 一开始看错题了,看 ......
AtCoder Beginner Contest(abc) 307
*** ## A - [Weekly Records](https://atcoder.jp/contests/abc307/tasks/abc307_a) #### 题目大意 >小莫每天跑步, 输入n周每天的步数, 输出每周跑的总步数; #### 解题思路 >签到题不多嗦了; #### 神秘代码 ......
AtCoder Beginner Contest 307 G Approximate Equalization
[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc307_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc307/tasks/abc307_g "AtCoder 传送门") 考虑我们如果确定了 ......
AtCoder Beginner Contest 245 Ex Product Modulo 2
[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc245_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc245/tasks/abc245_h "AtCoder 传送门") 很好的题。 下文令 ......
AtCoder Beginner Contest 307 ABCDE
# [AtCoder Beginner Contest 307](https://atcoder.jp/contests/abc307) ## **A - Weekly Records** ### Problem Statement 题意:告诉你有几个礼拜,问你每个礼拜走的路程和。 ### Solu ......
AtCoder Beginner Contest 267 ABCDE
# [AtCoder Beginner Contest 267](https://atcoder.jp/contests/abc267) ## **A - Saturday** ### Problem Statement 题意:问你给定的天到礼拜六还要几天。 思路:直接算。 ```c++ #incl ......
AtCoder Beginner Contest 252 Ex K-th beautiful Necklace
[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc252_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc252/tasks/abc252_h "AtCoder 传送门") ~~不知道为什么可 ......
abc061d <单源最短路, spfa, 判断负环>
[D - Score Attack](https://atcoder.jp/contests/abc061/tasks/abc061_d) ``` // https://atcoder.jp/contests/abc061/tasks/abc061_d // 单源最短(长)路, spfa, 判断负( ......
abc060d <dp, 背包>
[D - Simple Knapsack](https://atcoder.jp/contests/abc060/tasks/arc073_b) ``` // https://atcoder.jp/contests/abc060/tasks/arc073_b // 背包问题 // 特别在于, 背包体 ......
蔚来手撕代码题:三个线程循环打印ABC
问题如下: ![image.png](https://cdn.nlark.com/yuque/0/2023/png/92791/1687573711593-3af01c01-92b6-4a09-8a2c-355a7dde1033.png#averageHue=%23f9f8f7&clientId=u ......
AtCoder Beginner Contest 307
## [A - Weekly Records (abc307 A)](https://atcoder.jp/contests/abc307/tasks/abc307_a) ### 题目大意 给定$n$周每天的散步量,求每周七天的散步量的和。 ### 解题思路 累计求和即可。 神奇的代码 ```cpp ......
AtCoder Beginner Contest 212(E,F)
# AtCoder Beginner Contest 212(E,F) ## E(dp) [E](https://atcoder.jp/contests/abc212/tasks/abc212_e) 题目大意为有$n$个点,我们需要找到$k+1$个点,用数组$A$表示,其中,$A_i$和$A_{i+ ......
[ABC259F] Select Edges 题解
### Solution 考虑树形 $dp$。 我们可以注意到节点 $i$ 的相邻的边中被选中的不超过 $d_i$ 条,显然我们可以定义状态 $dp_{u,k}$ 表示节点 $u$ 连接子节点的边有 $k$ 条的最大值。 但是此处没有给定 $d_i$ 的范围,所以对于一个节点最多可能会有 $n-1$ ......
AtCoder Beginner Contest(abc) 299
*** ## A - [Treasure Chest](https://atcoder.jp/contests/abc299/tasks/abc299_a) #### 题目大意 >给定一个由' | ' ' * '和' . '组成的字符串, 并且保证一定有1个' * '和2个' | ', 检查' * ......
AtCoder Regular Contest 154 E Reverse and Inversion
[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc154_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc154/tasks/arc154_e "AtCoder 传送门") 好题! 考虑如何更 ......
AtCoder Regular Contest 154 D A + B > C ?
[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc154_d "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc154/tasks/arc154_d "AtCoder 传送门") **看到这种题,应 ......
AtCoder Regular Contest 154 C Roller
[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc154_c "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc154/tasks/arc154_c "AtCoder 传送门") 被这题干爆了![] ......
【题解】AtCoder-ABC306G Return to 1
这也太强了! 容易想到的是用若干环拼出这个 $10^{10^{100}}$,也就是这些环的 $\gcd \mid 10$。 之后就不会了。 先正图反图两次 DFS,只留下 $1$ 所在强连通分量里的边,对正图跑 DFS 生成树,定义其深度从 $0$ 开始,然后有一个结论是:对于任何正整数 $a$,图 ......
AtCoder Beginner Contest 174
# A - Air Conditioner ```cpp #include using namespace std; int main() { int x; cin >> x; if( x >= 30 ) cout using namespace std; #define int long long ......
abc059d <博弈, 打表找规律>
[D - Alice&Brown](https://atcoder.jp/contests/abc059/tasks/arc072_b) #### 如何打表 要善于通过打表展示视觉信息, 从而找到规律; ``` #include #include using namespace std; typed ......
AtCoder Beginner Contest 229(F,G)
# AtCoder Beginner Contest 229(F,G) ## F(二部图,dp) [F](https://atcoder.jp/contests/abc229/tasks/abc229_f) 这个题大致是给你$n+1$个点,为$0$到$n$,然后$n$条边是点$0$到$1...n$这 ......