Skip to content

Instantly share code, notes, and snippets.

@idlehands
Created August 10, 2016 04:02
Show Gist options
  • Save idlehands/cb098fa789db01c7f180d00f5674e0fb to your computer and use it in GitHub Desktop.
Save idlehands/cb098fa789db01c7f180d00f5674e0fb to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# by Jeffrey Matthias
def max_dot_product(a, b)
# your code here
end
if __FILE__ == $0
# in the Ruby implementation, n isn't used for anything
n = gets.chomp.to_i
a = gets.chomp.split.map(&:to_i)
b = gets.chomp.split.map(&:to_i)
puts "#{max_dot_product(a, b)}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment