結果
問題 | No.116 門松列(1) |
ユーザー |
![]() |
提出日時 | 2020-01-01 11:47:51 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 5,000 ms |
コード長 | 263 bytes |
コンパイル時間 | 114 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-11-21 22:11:06 |
合計ジャッジ時間 | 1,948 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N,*A = map(int,read().split()) answer = 0 for x,y,z in zip(A,A[1:],A[2:]): answer += ((x < y > z) or (x > y < z)) and (x != z) print(answer)