AtCoder Beginner Contest 062/AtCoder Regular Contest 074
はい。
https://beta.atcoder.jp/contests/abc062
A - Grouping
Python3
x,y=map(int,input().split()) a=[4,6,9,11] if x==2 or y==2 or (x in a and y not in a) or (x not in a and y in a): print("No") else: print("Yes")
調べる。
B - Picture Frame
Python3
h,w=map(int,input().split()) for i in range(h+2): if i==0 or i==h+1: print("#"*w+"##") else: a=input() print("#"+a+"#")
"#"をつけて出力。
C - Chocolate Bar
Python3
h,w=map(int,input().split()) ans=h*w for x,y in ((h,w),(w,h)): x1=x//3 x2=(x+2)//3 y2=(y+1)//2 ans=min(ans,abs(y*x2-y*x1)) t=(y*x1,y2*(x-x1),(y-y2)*(x-x1)) ans=min(ans,max(t)-min(t)) t=(y*x2,y2*(x-x2),(y-y2)*(x-x2)) ans=min(ans,max(t)-min(t)) print(ans)
3つに分割するのは、
aa
bc
みたいな感じか、
abc
の2種類をh,w入れ替えて4種類かな。あと3で割り切れない数の場合のためにパターン分けて計算した。よくわかっていないので適当です