### juice04's blog

By juice04, history, 3 months ago,

Here's the link to the question, this has a time limit of 2.5 seconds, we're supposed to eliminate the subarrays which have it's xor sum as a perfect square. I'm pre-computing all the perfect squares till 1e6(because maximum xor sum cannot exceed that) and hence eliminating all such subarrays whose xor sum is an element in the perfect square array, not greater than 2*n. But it's throwing a tle. Could someone please point out what i'm doing wrong. Thank You Very Much!!! (187177527)

• 0

By juice04, history, 3 months ago,

Here's the link to the problem. I've sorted the powers in ascending order and I am going on decreasing the health of each and every monster by the amount of total damage inflicted so far. Whenever I reach the end of the vector, it just means that there are no monsters left in the vector whose health is strictly greater than the total damage inflicted (186184534). Hence, I print yes. But in the internal test case, the 37th Token is printed as Yes instead of a No. Could someone please take a look into it and point out what I did wrong? Thank You!

• 0

By juice04, history, 3 months ago,

We're required to find if there exists a pair with gcd>=2 in this problem. here's my implementation in c++ this threw a tle on test 3. can someone please look into it and suggest an optimization(if any). Thanks in advance

• 0

By juice04, history, 4 months ago,

I was trying to solve this question using smallest prime factor sieve. but i'm encountering a runtime error on my submission. could someone pls take a look into it and point the error out (FYI, it ran perfectly on my system IDE). tyvm in advance.

• 0