結果

問題 No.733 分身並列コーディング
ユーザー 👑 hos.lyrichos.lyric
提出日時 2019-01-31 03:05:24
言語 Ruby
(3.3.0)
結果
AC  
実行時間 730 ms / 1,500 ms
コード長 187 bytes
コンパイル時間 50 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 17,792 KB
最終ジャッジ日時 2024-04-24 20:21:36
合計ジャッジ時間 18,858 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
12,288 KB
testcase_01 AC 77 ms
12,288 KB
testcase_02 AC 76 ms
12,160 KB
testcase_03 AC 712 ms
16,896 KB
testcase_04 AC 714 ms
17,152 KB
testcase_05 AC 715 ms
17,792 KB
testcase_06 AC 76 ms
12,160 KB
testcase_07 AC 702 ms
17,024 KB
testcase_08 AC 708 ms
17,024 KB
testcase_09 AC 373 ms
13,952 KB
testcase_10 AC 108 ms
12,544 KB
testcase_11 AC 111 ms
12,288 KB
testcase_12 AC 79 ms
12,288 KB
testcase_13 AC 73 ms
12,288 KB
testcase_14 AC 222 ms
13,568 KB
testcase_15 AC 95 ms
12,544 KB
testcase_16 AC 78 ms
12,288 KB
testcase_17 AC 76 ms
12,160 KB
testcase_18 AC 110 ms
12,544 KB
testcase_19 AC 379 ms
13,952 KB
testcase_20 AC 391 ms
14,080 KB
testcase_21 AC 222 ms
13,056 KB
testcase_22 AC 715 ms
17,152 KB
testcase_23 AC 223 ms
13,568 KB
testcase_24 AC 225 ms
13,696 KB
testcase_25 AC 77 ms
12,160 KB
testcase_26 AC 75 ms
12,416 KB
testcase_27 AC 97 ms
12,416 KB
testcase_28 AC 698 ms
17,024 KB
testcase_29 AC 713 ms
17,024 KB
testcase_30 AC 722 ms
17,152 KB
testcase_31 AC 723 ms
17,024 KB
testcase_32 AC 146 ms
12,928 KB
testcase_33 AC 145 ms
12,928 KB
testcase_34 AC 147 ms
12,544 KB
testcase_35 AC 144 ms
12,800 KB
testcase_36 AC 152 ms
12,800 KB
testcase_37 AC 154 ms
12,800 KB
testcase_38 AC 707 ms
17,024 KB
testcase_39 AC 711 ms
17,152 KB
testcase_40 AC 709 ms
16,896 KB
testcase_41 AC 144 ms
12,800 KB
testcase_42 AC 148 ms
12,800 KB
testcase_43 AC 144 ms
12,928 KB
testcase_44 AC 730 ms
17,024 KB
testcase_45 AC 712 ms
17,152 KB
testcase_46 AC 715 ms
17,024 KB
testcase_47 AC 724 ms
16,896 KB
testcase_48 AC 723 ms
17,024 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

t=gets.to_i
n=gets.to_i
a=(0...n).map{gets.to_i}
d=[0]
f=->(x,b){y=t-x%t;b>y ?x+b+y:x+b}
(1...1<<n).map{|h|
  d<<(0...n).map{|i|
    h[i]>0?f[d[h^1<<i],a[i]]:1e9
  }.min
}
p (d[-1]+t-1)/t
0