mehrshadlotfi's blog

By mehrshadlotfi, history, 8 years ago, In English

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.

Full text and comments »

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

By mehrshadlotfi, history, 9 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • -20
  • Vote: I do not like it