larush's blog

By larush, history, 6 months ago, In English

Hello

So I was solving this problem (here), and a hashing-based solution seemed obvious to me. It is enough to look at the hash of the changed substring and get the final hash of the modified string using the prefix and suffix. I do not know much about hashing, just a little about polynomial (or rolling) hash. But it seems that my hash isn't safe enough. I tried a few things, but with no luck:

Spoiler

I used the standard primes M = 1e9+9 and p = 31 initially, as I learned from cp-algo. I have no clue what I'm doing wrong.

I hope someone could assist me in this and help me understand hashing a little better. Cheers!

off by one

Full text and comments »

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

By larush, history, 10 months ago, In English

So this isn't the usual blog about a newbie/pupil complaining. Over the past year or so I've solved many problems (~850), and I'm happy about that. Recently I've been doing a lot of ProjectEuler, and I thought to myself " Wouldn't it be fun to go to an OJ and try to solve each and every problem? ". You may obviously think a green dude's gone crazy. But in order to progress in CP, I really feel that I should grind some website's problems.

Obviously as Um_nik mentioned in his blog (sorry for the tag Alex), codeforces may not be the best place to start as a beginner, so I'm thinking of heading to TIMUS or another OJ, and grinding the problemset, learning new things if I can't solve problems. I've felt kinda stuck on codeforces, and maybe a break from " rating 1500 search on CF ", and " each and every problem from OJ 'X' " will help me.

So, the question: Is this a good idea?

(P.S. If yes, what could be a good OJ for me :P ? )

Full text and comments »

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

By larush, history, 11 months ago, In English

Hi

I have recently been facing some error messages in my IDE (Visual Studio Code), and an error always pops up displaying "cin is ambiguous". I tried to look online but only found some discussions on version control, and could not resolve it. Could some kind person please assist me with this? Many Thanks!

Full text and comments »

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

By larush, 13 months ago, In English

This is with reference to 1811F - Это цветок?.

If you have tried this problem, how would you rate it's difficulty?

CLIST rates it ~2400. But I was able to solve it, so why is that?

Is this a flaw with the rating system? If I am able to solve it, then it definitely shouldn't be rated around 2400. Hope to gain a better understanding of the rating system.

Full text and comments »

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