結果
| 問題 | No.116 門松列(1) |
| コンテスト | |
| ユーザー |
あかりき
|
| 提出日時 | 2021-02-09 21:42:15 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 63 ms / 5,000 ms |
| + 639µs | |
| コード長 | 197 bytes |
| 記録 | |
| コンパイル時間 | 517 ms |
| コンパイル使用メモリ | 95,852 KB |
| 実行使用メモリ | 78,976 KB |
| 最終ジャッジ日時 | 2026-08-10 16:17:39 |
| 合計ジャッジ時間 | 3,429 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
n=int(input())
a=list(map(int,input().split()))
ct=0
for i in range(n-2):
x=a[i];y=a[i+1];z=a[i+2]
l=[x,y,z]
l.sort()
if x!=y and y!=z and z!=x and (l[1]==x or l[1]==z):
ct+=1
print(ct)
あかりき