Created
December 12, 2015 14:16
-
-
Save whatalnk/06dfe1efca72c3b6f995 to your computer and use it in GitHub Desktop.
Codeforces 335 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
# [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