arun_prasad's blog

By arun_prasad, history, 7 years ago, In English

ive been trying to solve this problem since yesterday night . however i could only come up with an O(d*d*k) solution.

problem

this however wont work due to Memory and time limits.

I also looked at one of the solved solutions by rajat1603 solution link

Could someone explain how matrix exponentiation could be used in these type of problems ?

help would be greatly appreciated :D

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By arun_prasad, history, 7 years ago, In English

I was trying to solve this problem

problem link

however I was unable to understand the editorial to this problem.

Can someone please explain how to solve this problem using examples if possible ?

I am still unable to understand the sample output itself and what the question is asking exactly.

Thank you in advance :D :D

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By arun_prasad, history, 7 years ago, In English

Does tourist have any other special qualities other than competitive programmming?

Like is he good at any sport ?

Does he have a girlfriend? ;) :P

Full text and comments »

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

By arun_prasad, history, 8 years ago, In English

I was trying to solve this problem on Codechef . Click Here

After spending a couple of hours on this I could not come up with any dp relation .

Can someone please provide a dp recurrence for this problem and help me solve it ?

Thanks in advance.

Full text and comments »

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

By arun_prasad, history, 8 years ago, In English

I was trying to solve this problem on Spoj . Click Here.

After spending a couple of hours on this I could only come up with a dfs solution which obviously got TLE.

Then I looked for help online and i found this quora solution QUORA SOLUTION .

Can someone tell me with an example and proof of the extra nodes to be added and why maxflow should be 2 for it to be right?

Full text and comments »

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

By arun_prasad, history, 8 years ago, In English

Im trying to solve this problem on hackerrank. I am unable to understand the editorial. If someone could explain the editorial part with proof it would be of great help. Click for problem

Full text and comments »

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