Comments

noice

On cryCodeforces Round 1003 (Div. 4), 14 months ago
0

Substring can always be the whole string so if you add all the characters then the answer can overflow the limit of k or the answer can also underflow the limit of k. Hence if this is the case then answer is -1. Else build the solution of K length string first then add remaining or how ever you want to build your string. My sol

On cryCodeforces Round 1003 (Div. 4), 14 months ago
0

This is my wrong ans for E Wrong Sol. and i just corrected it to max(n, m) < k then also no answer and it passed :) Correct Solution. I now want to cry more hard.

On cryCodeforces Round 1003 (Div. 4), 14 months ago
0

i feel like problems D onwards are nice, would not say such about c1, c2

same, i think i am retarded

Bottom up pull DP for C -> Click

Solved C like nothing, bricked at B. Nice Problemset. Here's my weird solution to C. Solution

yup C is easy but you can easily make wrong guesses hence increasing penalities.

On nifesheCodeforces Round 997 (Div. 2), 15 months ago
0

maybe due to its wording, a more clear statement would have done its job.

Link so essentially we would store all the values, now sort it out so that our X indexes become from small to large. Now, lets take our y index as a target to see. Now iterating on the values of x, y and color, if we find a color that is white, we essentially take the minimum as it value of y. Now if we get color as black, if its y coordinates is greater than our maximum permissible value, we cannot have it at that position, we output no. Else we go over all values and output yes at the end.

If you dont understand the point of why a minimum should be always considered, you can observe that in the diagram given in the question. We get a ladder like structure.

Translate the japanese editorial via language model, donno they stopped recently

yup you maybe right. i solved b and c in practice. If i dont solve a problem in 20 mins or dont feel problem is nice, i leave the contest. Then again, if people keep cheating, guess what, you dont get what you deserve. Plus i am into linux and backend, i just spend some free time here :) I also got 3k rank at atcoder today :)

so even specialists are cheating now ?

On Cocoly1990Good Bye 2024: 2025 is NEAR, 16 months ago
0

Oh i got it, thanks to you i switched it to fenwick tree for range calculation, it worked. Link And stimulating for each segment is also great, Thanks.

On Cocoly1990Good Bye 2024: 2025 is NEAR, 16 months ago
0

could you elaborate the need of prefix sums, i still dont get it

I overcomplicated it and am crying now.

Solved Problem C via Fenwick Tree. One of the best problems i have ever solved. Thanks.

It clashed with leetcode's contest. Maybe that's the reason.

me too

Same with B ig

On HoriCodeforces Global Round 27, 18 months ago
0

I thought there must be some proof and did not see the standings assuming it was hard, i fcdkup :)

I think I have seen that problem on atcoder. I think it was C and was solved via bitmasking as the constraints were really low. Could you link to the problem or mention the constraints if so. Thanks.

Nice progress. Do you use any other judges ?

its just greedy, We just get the maximum as it should be different cars, then divide by the given limit X, add 1 if remainder. I dont think its even a standard problem. If so, i would also like to know how.

nice problemset, thankyou

les goo