ABC185 - Atcoder/Python精進のための解説メモ
2021/04/12
ABC185 - A.ABC Preparation
AtCoder公式 | ABC185 - A.ABC Preparation解答
aaa = list(map(int, input().split()))
print(min(aaa))
要点メモ
- 開催には各点数別の問題が必要なので、それぞれの問題数のうち最小値が答え
ABC185 - B.Smartphone Addiction
AtCoder公式 | ABC185 - B.Smartphone Addiction解答
n, m, t = map(int, input().split())
cnt = 0
tmp_n = n
ans = 'Yes'
for _ in range(m):
a, b = map(int, input().split())
tmp_n -= a - cnt
if tmp_n <= 0:
ans = 'No'
break
cnt = a
tmp_n += b - cnt
tmp_n = n if tmp_n > n else tmp_n
cnt = b
ans = 'No' if tmp_n - t + cnt <= 0 else ans
print(ans)
要点メモ
- 丁寧にループ処理できるかを聞かれている問題な感じ
- 出力例をよく見て想像するのが大事そう
ABC185 - C.
AtCoder公式 | ABC185 - C.解答
まだ解いてません
要点メモ
ABC185 - D.
AtCoder公式 | ABC185 - D.解答
まだ解いてません