結果
問題 | No.116 門松列(1) |
ユーザー |
|
提出日時 | 2019-07-08 11:28:33 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 35 ms / 5,000 ms |
コード長 | 216 bytes |
コンパイル時間 | 227 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-10-08 01:59:41 |
合計ジャッジ時間 | 1,843 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
N = int(input()) A = list(map(int, input().split())) count = 0 for i in range(3, N + 1): k = A[i-3:i] sk = sorted(k) if k.index(sk[1]) % 2 == 0 and len(set(k)) == len(k): count += 1 print(count)