2019牛客暑期多校训练营(第七场)-BIrreducible Polynomial(多项式因式分解)

mac2022-06-30  24

题目链接: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上百实例源码以及开源项目
最新回复(0)