Skip to content

Instantly share code, notes, and snippets.

@whatalnk
Created December 12, 2015 14:16
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/06dfe1efca72c3b6f995 to your computer and use it in GitHub Desktop.
Save whatalnk/06dfe1efca72c3b6f995 to your computer and use it in GitHub Desktop.
Codeforces 335 div2
# [Problem - A - Codeforces](http://codeforces.com/contest/606/problem/A)
a, b, c = gets.chomp.split(" ").map(&:to_i)
x, y, z = gets.chomp.split(" ").map(&:to_i)
need = 0
extra = 0
[a, b, c].zip([x, y, z]).each do |e1, e2|
if e2 > e1 then
need += e2 - e1
else
extra += (e1 - e2) / 2
end
end
if need <=extra then
puts "Yes"
else
puts "No"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment