結果
| 問題 | No.116 門松列(1) |
| コンテスト | |
| ユーザー |
HIROPON87069639
|
| 提出日時 | 2016-02-27 16:08:56 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
|
| 実行時間 | 60 ms / 5,000 ms |
| + 90µs | |
| コード長 | 251 bytes |
| 記録 | |
| コンパイル時間 | 72 ms |
| コンパイル使用メモリ | 80,896 KB |
| 実行使用メモリ | 81,024 KB |
| 最終ジャッジ日時 | 2026-07-18 03:33:04 |
| 合計ジャッジ時間 | 3,291 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
# -*- coding: utf-8 -*-
N = input()
cnt = 0
ref = []
Alist = map(int, raw_input().split())
for i in range(0, len(Alist)-2):
j = (Alist[i+2] - Alist[i+1]) * (Alist[i+1] - Alist[i])
if j < 0 and Alist[i+2] != Alist[i]:
cnt += 1
print cnt
HIROPON87069639