Блог пользователя Raks_splunk

Автор Raks_splunk, история, 7 дней назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +10
  • Проголосовать: не нравится

Автор Raks_splunk, история, 18 месяцев назад, По-английски

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?

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор Raks_splunk, история, 18 месяцев назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится