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 5, 2015
1 parent 1b4f487 commit 0844e1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion POH6plus/answer6.rb
@@ -1 +1 @@
f=Hash.new 0;s=c="";gets.to_i.times{f[gets.chop]+=1};f.sort.map{|x,m|y=x.reverse;m,f[x],b=[m,f[y]].min,0,x==y;c,m=x,m-1if b&&m.odd?&&(c==""||x<c);b&&m/=2;s+=x.*m};$><<s+c+s.reverse
f=Hash.new 0;s=c="";gets.to_i.times{f[gets.chop]+=1};f.sort.map{|x,m|y=x.reverse;m,f[x],b=[m,f[y]].min,0,x==y;c,m=x,m-1if(c==""||x<c)&b&m.odd?;b&&m/=2;s+=x.*m};$><<s+c+s.reverse

0 comments on commit 0844e1d

Please sign in to comment.