Skip to content
This repository has been archived by the owner on Nov 22, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
改行削除
  • Loading branch information
neetsdkasu committed Sep 4, 2015
1 parent 462e9d0 commit 5cd2fdc
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions POH6plus/answer6.rb
@@ -1,8 +1 @@
f,s=Hash.new(0),c=""
gets.to_i.times{f[gets.chop]+=1}
f.keys.sort.map{|x|y=x.reverse
m,f[x],b=[f[x],f[y]].min,0,x==y
c,m=x,m-1if b&&m.odd?&&(c==""||x<c)
b&&m/=2
m.times{s+=x}}
$><<s+c+s.reverse
f,s=Hash.new(0),c="";gets.to_i.times{f[gets.chop]+=1};f.keys.sort.map{|x|y=x.reverse;m,f[x],b=[f[x],f[y]].min,0,x==y;c,m=x,m-1if b&&m.odd?&&(c==""||x<c);b&&m/=2;m.times{s+=x}};$><<s+c+s.reverse

0 comments on commit 5cd2fdc

Please sign in to comment.