#45570: cpp ans


yp11351229@yphs.tp.edu.tw (809-39詹豫喬)

學校 : 臺北市私立延平高級中學
編號 : 276259
來源 : [203.72.178.1]
最後登入時間 :
2025-10-08 15:04:43

#include <bits/stdc++.h>
using namespace std;
int main(){
    int M,a,b,c;
    cin>>M;
    for(int i=0;i<M;i++){
        cin>>a>>b>>c;
        if(b*b-4*a*c>=0&&(int)sqrt(b*b-4*a*c)*(int)sqrt(b*b-4*a*c)==b*b-4*a*c){
            cout<<"Yes"<<endl;
        }
        else{
            cout<<"No"<<endl;
        }
    }
    return 0;
}