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

Автор avinash007, история, 2 года назад, По-английски

Recently I came across this problem from Atcoder Beginner Contest 130

Link-Zig Zag Tree

After trying very hard I was not able to understand the editorial explanation. So I request anyone who knows the problem solution to help me solve it.

Also suggest similar problems

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

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

Автор avinash007, история, 3 года назад, По-английски

Can someone please give a detailed solution for the below problem as I am not able to understand the editorial. Problem

Also please use dp[l][r] as the minimum operation required to achieve the task. Link to Similar Problems would be appreciated

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

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

Автор avinash007, история, 3 года назад, По-английски

Find the number of pairs (i, j) such that after removing a substring S[i, j] from S, string T still remains a subsequence of S

A similar Problem Cf problem

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

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

Автор avinash007, история, 3 года назад, По-английски

Can Someone please explain the solution of the problem Link

I know its binary search problem but how to implement the check function

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

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

Автор avinash007, история, 3 года назад, По-английски

You are given N marbles in different colors. You have to remove marbles till there are no marbles left. Each time you can choose continuous marbles with the same color, remove them and get k*k points. Find the maximum points you can get.

1 ≤ N ≤ 100 0 ≤ Ai ≤ 100

INPUT 6 4 3 1 1 4 2 OUTPUT 10

Remove 1, then 3, then 4 and 2, we get 2*2+1*1+2*2+1*1 = 10

Please provide link to similar Problems.

Also I would like to know your dp states and Transitions

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

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