結果
問題 | No.116 門松列(1) |
ユーザー |
![]() |
提出日時 | 2017-12-21 11:29:35 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 5,000 ms |
コード長 | 222 bytes |
コンパイル時間 | 92 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-06-25 01:35:43 |
合計ジャッジ時間 | 1,669 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
n = int(input())a_ls = [int(a) for a in input().split()]is_kadomatsu = lambda a, b, c: b > a > c or b > c > a or a > c > b or c > a > bans = len([True for i in range(n - 2) if is_kadomatsu(*a_ls[i:i + 3])])print(ans)