atcoder-abc medicine atcoder abc

abc053d <简单贪心>

https://atcoder.jp/contests/abc053/tasks/arc068_b ```cpp // https://atcoder.jp/contests/abc053/tasks/arc068_b // 当某个数字个数n>=3, 可直接拿出3个进行操作, 每次减少两个 ; // ......
053d abc 053 lt gt

abc042d <组合数>

https://atcoder.jp/contests/abc042/tasks/arc058_b- ```cpp // 分成两段, 计算组合数, 枚举分段点; 注意组合数需要使用递推, 否则超时 #include #include using namespace std; typedef long ......
042d abc 042 lt gt

[ABC282Ex] Min + Sum

[ABC282Ex] Min + Sum 一道分治题。比较新的地方在于,别的题都是按中点为M分治,而这道题是按最小值为M分治。记录b的前缀和sum。【L,R】最小值为M,则分为【L,M-1】,【M+1,R】。 #include<bits/stdc++.h> using namespace std; ......
ABC 282 Min Sum Ex

【题解】[ABC306G] Return to 1(数论)

# 【题解】[ABC306G] Return to 1 ## 题目链接 [ABC306G - Return to 1](https://atcoder.jp/contests/abc306/tasks/abc306_g) ## 题意概述 本题多测,$T$ 组数据。 对于每组数据,给定一个 $n$ 个 ......
数论 题解 Return 306G ABC

AtCoder Beginner Contest 220 H Security Camera

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc220_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc220/tasks/abc220_h "AtCoder 传送门") 看到数据范围猜复杂 ......
Beginner Security AtCoder Contest Camera

AtCoder Beginner Contest 306 题解 A - E

## [A](https://atcoder.jp/contests/abc306/tasks/abc306_a) - Echo ### 题目大意 给定一个字符串,需要把它每个字符重复输出。 ### 解题思路 可以读完整个字符串,也可以按照字符读一个输出两个。 ### AC Code ```cpp ......
题解 Beginner AtCoder Contest 306

题解:【ABC168F】 . (Single Dot)

[题目链接](https://www.luogu.com.cn/problem/AT_abc168_f) 挺套路的题。如果值域和线段数量同阶,可以预处理不能越过的线段,使用状压四个方向记录每个节点能不能往这个方向走,然后直接爆搜就好了,标记上能走到哪些地方。但这个值域一看就是没有救的,于是就要拿出来 ......
题解 Single 168F ABC 168

AtCoder ABC306 DEF

## [D - Poisonous Full-Course](https://atcoder.jp/contests/abc306/tasks/abc306_d)(DP) ### 题意 现在有 $N$ 道菜,高桥需要依次享用。第 $i$ 道菜有两个属性 $(X_i,Y_i)$,其意义是: - 若 $ ......
AtCoder ABC 306 DEF

AtCoder Beginner Contest 306 G Return to 1

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc306_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc306/tasks/abc306_g "AtCoder 传送门") 考虑若干个能被 $ ......
Beginner AtCoder Contest Return 306

How to AK ABC306

# How to AK ABC306 ## A 题意:吧字符串的每个字符连续输出两遍,记得不要快读,不要忘记输入 $ n $ 纪念 Qinzh A 题 WA 掉 ## B 题意:给定长度为 $ 64 $ 的数组 $ A $,输出 $ \sum_{i = 0}^{63} A_i2^i $ 暴力模拟即可 ......
How ABC 306 AK to

[ABC299G]MinimumPermutation

# [[ABC299G] Minimum Permutation](https://www.luogu.com.cn/problem/AT_abc299_g) 考虑一个必要的性质:如果现在有一个数 $x_1$,它后面有一个数 $y<x_1$,且 $x_1$ 又在 $y$ 后面出现了若干次($x_2, ......
MinimumPermutation 299G ABC 299

【题解】Atcoder ABC300 F.More Holidays(线性做法)

## F.More Holidays ### 题目描述: 给你一个由 `o` 和 `x` 组成的长度为 $N$ 的字符串 $S$,以及整数 $M$ 和 $K$。保证 $S$ 至少包含一个 `x`。 假设 $T$ 是由 $S$ 复制 $M$ 次而成的长度为 $NM$ 的字符串。考虑将 $T$ 中的 $ ......
题解 线性 Holidays 做法 Atcoder

[ABC241G] Round Robin

# [ABC241G] Round Robin ## 题意 $ N $ 名玩家进行循环赛。总共进行 $ \frac{N(N-1)}{2} $ 场比赛,比赛必然分出胜负,不存在平局,一场比赛中胜者获得 $ 1 $ 分。 当前进行了 $ M $ 场比赛,其中第 $ i $ 场 $ W_i $ 打败了 $ ......
Round Robin 241G ABC 241

ABC306

## T1:[Echo](https://atcoder.jp/contests/abc306/tasks/abc306_a "Echo") 模拟 代码实现 ``` n = int(input()) s = input() ans = '' for c in s: ans += c+c print( ......
ABC 306

ABC306 Poisonous Full-Course

[Atcoder题目链接](https://atcoder.jp/contests/abc306/tasks/abc306_d "Atcoder题目链接") ## 题目大意 Takahashi 要品尝 $N$ 个菜品.这些菜品中有些是有毒的,有些是解药.当他吃下第 $i$ 个菜品时,他的总美味值会增 ......
Full-Course Poisonous Course Full ABC

AtCoder Beginner Contest 306

## [A - Echo (abc306 a)](https://atcoder.jp/contests/abc306/tasks/abc306_a) ### 题目大意 给定一个字符串,将每个字符输出两次。 ### 解题思路 模拟即可。 神奇的代码 ```cpp #include using nam ......
Beginner AtCoder Contest 306

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

ABC263G 题解

## 前言 [题目传送门!](https://www.luogu.com.cn/problem/AT_abc263_g) [更好的阅读体验?](https://www.cnblogs.com/liangbowen/p/17487119.html) 网络流。很好的题目。 ## 思路 数据范围不大但是又 ......
题解 263G ABC 263

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

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

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

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