pastebin

Paste Search Dynamic
Recent pastes
gets chomp
  1. tc=gets.chomp.to_i
  2. tc.times{
  3.         a=gets.chomp.split(" ").collect{|x| x.to_i}
  4.         a.delete_at(0)
  5.         b=a.combination(2).to_a.collect{|y,z| y+z}
  6.         c=b.combination(2).to_a.collect{|e,f| (e-f).abs}
  7.         puts c.min
  8. }
Parsed in 0.003 seconds