[2016][ruby][24.1]
change tytsmptlrxnvqpsyuqnwwywlrplwspyl
commit 52b348ebefdabd1fc6418f38410ef30673358f25
author Alpha Chen <alpha.chen@gmail.com>
date
parent yuqzznkt
diff --git a/2016/ruby/day_24.rb b/2016/ruby/day_24.rb
index 66091fb..19d1dae 100644
--- a/2016/ruby/day_24.rb
+++ b/2016/ruby/day_24.rb
@@ -96,6 +96,7 @@ if __FILE__ == $0
     .map(&:first)
     .permutation
     .select {|route| route[0] == 0 }
+    .map {|route| route + [0] }
     .map {|route|
       [route, route.each_cons(2).map {|a,b| hash[[a,b]] }.inject(:+)]
     }.sort_by(&:last)