Skip to content

Instantly share code, notes, and snippets.

View monchy-monchy's full-sized avatar

monchy-monchy

View GitHub Profile
@monchy-monchy
monchy-monchy / ABC117 B - Polygon
Created August 4, 2021 23:10
ABC117 B - Polygon
N = int(input())
L = list(map(int, input().split()))
l_max = max(L)
if sum(L)-l_max > l_max:
print("Yes")
else:
print("No")
@monchy-monchy
monchy-monchy / ABC118 B - Foods Loved by Everyone
Created August 4, 2021 04:44
ABC118 B - Foods Loved by Everyone
N, M = list(map(int, input().split()))
A = []
for n in range(N):
A.append(list(map(int, input().split())))
m = [0]*M
answer = 0
for n in range(N):
for k in range(1, A[n][0]+1):
@monchy-monchy
monchy-monchy / ABC119 B - Digital Gifts
Created August 4, 2021 01:14
ABC119 B - Digital Gifts
N = int(input())
xu = []
for n in range(N):
xu.append(input().split())
BTC = 380000.0
answer = 0
for x, u in xu:
if u == "JPY":
@monchy-monchy
monchy-monchy / ABC120 B - K-th Common Divisor
Created August 4, 2021 01:06
ABC120 B - K-th Common Divisor
A, B, K = list(map(int, input().split()))
M = min(A, B)
l = []
for m in range(1, M+1):
if A % m == 0 and B % m == 0:
l.append(m)
print(l[-K])
@monchy-monchy
monchy-monchy / ABC121 B - Can you solve this?
Created August 4, 2021 00:56
ABC121 B - Can you solve this?
N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
A = []
for n in range(N):
A.append(list(map(int, input().split())))
answer = 0
for n in range(N):
x = 0
@monchy-monchy
monchy-monchy / ABC122 B - ATCoder
Created August 3, 2021 12:54
ABC122 B - ATCoder
S = input()
count = 0
ACGT = ["A", "C", "G", "T"]
count = 0
for i in range(len(S)):
for j in range(i+1, len(S)+1):
check = True
@monchy-monchy
monchy-monchy / ABC123 B - Five Dishes
Created August 3, 2021 06:28
ABC123 B - Five Dishes
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
_, a = divmod(A,10)
_, b = divmod(B,10)
_, c = divmod(C,10)
_, d = divmod(D,10)
@monchy-monchy
monchy-monchy / ABC124 B - Great Ocean View
Created August 2, 2021 02:15
ABC124 B - Great Ocean View
N = int(input())
H = list(map(int, input().split()))
v = 0
h = 0
for n in range(N):
r = H[n]
if r >= h:
v += 1
@monchy-monchy
monchy-monchy / ABC125 B - Resale
Created August 2, 2021 02:06
ABC125 B - Resale
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
X = 0
Y = 0
for i in range(N):
x = V[i]
y = C[i]
@monchy-monchy
monchy-monchy / ABC126 B - YYMM or MMYY
Created August 2, 2021 01:45
ABC126 B - YYMM or MMYY
S = input()
s1 = int(S[:2])
s2 = int(S[2:])
YYMM = True
MMYY = True
if s1 > 12 or s1 == 0:
MMYY = False