Codeforces Round #716 (Div. 2)
A. Perfectly Imperfect Array
是否存在一个子序列,使其所有元素乘积不是完全平方。正难则反,考虑必定完全平方的情况:每个元素都是完全平方数
#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int maxn=1e4+5;
int judge(int x)
{
double y=sqrt(x);
if(y==(int)y) return 1;
else ret
原创
2021-04-20 03:27:37 ·
256 阅读 ·
0 评论