結果
| 問題 |
No.3173 じゃんけんの勝ちの回数
|
| コンテスト | |
| ユーザー |
回転
|
| 提出日時 | 2025-06-18 01:07:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 589 bytes |
| コンパイル時間 | 424 ms |
| コンパイル使用メモリ | 82,116 KB |
| 実行使用メモリ | 82,404 KB |
| 最終ジャッジ日時 | 2025-06-19 17:42:07 |
| 合計ジャッジ時間 | 39,027 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 TLE * 31 |
ソースコード
from itertools import permutations
T = int(input())
def get_min(a,b):
ok = [(0,2),(1,0),(2,1),(0,0),(1,1),(2,2)]
ret = 10**9
for oks in permutations(ok):
now_a = a[:];now_b = b[:]
for c,d in oks:
v = min(now_a[c],now_b[d])
now_a[c] -= v;now_b[d] -= v
ret = min(ret,sum(now_a))
return ret
for _ in range(T):
A = list(map(int,input().split()))
B = list(map(int,input().split()))
MAX = 0
MAX += min(A[0],B[1])
MAX += min(A[1],B[2])
MAX += min(A[2],B[0])
MIN = get_min(A,B)
print(MIN,MAX)
回転