結果

問題 No.91 赤、緑、青の石
ユーザー gorugo30gorugo30
提出日時 2021-02-26 18:12:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 354 bytes
コンパイル時間 180 ms
コンパイル使用メモリ 82,376 KB
実行使用メモリ 54,088 KB
最終ジャッジ日時 2024-04-10 08:21:19
合計ジャッジ時間 2,337 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,828 KB
testcase_01 AC 35 ms
52,344 KB
testcase_02 AC 35 ms
53,076 KB
testcase_03 AC 36 ms
52,864 KB
testcase_04 AC 35 ms
54,088 KB
testcase_05 AC 35 ms
52,280 KB
testcase_06 AC 35 ms
52,484 KB
testcase_07 AC 35 ms
52,804 KB
testcase_08 AC 35 ms
52,624 KB
testcase_09 AC 34 ms
52,836 KB
testcase_10 AC 39 ms
52,692 KB
testcase_11 AC 35 ms
53,564 KB
testcase_12 AC 36 ms
51,880 KB
testcase_13 AC 34 ms
52,748 KB
testcase_14 AC 35 ms
52,344 KB
testcase_15 AC 35 ms
52,708 KB
testcase_16 WA -
testcase_17 AC 35 ms
52,404 KB
testcase_18 AC 35 ms
52,356 KB
testcase_19 AC 35 ms
52,196 KB
testcase_20 AC 35 ms
52,200 KB
testcase_21 AC 35 ms
53,072 KB
testcase_22 AC 35 ms
52,456 KB
testcase_23 AC 34 ms
52,428 KB
testcase_24 AC 35 ms
52,736 KB
testcase_25 AC 34 ms
51,824 KB
testcase_26 AC 34 ms
52,180 KB
testcase_27 AC 35 ms
53,468 KB
testcase_28 AC 34 ms
52,180 KB
testcase_29 AC 34 ms
52,000 KB
testcase_30 AC 35 ms
52,756 KB
testcase_31 AC 34 ms
52,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

stn = list(map(int, input().split()))
en = sum(stn) // 2
st = -1
stn.sort()
ans = stn[0]
stn[2] -= stn[0]
stn[1] -= stn[0]
stn[0] -= stn[0]
while en - st > 1:
    mid = (en + st) // 2
    ex = max(0, stn[1] - mid) // 2 + max(0, stn[2] - mid) // 2
    ex -= max(0, mid - stn[1])
    if ex < mid:
        en = mid
    else:
        st = mid
print(ans + st)
0