結果

問題 No.9 モンスターのレベル上げ
ユーザー letrangerjpletrangerjp
提出日時 2017-05-15 19:50:35
言語 Ruby
(3.3.0)
結果
AC  
実行時間 3,976 ms / 5,000 ms
コード長 172 bytes
コンパイル時間 334 ms
コンパイル使用メモリ 11,336 KB
実行使用メモリ 69,764 KB
最終ジャッジ日時 2023-09-06 05:22:29
合計ジャッジ時間 37,835 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
外部呼び出し有り
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,032 KB
testcase_01 AC 83 ms
15,268 KB
testcase_02 AC 3,976 ms
16,048 KB
testcase_03 AC 3,019 ms
15,668 KB
testcase_04 AC 1,575 ms
15,776 KB
testcase_05 AC 1,042 ms
15,644 KB
testcase_06 AC 401 ms
15,572 KB
testcase_07 AC 87 ms
15,436 KB
testcase_08 AC 511 ms
15,692 KB
testcase_09 AC 3,841 ms
15,740 KB
testcase_10 AC 83 ms
15,228 KB
testcase_11 AC 3,035 ms
16,132 KB
testcase_12 AC 3,784 ms
15,856 KB
testcase_13 AC 2,469 ms
69,764 KB
testcase_14 AC 3,903 ms
15,696 KB
testcase_15 AC 3,454 ms
15,896 KB
testcase_16 AC 130 ms
15,668 KB
testcase_17 AC 2,179 ms
15,640 KB
testcase_18 AC 1,831 ms
15,736 KB
testcase_19 AC 114 ms
15,580 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

M=2000;n,*_=`dd`.split.map &:to_i;b=_.pop(n);p b.map{a=_.sort.map{|v|v*M};b.rotate!.map{|l|m=a.shift+l/2*M+1;a.insert(a.bsearch_index{|v|v>m}||-1,m)};a.map{|v|v%M}.max}.min
0