Created
March 10, 2019 02:59
-
-
Save whatalnk/3bded287c0ea8f0e6c55dbe6cbffa752 to your computer and use it in GitHub Desktop.
AtCoder ABC #121 B - Can you solve this?
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, M, C = gets.chomp.split(" ").map(&:to_i) | |
B = gets.chomp.split(" ").map(&:to_i) | |
ans = 0 | |
N.times do | |
a = gets.chomp.split(" ").map(&:to_i) | |
x = C | |
M.times do |i| | |
x += a[i] * B[i] | |
end | |
if x > 0 | |
ans += 1 | |
end | |
end | |
puts ans |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment