Created
October 10, 2017 16:16
-
-
Save whatalnk/c06787da4208bf8aedcd1ef2fe211827 to your computer and use it in GitHub Desktop.
AtCoder ARC #033 B - メタ構文変数
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'set' | |
na, nb = gets.chomp.split(" ").map(&:to_i) | |
a = Set.new(gets.chomp.split(" ").map(&:to_i)) | |
b = Set.new(gets.chomp.split(" ").map(&:to_i)) | |
puts (a & b).size.to_f / (a | b).size |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment