parent
41ecc75d62
commit
6f46272340
@ -0,0 +1,18 @@
|
||||
available, desired = DATA.read.split("\n\n")
|
||||
available = available.split(", ")
|
||||
desired = desired.lines(chomp: true)
|
||||
|
||||
available = Regexp.new("^(#{available.join(?|)})+$")
|
||||
pp desired.select { _1 =~ available }.size
|
||||
|
||||
__END__
|
||||
r, wr, b, g, bwu, rb, gb, br
|
||||
|
||||
brwrr
|
||||
bggr
|
||||
gbbr
|
||||
rrbgbr
|
||||
ubwu
|
||||
bwurrg
|
||||
brgr
|
||||
bbrgwb
|
Loading…
Reference in new issue