結果
| 問題 |
No.116 門松列(1)
|
| ユーザー |
|
| 提出日時 | 2020-07-29 09:59:15 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 174 bytes |
| コンパイル時間 | 121 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-06-28 21:26:37 |
| 合計ジャッジ時間 | 1,531 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 7 WA * 14 |
ソースコード
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(n-2):
b=sorted(a[i:i+3])
if b[0]!=b[1] and b[1]!=b[2] and a[i+2]==b[1]:
ans+=1
print(ans)