题目链接:https://ac.nowcoder.com/acm/contest/887/B
题意:给定整系数多项数,判断实数域上是否可约。
思路:
AC代码:
#include<cstdio>
using namespace std;
typedef long long LL;
int T,n;
LL a[25];
int main(){
scanf("%d",&
T);
while(T--
){
scanf("%d",&
n);
for(
int i=n;i>=
0;--
i)
scanf("%lld",&
a[i]);
if(n>
2){
printf("No\n");
}
else if(n==
2){
if(a[
1]*a[
1]>=
4*a[
2]*a[
0])
printf("No\n");
else
printf("Yes\n");
}
else{
printf("Yes\n");
}
}
return 0;
}
转载于:https://www.cnblogs.com/FrankChen831X/p/11325646.html
相关资源:JAVA上百实例源码以及开源项目