Skip to content

Instantly share code, notes, and snippets.

@whatalnk
Created October 8, 2018 08:11
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/b41341b43af3cb790503b708b0cd4f32 to your computer and use it in GitHub Desktop.
Save whatalnk/b41341b43af3cb790503b708b0cd4f32 to your computer and use it in GitHub Desktop.
AtCoder ABC #112 B
n, t = gets.chomp.split(" ").map(&:to_i)
a = []
n.times do
a << gets.chomp.split(" ").map(&:to_i)
end
a.sort_by!{|x| x[0]}
a.each do |x|
if x[1] <= t
puts x[0]
exit
end
end
puts "TLE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment