提出 #44494576
ソースコード 拡げる
N = gets.to_i
A = (1..N).map{|i|
gets
next i,*gets.split.map(&:to_i)
}.sort_by{|i,*as| [as.size,i] }
X = gets.to_i
B = A.select{|i,*as| as.include? X }
B.pop while B[0] && B[0].size<B[-1].size
puts B.size,B.map(&:shift)*' '
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - Roulette |
| ユーザ | ds14050 |
| 言語 | Ruby (ruby 3.2.2) |
| 得点 | 200 |
| コード長 | 235 Byte |
| 結果 | AC |
| 実行時間 | 44 ms |
| メモリ | 17616 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 200 / 200 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | example0.txt, example1.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, example0.txt, example1.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 000.txt | AC | 41 ms | 17148 KiB |
| 001.txt | AC | 41 ms | 17088 KiB |
| 002.txt | AC | 41 ms | 17276 KiB |
| 003.txt | AC | 42 ms | 17492 KiB |
| 004.txt | AC | 42 ms | 17116 KiB |
| 005.txt | AC | 42 ms | 17616 KiB |
| 006.txt | AC | 42 ms | 17452 KiB |
| 007.txt | AC | 42 ms | 17280 KiB |
| 008.txt | AC | 42 ms | 17208 KiB |
| 009.txt | AC | 41 ms | 17160 KiB |
| 010.txt | AC | 42 ms | 17160 KiB |
| 011.txt | AC | 42 ms | 17256 KiB |
| 012.txt | AC | 42 ms | 17196 KiB |
| 013.txt | AC | 42 ms | 17300 KiB |
| 014.txt | AC | 44 ms | 17364 KiB |
| 015.txt | AC | 42 ms | 17212 KiB |
| 016.txt | AC | 42 ms | 17556 KiB |
| 017.txt | AC | 42 ms | 17312 KiB |
| 018.txt | AC | 43 ms | 17284 KiB |
| 019.txt | AC | 43 ms | 17200 KiB |
| example0.txt | AC | 42 ms | 17040 KiB |
| example1.txt | AC | 43 ms | 17072 KiB |