結果
| 問題 | No.116 門松列(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-05 12:16:34 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 233 bytes |
| 記録 | |
| コンパイル時間 | 383 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 15,368 KB |
| 最終ジャッジ日時 | 2026-06-03 01:33:47 |
| 合計ジャッジ時間 | 3,887 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 11 WA * 10 |
ソースコード
def iskadomatsu(S):
return S.index(max(S)) == 1 or S.index(min(S)) == 1
N = int(input())
A = list(map(int, input().split()))
Count = 0
for i in range(N - 2):
if iskadomatsu([A[i], A[i + 1], A[i + 2]]):
Count += 1
print(Count)