結果
| 問題 |
No.116 門松列(1)
|
| ユーザー |
togatoga
|
| 提出日時 | 2015-08-19 10:00:14 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 220 bytes |
| コンパイル時間 | 41 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-18 10:28:03 |
| 合計ジャッジ時間 | 967 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 8 WA * 13 |
ソースコード
N = input()
A = map(int, raw_input().split())
res = 0
for i in range(N - 2):
a = A[i]
b = A[i + 1]
c = A[i + 2]
if (a == b or b == c):
continue
if (b < a or b > c):
res += 1
print res
togatoga