atcoder#ABC121B. [ABC121B] Can you solve this?
[ABC121B] Can you solve this?
Score : points
Problem Statement
There are pieces of source code. The characteristics of the -th code is represented by integers .
Additionally, you are given integers and .
The -th code correctly solves this problem if and only if .
Among the codes, find the number of codes that correctly solve this problem.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the number of codes among the given codes that correctly solve this problem.
2 3 -10
1 2 3
3 2 1
1 2 2
1
Only the second code correctly solves this problem, as follows:
- Since $3 \times 1 + 2 \times 2 + 1 \times 3 + (-10) = 0 \leq 0$, the first code does not solve this problem.
- $1 \times 1 + 2 \times 2 + 2 \times 3 + (-10) = 1 > 0$, the second code solves this problem.
5 2 -4
-2 5
100 41
100 40
-3 0
-6 -2
18 -13
2
3 3 0
100 -100 0
0 100 100
100 100 100
-100 100 100
0
All of them are Wrong Answer. Except yours.