結果
問題 |
No.2110 012 Matching
|
ユーザー |
![]() |
提出日時 | 2024-07-17 06:47:58 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 984 ms / 2,000 ms |
コード長 | 474 bytes |
コンパイル時間 | 138 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-17 06:48:05 |
合計ジャッジ時間 | 7,223 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 11 |
ソースコード
T=int(input()) for t in range(T): A,B,C=map(int,input().split()) def solve(A,B,C): if (A+B+C)%2==0: retu=B+2*C if A<C: retu-=(C-A+1)//2*3 else: retu=0 if A: retu=max(retu,solve(A-1,B,C)) if B: retu=max(retu,solve(A,B-1,C)) if C: retu=max(retu,solve(A,B,C-1)) return retu ans=solve(A,B,C) print(ans)