Please subscribe to the official Codeforces channel in Telegram via the link ×

MedoN11's blog

By MedoN11, history, 8 years ago, In English

Link to problem :

DP solution with 501*501*501 memory (MLE but gives correct results when tested on PC) :

DP solution with 2*501*501 memory ( dimension compressed) : gives WA on sample? :

Anyone has an idea why? Thanks.

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