結果
| 問題 |
No.116 門松列(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-05-24 18:03:02 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 147 bytes |
| コンパイル時間 | 136 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-10-07 06:38:28 |
| 合計ジャッジ時間 | 1,764 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 10 WA * 11 |
ソースコード
c=0
N=int(input())
A=list(map(int,input().split()))
for i in range(1,N-2):
if (A[i]-A[i+1])*(A[i+2]-A[i+1])>0 and A[i]!=A[i+2]:
c+=1
print(c)