結果

問題 No.479 頂点は要らない
ユーザー angel_p_57angel_p_57
提出日時 2017-01-27 23:50:59
言語 Ruby
(3.3.0)
結果
AC  
実行時間 362 ms / 1,500 ms
コード長 156 bytes
コンパイル時間 642 ms
コンパイル使用メモリ 11,508 KB
実行使用メモリ 24,792 KB
最終ジャッジ日時 2023-08-25 11:08:57
合計ジャッジ時間 9,301 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,276 KB
testcase_01 AC 81 ms
15,144 KB
testcase_02 AC 82 ms
15,144 KB
testcase_03 AC 80 ms
15,252 KB
testcase_04 AC 81 ms
15,156 KB
testcase_05 AC 81 ms
15,148 KB
testcase_06 AC 83 ms
15,104 KB
testcase_07 AC 82 ms
15,032 KB
testcase_08 AC 82 ms
15,348 KB
testcase_09 AC 81 ms
15,048 KB
testcase_10 AC 82 ms
15,176 KB
testcase_11 AC 82 ms
15,164 KB
testcase_12 AC 82 ms
15,296 KB
testcase_13 AC 81 ms
15,148 KB
testcase_14 AC 81 ms
15,076 KB
testcase_15 AC 81 ms
15,164 KB
testcase_16 AC 81 ms
15,276 KB
testcase_17 AC 81 ms
15,224 KB
testcase_18 AC 81 ms
15,160 KB
testcase_19 AC 85 ms
15,164 KB
testcase_20 AC 85 ms
15,068 KB
testcase_21 AC 86 ms
15,152 KB
testcase_22 AC 87 ms
15,148 KB
testcase_23 AC 85 ms
15,328 KB
testcase_24 AC 84 ms
15,068 KB
testcase_25 AC 84 ms
15,240 KB
testcase_26 AC 362 ms
24,636 KB
testcase_27 AC 362 ms
24,720 KB
testcase_28 AC 313 ms
24,672 KB
testcase_29 AC 332 ms
24,792 KB
testcase_30 AC 334 ms
24,728 KB
testcase_31 AC 330 ms
24,724 KB
testcase_32 AC 335 ms
24,728 KB
testcase_33 AC 301 ms
23,108 KB
testcase_34 AC 322 ms
24,472 KB
testcase_35 AC 314 ms
24,456 KB
testcase_36 AC 225 ms
21,244 KB
testcase_37 AC 313 ms
23,900 KB
testcase_38 AC 283 ms
22,496 KB
testcase_39 AC 223 ms
20,060 KB
testcase_40 AC 243 ms
21,104 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

f=?0*n=gets.to_i
$<.map{|s|s.split.map(&:to_i)}.sort_by{|a,b|-a-b*n}.chunk(&:last).each{|b,r|r.each{|t|f[t[0]]=?1} if f[b]==?0}
puts f.reverse.sub(/^0*/,"")
0