Determinate,if it's possible,p numbers of n binary digits,so any 2 of this numbers to match in exactly m positions.There must no be positions same digit to appear in all the p numbers.

Restrictions

1 <= p <= 25

1 <= n <= 25

1 <= m <= n

a number can start with 0.

If it's possible ,the result is 1,else 0.

Examples:

5 5 3 1 //first 3 are p,n,m and the last is result.

8 9 5 0

9 9 7 1

6 10 4 1

12 12 10 1

7 15 11 0

10 20 16 1

Yusuke00 -5 Newbie Poster

Bob 15 using namespace Bob Team Colleague

Yusuke00 -5 Newbie Poster

Bob 15 using namespace Bob Team Colleague

Yusuke00 -5 Newbie Poster

Yusuke00 -5 Newbie Poster

np complete 8 Newbie Poster

Yusuke00 -5 Newbie Poster

Bob 15 using namespace Bob Team Colleague

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.