結果

問題 No.116 門松列(1)
ユーザー LeonardoneLeonardone
提出日時 2015-10-16 01:14:16
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 195 bytes
コンパイル時間 42 ms
コンパイル使用メモリ 11,276 KB
実行使用メモリ 15,348 KB
最終ジャッジ日時 2023-09-28 21:57:24
合計ジャッジ時間 3,418 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
15,284 KB
testcase_01 AC 86 ms
15,212 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 86 ms
15,116 KB
testcase_05 AC 85 ms
15,076 KB
testcase_06 WA -
testcase_07 AC 84 ms
15,108 KB
testcase_08 AC 83 ms
15,076 KB
testcase_09 AC 84 ms
15,080 KB
testcase_10 WA -
testcase_11 AC 85 ms
15,000 KB
testcase_12 WA -
testcase_13 AC 85 ms
15,124 KB
testcase_14 AC 85 ms
15,108 KB
testcase_15 WA -
testcase_16 AC 83 ms
15,132 KB
testcase_17 AC 86 ms
15,204 KB
testcase_18 WA -
testcase_19 AC 85 ms
15,260 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 87 ms
15,304 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#! ruby
# yukicoder My Practice
# author: Leonardone @ NEETSDKASU

N = gets.to_i
A = gets.chomp.split.map(&:to_i)

p A.zip(A.rotate(1), A.rotate(2))[0..-3].count{|x,y,z| y>[x,z].max||y<[x,z].min}
0