結果
| 問題 | No.3392 Count 23578 Sequence |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-08-18 07:12:08 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 501 bytes |
| 記録 | |
| コンパイル時間 | 329 ms |
| コンパイル使用メモリ | 96,360 KB |
| 実行使用メモリ | 219,308 KB |
| 最終ジャッジ日時 | 2026-08-18 07:12:30 |
| 合計ジャッジ時間 | 16,214 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 47 |
ソースコード
N = int(input())
A = list(map(int,input().split()))
ans = 0
for i in range(N):
d = A[i]*2
ans += 1
l = i
r = i
while True:
if l-1<0 or r+1>=N:break
l -= 1
r += 1
if A[l]+A[r]==d:
ans += 1
else:break
for i in range(N-1):
d = A[i]+A[i+1]
ans += 1
l = i
r = i+1
while True:
if l-1<0 or r+1>=N:break
l -= 1
r += 1
if A[l]+A[r]==d:
ans += 1
else:break
print(ans)