Created
May 14, 2016 15:36
-
-
Save whatalnk/affca74994f895ac287b86b778a854eb to your computer and use it in GitHub Desktop.
AtCoder ABC #037
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) | |
puts c / [a, b].min |
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, q = gets.chomp.split(" ").map(&:to_i) | |
a = Array.new(n, 0) | |
while line = gets | |
l, r, t = line.chomp.split(" ").map(&:to_i) | |
l -= 1 | |
r -= 1 | |
a[l..r] = [t] * (r - l + 1) | |
end | |
puts a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment