結果
| 問題 |
No.116 門松列(1)
|
| ユーザー |
|
| 提出日時 | 2020-10-21 10:49:43 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 283 bytes |
| コンパイル時間 | 82 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-21 08:49:17 |
| 合計ジャッジ時間 | 1,886 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 13 WA * 8 |
ソースコード
N=int(input())
data=list(map(int,input().split()))
ans=0
for i in range(N-2):
li=[data[i],data[i+1],data[i+2]]
li_m=sorted(li)
li_M=li_m[::-1]
if li_m==li or li_M==li:
continue
elif li[0]!=li[1] and li[1]!=li[2] and li[0]!=li[1]:
ans+=1
print(ans)