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

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

I am trying to solve this problem and I am not able to understand the editorial that why
dp[0][i]=min(dp[1][i-a]+sum-of-whites(i-a+1,i))
dp[1][i]=min(dp[0][i-a]+sum-of-blacks(i-a+1,i))
where a belongs to [x,y]
Editorial Link :- Editorial
Question Link :- Question

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

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

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

I tried to solve this question using Binary Search. And I am not able to understand why one of my solutions is giving me the wrong answer while other got accepted.
Problem Link
Submission 1 (Wrong)
Submission 2 (Accepted)
Submission 3 (Accepted)

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

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

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

The person is also not that much good at maths but wants to improve his mathematical skills in 1 to 2 years practicing the book. If you have multiple books in mind for please list it in the order of preference i.e which should be studied first. Thanks in advance !! :)

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

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