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


Need help in a codeforces Problem

Can Someone explain me this problem Using bruteforce method

asked 16 Jun '17, 22:06

saisurya027's gravatar image

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.


answered 17 Jun '17, 01:37

c_utkarsh's gravatar image

accept rate: 17%

edited 17 Jun '17, 01:38

Thank You So much!

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

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 16 Jun '17, 22:06

question was seen: 291 times

last updated: 18 Jun '17, 06:55