結果
| 問題 |
No.116 門松列(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-22 11:44:56 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 5,000 ms |
| コード長 | 313 bytes |
| コンパイル時間 | 124 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-10-04 07:02:33 |
| 合計ジャッジ時間 | 1,520 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
def is_kdmatsu(x,y,z):
if not ((x != y) and (y != z) and (z != x)):
return 0
if x < y < z:
return 0
if z < y < x:
return 0
return 1
input()
L=list(map(int,input().split()))
count=0
for i in range(0,len(L)-2):
count= count + is_kdmatsu(L[i],L[i+1],L[i+2])
print(count)