Skip to content

Instantly share code, notes, and snippets.

@whatalnk
Created May 14, 2016 15:36
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/affca74994f895ac287b86b778a854eb to your computer and use it in GitHub Desktop.
Save whatalnk/affca74994f895ac287b86b778a854eb to your computer and use it in GitHub Desktop.
AtCoder ABC #037
a, b, c = gets.chomp.split.map(&:to_i)
puts c / [a, b].min
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