Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define endl '\n'
- #define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
- #define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);
- map<long long, bool> isPerSqr;
- int main()
- {
- optimize();
- int lim = 32e4;
- for ( int i = 1; i <= lim; i++ ) {
- isPerSqr[1LL*i*i] = 1;
- }
- int T;
- cin >> T;
- while(T--) {
- long long n;
- cin >> n;
- if ( isPerSqr[n] ) cout << "YES\n";
- else cout << "NO\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement