結果

問題 No.91 赤、緑、青の石
ユーザー yuushi narazaki
提出日時 2025-03-07 15:24:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 454 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 82,252 KB
実行使用メモリ 54,076 KB
最終ジャッジ日時 2025-03-07 15:24:39
合計ジャッジ時間 2,783 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

R,G,B = map(int,input().split())

left = -1
right = 10**9 + 1

ans = 0

def search(mid,R,G,B):

     count = 0
     s = min(R,G,B)
     R -= mid
     G -= mid
     B -= mid
     count += max(R//2,0) + max(G//2,0) + max(B//2,0)
     if(s + count >= mid):
        return True




while abs(left - right) > 1:
    mid = (left + right) // 2
    if(search(mid,R,G,B)):
        left = mid
        ans = max(ans,mid)
    else:
        right = mid   
print(ans) 
0