結果
| 問題 |
No.343 手抜き工事のプロ
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-01-14 07:21:44 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 260 bytes |
| コンパイル時間 | 364 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 89,728 KB |
| 最終ジャッジ日時 | 2024-11-23 19:17:34 |
| 合計ジャッジ時間 | 3,743 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 RE * 24 |
ソースコード
n,*x = map(int,open(0).read().split())
L = x[0]
g = x[0] = 0
ans = n-1
for i in range(n-2,-1,-1):
g += x[i+1]
if 2*(n-1-i)*max(x[i],x[i+1]) < 2*g+L*cnt < 2*(n-1-i)*(min(x[i],x[i+1])+L): ans -= 1
if abs(x[i+1]-x[i]) >= L: ans = -1
print(max(ans,-1))
convexineq