题目描述
Given function f(x, y) = ax*x + bxy + cy*y, check if f(x, y) ≥ 0 holds for all x, y ∈ R.
Input
The input contains zero or more test cases and is terminated by end-of-file.Each test case contains three integers a, b, c.
• −10 ≤ a, b, c ≤ 10
• The number of tests cases does not exceed 104
.
Output
For each case, output “Yes” if f(x, y) ≥ 0 always holds. Otherwise, output “No”.
Sample Input
1 -2 1
1 -2 0
0 0 0
Sample Output
Yes
No
Yes
题目分析
这道题目描述也很简单,很容易读懂题目的意思:给定表达式 f(x,y), x、y都属于实数集,输入各项系数 a,b,c 判断表达式的值是否非负。(很容易读懂对吧?)
我们看下数据规模:
a,b,c都很小,
样例数为10000
解题思路
从数据规模来看,显然用打表的方式是可以完成的。
大家可以看下dalao的