Untitled

 avatar
user_5668965
c_cpp
15 days ago
417 B
1
Indexable
Never
#include <bits/stdc++.h>
using namespace std;
#define MX 10000
bool sq[MX+5];
int main()
{
    for (int i=1;i*i<=MX;i++)
    sq[i*i]=1;
    int t;
    scanf("%d",&t);
    while (t--)
    {
        int n;
        scanf("%d",&n);
        bool ok=1;
        while (n--)
        {
            int a;
            scanf("%d",&a);
            ok&=sq[a];
        }
        puts(ok? "NO":"YES");
    }
}
Leave a Comment