Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Codeforces Round #414 Div1 and Div2
a, b, c = gets.chomp.split(" ").map(&:to_i)
n = gets.chomp.to_i
xx = gets.chomp.split(" ").map(&:to_i)
ret = 0
xx.each do |x|
if x > b && x < c then
ret += 1
end
end
puts ret
n, h = gets.chomp.split(" ").map(&:to_f)
b = 1
hh = h / Math.sqrt(n)
(n.to_i - 1).times do |i|
print(hh * Math.sqrt(i+1), " ")
end
puts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment