1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/sample/trick2015/ksk_2/entry.rb
svn 4a1a74991d * append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-11 14:37:45 +00:00

1 line
195 B
Ruby

_='s %sSATISFIABLE';puts eval$<.read.gsub(/.*p.*?(\d+).*?$|\d+/m){$1?%w[?-* +'=-'=~/#{'(-?)'* }-*=(?=]*$1:$&>?0?"\\#$&$|":'$)(?='}+')/x?[_%p%i=0,[*$~].map{|x|x>?-?:v:eval(x+?1)*i-=1}*" "]:_%:UN'