传统题 2000ms 128MiB

quadratic equation

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Problem Description

With given integers a,b,c, you are asked to judge whether the following statement is true: "For any x, if a⋅x2+b⋅x+c=0, then x is an integer."

Input Format

The first line contains only one integer T(1≤T≤2000), which indicates the number of test cases.
For each test case, there is only one line containing three integers
a,b,c(−5≤a,b,c≤5).

Output Format

or each test case, output “YES” if the statement is true, or “NO” if not.

3
1 4 4
0 0 1
1 3 1
YES
YES
NO

国庆训练赛

未参加
状态
已结束
规则
XCPC
题目
11
开始于
2017-10-1 20:00
结束于
2017-10-2 1:00
持续时间
5 小时
主持人
参赛人数
51