結果
| 問題 |
No.116 門松列(1)
|
| ユーザー |
motor_radial
|
| 提出日時 | 2019-07-28 18:19:17 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 5,000 ms |
| コード長 | 178 bytes |
| コンパイル時間 | 82 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-07-02 15:04:39 |
| 合計ジャッジ時間 | 1,421 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
N=int(input())
A=input().split()
count=0
for i in range(1,N-1):
a=int(A[i-1])
b=int(A[i])
c=int(A[i+1])
if a!=c and ((b-a)*(b-c))>0:
count+=1
print(count)
motor_radial