結果

問題 No.9 モンスターのレベル上げ
ユーザー letrangerjpletrangerjp
提出日時 2017-05-15 20:33:56
言語 Ruby
(3.3.0)
結果
AC  
実行時間 3,949 ms / 5,000 ms
コード長 171 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 11,628 KB
実行使用メモリ 73,176 KB
最終ジャッジ日時 2023-09-06 05:24:38
合計ジャッジ時間 37,508 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,088 KB
testcase_01 AC 82 ms
15,044 KB
testcase_02 AC 3,949 ms
15,884 KB
testcase_03 AC 2,994 ms
15,740 KB
testcase_04 AC 1,567 ms
15,692 KB
testcase_05 AC 1,047 ms
15,556 KB
testcase_06 AC 411 ms
15,544 KB
testcase_07 AC 90 ms
15,296 KB
testcase_08 AC 525 ms
15,628 KB
testcase_09 AC 3,812 ms
15,660 KB
testcase_10 AC 84 ms
15,360 KB
testcase_11 AC 3,026 ms
16,160 KB
testcase_12 AC 3,912 ms
15,732 KB
testcase_13 AC 2,433 ms
73,176 KB
testcase_14 AC 3,819 ms
15,712 KB
testcase_15 AC 3,488 ms
15,692 KB
testcase_16 AC 134 ms
15,548 KB
testcase_17 AC 2,237 ms
15,636 KB
testcase_18 AC 1,848 ms
15,700 KB
testcase_19 AC 113 ms
15,612 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

M=2000;eval"N,*C="+`dd`.split*?,;b=C.pop(N);p b.map{a=C.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