SCU4436—— map——Easy Math

/*
    map 向量可以存东西与数的大小无关,只与数的数目有关
 
*/
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<map>
using namespace std;
map<int, int >a;
int main()
{
    for(int i = 0; i <= 32000; i++){
        a[i*i]++;
    }
    int m, n;
    while(~scanf("%d",&n)){
        int flag = 0;
        for(int i = 1; i <= n ; i++){
            scanf("%d", &m);
            if(a[m] == 0)
                flag = 1;
        }
    if(flag == 0) printf("Yes\n");
    else printf("No\n");
    }
   return 0;
}

  

posted @ 2015-07-15 00:14  Painting、时光  阅读(200)  评论(0编辑  收藏  举报