結果
| 問題 |
No.91 赤、緑、青の石
|
| ユーザー |
NiER_Replicant6
|
| 提出日時 | 2018-03-20 16:22:11 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 582 bytes |
| コンパイル時間 | 187 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 17,692 KB |
| 最終ジャッジ日時 | 2024-06-23 23:37:08 |
| 合計ジャッジ時間 | 7,632 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 TLE * 1 -- * 14 |
ソースコード
s = list(map(int, input().split()))
def check(mid):
total = 0
excess=0
lack=0
for i in s:
if i>=mid:
excess=0
lack =0
excess = (i-mid)//2
if i<mid:
excess=0
lack=0
lack = i-mid
total = total+excess+lack
return total>=0
left = min(s)
right = max(s)
while True:
if left==0 and right==0:
mid = 0
break
mid = (left+right)//2
if check(mid)==True:
left = mid
else:
right = mid
if right==mid+1:
break
print(mid)
NiER_Replicant6