Skip to content

Instantly share code, notes, and snippets.

@whatalnk
Created May 14, 2017 06:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whatalnk/fbd2141628d4f08d5b5073760219926f to your computer and use it in GitHub Desktop.
Save whatalnk/fbd2141628d4f08d5b5073760219926f to your computer and use it in GitHub Desktop.
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