結果
| 問題 | No.116 門松列(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-02-09 23:56:48 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 88 ms / 5,000 ms |
| コード長 | 176 bytes |
| 記録 | |
| コンパイル時間 | 120 ms |
| コンパイル使用メモリ | 77,664 KB |
| 最終ジャッジ日時 | 2025-12-03 13:43:31 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
N = int(raw_input())
a = map(int,raw_input().split())
ans = 0
for i in range(N-2):
if len(set(a[i:i+3])) == 3 and a[i+1] != sorted(a[i:i+3])[1]:
ans += 1
print ans