結果
| 問題 |
No.116 門松列(1)
|
| ユーザー |
|
| 提出日時 | 2023-06-05 14:56:11 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 255 bytes |
| コンパイル時間 | 236 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-29 06:07:58 |
| 合計ジャッジ時間 | 1,855 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | AC * 4 RE * 17 |
ソースコード
N = int(input())
A = list(map(int,input().split()))
COUNT = 0
for I in range(N - 2):
if len({A[I], A[I + 1], A[I + 2]}) < 3:
continue
if A[I] < A[I + 1] < A[I + 2] or a[I] > a[I + 1] > a[I + 2]:
continue
COUNT += 1
print(COUNT)