結果
問題 |
No.484 収穫
|
ユーザー |
![]() |
提出日時 | 2025-06-12 19:52:52 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 706 bytes |
コンパイル時間 | 237 ms |
コンパイル使用メモリ | 82,420 KB |
実行使用メモリ | 76,208 KB |
最終ジャッジ日時 | 2025-06-12 19:53:47 |
合計ジャッジ時間 | 2,290 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 WA * 8 |
ソースコード
def main(): import sys input = sys.stdin.read().split() N = int(input[0]) A = list(map(int, input[1:N+1])) min_time = float('inf') for s in range(1, N + 1): left_max = 0 for i in range(1, s + 1): temp = A[i - 1] + (s - i) if temp > left_max: left_max = temp right_max = 0 for i in range(s, N + 1): temp = A[i - 1] + (i - s) if temp > right_max: right_max = temp current_max = max(left_max, right_max) if current_max < min_time: min_time = current_max print(min_time) if __name__ == "__main__": main()