結果

問題 No.182 新規性の虜
ユーザー mmmpppmmmppp
提出日時 2017-02-26 14:59:27
言語 Ruby
(3.3.0)
結果
AC  
実行時間 144 ms / 5,000 ms
コード長 97 bytes
コンパイル時間 570 ms
コンパイル使用メモリ 11,484 KB
実行使用メモリ 23,052 KB
最終ジャッジ日時 2023-08-27 14:26:37
合計ジャッジ時間 5,040 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,128 KB
testcase_01 AC 83 ms
15,144 KB
testcase_02 AC 82 ms
15,320 KB
testcase_03 AC 82 ms
15,308 KB
testcase_04 AC 82 ms
15,228 KB
testcase_05 AC 82 ms
15,124 KB
testcase_06 AC 82 ms
15,212 KB
testcase_07 AC 82 ms
15,176 KB
testcase_08 AC 119 ms
19,248 KB
testcase_09 AC 138 ms
22,004 KB
testcase_10 AC 133 ms
20,972 KB
testcase_11 AC 126 ms
19,948 KB
testcase_12 AC 102 ms
17,096 KB
testcase_13 AC 82 ms
15,120 KB
testcase_14 AC 83 ms
15,284 KB
testcase_15 AC 85 ms
15,120 KB
testcase_16 AC 82 ms
15,148 KB
testcase_17 AC 80 ms
15,256 KB
testcase_18 AC 130 ms
20,648 KB
testcase_19 AC 121 ms
19,184 KB
testcase_20 AC 105 ms
17,316 KB
testcase_21 AC 135 ms
21,472 KB
testcase_22 AC 108 ms
18,060 KB
testcase_23 AC 81 ms
15,300 KB
testcase_24 AC 144 ms
23,052 KB
testcase_25 AC 137 ms
22,624 KB
testcase_26 AC 88 ms
15,828 KB
testcase_27 AC 81 ms
15,084 KB
evil01.txt AC 148 ms
23,428 KB
evil02.txt AC 148 ms
23,544 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,*a=$<.read.split.map &:to_i
a.sort!;a+=[a[-1]+1,0]
p n.times.count{|i|a[i-1]<a[i]&&a[i]<a[i+1]}
0