結果

問題 No.91 赤、緑、青の石
ユーザー gorugo30gorugo30
提出日時 2021-02-26 18:12:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 5,000 ms
コード長 353 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 87,412 KB
実行使用メモリ 71,640 KB
最終ジャッジ日時 2023-09-06 12:54:55
合計ジャッジ時間 3,868 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,608 KB
testcase_01 AC 72 ms
71,200 KB
testcase_02 AC 73 ms
71,560 KB
testcase_03 AC 69 ms
71,348 KB
testcase_04 AC 70 ms
71,456 KB
testcase_05 AC 70 ms
71,308 KB
testcase_06 AC 70 ms
71,464 KB
testcase_07 AC 70 ms
71,324 KB
testcase_08 AC 71 ms
71,476 KB
testcase_09 AC 71 ms
71,432 KB
testcase_10 AC 70 ms
71,512 KB
testcase_11 AC 70 ms
71,556 KB
testcase_12 AC 70 ms
71,416 KB
testcase_13 AC 70 ms
71,400 KB
testcase_14 AC 71 ms
71,208 KB
testcase_15 AC 71 ms
71,348 KB
testcase_16 AC 70 ms
71,544 KB
testcase_17 AC 71 ms
71,496 KB
testcase_18 AC 70 ms
71,420 KB
testcase_19 AC 71 ms
71,584 KB
testcase_20 AC 71 ms
71,404 KB
testcase_21 AC 72 ms
71,476 KB
testcase_22 AC 72 ms
71,320 KB
testcase_23 AC 72 ms
71,428 KB
testcase_24 AC 69 ms
71,400 KB
testcase_25 AC 70 ms
71,512 KB
testcase_26 AC 70 ms
71,352 KB
testcase_27 AC 72 ms
71,448 KB
testcase_28 AC 72 ms
71,640 KB
testcase_29 AC 71 ms
71,576 KB
testcase_30 AC 71 ms
71,296 KB
testcase_31 AC 70 ms
71,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

stn = list(map(int, input().split()))
en = sum(stn) // 2
st = 0
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