You are not logged in. Please login at www.codechef.com to post your questions!

×

Need help in a codeforces Problem

Can Someone explain me this problem http://codeforces.com/contest/114/problem/B Using bruteforce method

asked 16 Jun '17, 22:06

saisurya027's gravatar image

4★saisurya027
1666
accept rate: 0%

edited 16 Jun '17, 22:07


We have to choose a team such that no 2 volunteers have a problem with each other.

Since the number of volunteers, N = 16 is small we can iterate through all the subsets (2^16 = 65536) possible and check whether this subset satisfies the given condition.

Generating all the subsets can be done by bit manipulation.

link

answered 17 Jun '17, 01:37

c_utkarsh's gravatar image

5★c_utkarsh
1.1k5
accept rate: 17%

edited 17 Jun '17, 01:38

Thank You So much!

(18 Jun '17, 06:52) saisurya0274★
toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×671
×311

question asked: 16 Jun '17, 22:06

question was seen: 291 times

last updated: 18 Jun '17, 06:55