ALDS1_4_C: Dictionary


# your code goes here
require 'set'
hs=Set.new()
n=STDIN.gets.to_i

n.times do |i|
com,str=STDIN.gets.split(" ")
case com
when "insert"
	hs.add(str)
when "find"
	if hs.include?(str)
		puts "yes"
	else
		puts "no"
	end
end
end
最終更新:2016年05月30日 09:31