結果
| 問題 |
No.116 門松列(1)
|
| ユーザー |
|
| 提出日時 | 2019-07-08 11:29:06 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 5,000 ms |
| コード長 | 215 bytes |
| コンパイル時間 | 308 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-10-08 02:01:27 |
| 合計ジャッジ時間 | 1,846 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)