longrange's blog

By longrange, 10 months ago, In English

Earlier on codeforces, there were so many educational blogs, and fun blogs. and so fun to just check them. but now only round announcements, people asking for debugging and outdated blogs. (also ama)

where are the fun blogs? have people stopped being more fun?

EDIT : the second account is not for votes, upvote or downvote, dont care. just give clear answer

Full text and comments »

  • Vote: I like it
  • +20
  • Vote: I do not like it

By longrange, history, 13 months ago, In English

does anyone else have the same issue that mathJax doesn't load the problem statements?

Full text and comments »

  • Vote: I like it
  • +11
  • Vote: I do not like it

By longrange, history, 13 months ago, In English

I see many times that, there are green and grey testers. I wondered how I could test, maybe simple problems...

Full text and comments »

  • Vote: I like it
  • +11
  • Vote: I do not like it

By longrange, history, 13 months ago, In English

I came across a problem in which I had to find a subset of values which gave me sum N ( N~1e12 ). The value array was hard-coded (by me) and now I am struggling to find a solution to this. The size of array is only 52, but I didn't know how to store boolean values for 'possible' array. I tried bitset, but the size of N is too large.

Could anyone suggest some method?

Full text and comments »

Tags dp
  • Vote: I like it
  • +8
  • Vote: I do not like it

By longrange, history, 14 months ago, In English

Reference to link

My solution is to sort the distances and arrange them in a cyclic order(except the last one). Then add edges of negative weight to minimize the sum. This yields the answer to be -1*(max_element in distances) [except when n=2]. What is wrong with my algo?

Full text and comments »

  • Vote: I like it
  • -18
  • Vote: I do not like it

By longrange, history, 15 months ago, In English

Hello Codeforces! I've recently been trying to learn the dynamic programming approach, and I might've had some success, but it is still really hard for me to think of defining a "state" for the problem. Even after the thought of the state, it is hard to link the states to previous sub-states. I find it hard to approach dp problems in general, and I just need some advice on how to practice in order to improve my dp approach. If you could guide me a little, I would love it <3 !. Not only high-rated persons, everyone who knows something about dp can help me. (P.S. Dont judge my profile I give contests on mostly atcoder where I am about to become Green)

Full text and comments »

  • Vote: I like it
  • +28
  • Vote: I do not like it

By longrange, history, 18 months ago, In English

I wanted to ask all the experts, what can I do to get better? I want to become a good coder, and I don't have any guidance on what to do (like what topics to study). Any and every help is appreciated!

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it