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

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

How to solve the following problem. Find the sum of the number of distinct characters in all the distinct substrings of S. 1<=|S|<=100000. S="aabb"
Set of distinct sub-strings of "aabb" = {a,b,aa,ab,bb,aab,abb,aabb} sum = 1 + 1 + 1 + 2 + 1 + 2 + 2 + 2 = 12.

Thanks!

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

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

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

given a matrix of N rows and M columns, each element of matrix is equal to 0 or 1 . we can swap any two rows of matrix any number of times. we are required to find the maximum area of a submatrix consisting of 1's only by swapping rows. constraints (1<=n,m<=5000) problem link: https://www.hackerearth.com/challenge/college/execute-final-round/algorithm/47da7e50ba054fdcb66c292b7f681fb5/ please help and thanks in advance.

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

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