1. Maximum GCD
- for s in[*open(0)][1:]:print(int(s)//2)
2. Collecting coins
exec(int(input())*"a=*map(int,input().split()),;s=sum(a);print('YNEOS'[s%-3|s-3*max(a[:3])<0::2]);")
1. Maximum GCD
- for s in[*open(0)][1:]:print(int(s)//2)
2. Collecting coins
exec(int(input())*"a=*map(int,input().split()),;s=sum(a);print('YNEOS'[s%-3|s-3*max(a[:3])<0::2]);")
Post a Comment