Raks_splunk's blog

By Raks_splunk, history, 5 days ago, In English

Was solving Matrix chain multiplication on GFG using memoization and got this weird error.

Code works fine when I use a 2D array to store the states, But Gives TLE when vectors are used. Is there any specific reason for this?

Accepted submission: https://pastebin.com/3ZdC61Vc

TLE submission: https://pastebin.com/VbdFrzDJ

Full text and comments »

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

By Raks_splunk, history, 18 months ago, In English

Getting this error when submitting the solution: https://codeforces.net/contest/1713/submission/189032860

VScode gives the correct answer without any errors. Is there any way I can fix this?

Full text and comments »

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

By Raks_splunk, history, 18 months ago, In English

Link for the code:

https://cl1p.net/code

Used min heap priority queue to store the missing numbers from the given array and a map to store the numbers which are repeated more than once.

Full text and comments »

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