hallo codeforces
I have TLE in this problem C. Can I Square? in last round
with O($$$10^4\cdot\sqrt{2\cdot10^{10}}$$$)
but my friends dont got TLE with same time complexity
Can I get a re-judge for my submission ?
Or an explanation of the problem that occurred
because of skibidi
No he got TLE in system test
good joke -_-
I bet it's because you use C-style IO (print, scanf) and C++-style (cin) at the same time. Never mix two styles and use
as your friends did
And. does not worth pinging Mike)
Regardless of his solution, the other solutions have a very high complexity
.
239292334 this will probably tle because it's clearly > 1e9 operations
Find sum of array, check if sum is perfect square. I do not understand why you used the second loop :(
first submission & second submission for another user have same complexity but dont get TLE
I have no idea then why this happened.
This is what we're talking about
Bro you just had to find the sum of the array, and find a number x, such that x*x=sum
Some implementation:
long long int n , sum=0; cin >> n; int a[n]; for(int i = 0; i < n; i++) {cin >> a[i]; sum += a[i];} if (long long int(sqrt(sum)) == float(sqrt(sum))) cout << "YES\n"; else cout << "NO\n";