結果
| 問題 | No.116 門松列(1) |
| コンテスト | |
| ユーザー |
バカらっく
|
| 提出日時 | 2019-10-01 08:27:35 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 93 ms / 5,000 ms |
| コード長 | 345 bytes |
| 記録 | |
| コンパイル時間 | 338 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-04-19 07:14:01 |
| 合計ジャッジ時間 | 3,706 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
# -*- coding:utf-8 -*-
matsuCount = int(input())
matsuList = [int(i) for i in input().rstrip().split(" ")]
ans = 0
for i in range(matsuCount - 2):
subList = matsuList[i:i+3]
if len(set(subList)) != 3:
continue
if max(subList) == subList[1]:
ans += 1
elif min(subList) == subList[1]:
ans += 1
print(ans)
バカらっく