顯示包含「hash」標籤的文章。顯示所有文章
顯示包含「hash」標籤的文章。顯示所有文章

2011年1月2日星期日

HDU 3748 Equivalent mass

Problem Statement:
  • Given N elements, A[N], determine if it is possible to pick exactly K of them s.t. the sum is V. But you cannot pick Xth and Yth simultaneously, for some given pairs (X, Y). There are M such pairs.

Constraints:
  • 1 <= N <= 32
  • 1 <= A[i], V <= 10^9
  • 0 <= M <= 6
  • 0 <= K <= N