0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-23 21:48:48 +00:00
Baoshuo Ren 2021-10-30 19:25:07 +08:00 committed by Baoshuo Ren
parent 3b4f5df33e
commit 3f5166c479
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

24
AcWing/4003/4003.cpp Normal file
View File

@ -0,0 +1,24 @@
#include <bits/stdc++.h>
using namespace std;
int n, a[1005], f[1000005];
int main() {
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
sort(a + 1, a + 1 + n);
for (int i = n; i > 0; i--) {
bool flag = false;
for (int j = -1000; j <= 1000; j++) {
flag = flag || a[i] == 1ll * j * j;
}
if (!flag) {
cout << a[i] << endl;
exit(0);
}
}
return 0;
}