Created
May 14, 2017 06:07
-
-
Save whatalnk/fbd2141628d4f08d5b5073760219926f to your computer and use it in GitHub Desktop.
Codeforces Round #414 Div1 and Div2
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
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 |
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
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