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

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

We have n black points and n white points with their x values. If we connect each black point with a white point by wire. Which algorithm will cause the lowest wire needed.

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

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

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

Consider we have a set of n numbers, and we want to calculate the number of subsets in which the addition of all elements equal to x.

Input first line has n, x and the next line contains n numbers of our set. In the output we have to calculate the number of subsets that have total sum of elements equal to x.

INPUT 4 3 -1 2 4 2

OUTPUT 2

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

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