fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. ll t,n;
  5. map<ll,ll> a;
  6. void power()
  7. {
  8. for (ll i=0; i<=1000000; i++)
  9. {
  10. ll k=i*i*i;
  11. a[k]=1;
  12. }
  13. }
  14. void dealwithme()
  15. {
  16. cin>>t; power();
  17. while (t--)
  18. {
  19. cin>>n;
  20. if (a[n]==1) cout<<"YES"<<endl;
  21. else cout<<"NO"<<endl;
  22. }
  23. }
  24. int main()
  25. {
  26. freopen("cc.inp","r",stdin);
  27. freopen("cc.out","w",stdout);
  28. dealwithme();
  29. }
Success #stdin #stdout 0.35s 66016KB
stdin
Standard input is empty
stdout
Standard output is empty