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


The Ghost Type

Here is the link of the above problem i have been trying. Just want to know where i am going wrong with my this code?

include<bits stdc++.h="">

using namespace std; int n; int getcount(int mask){ if(mask== (1<<(n)-1)) return 1; int count=0; for(int i=0;i<n;i++){ if(!mask&(1<<i)){ for(int j=1; j<=n; j++){ if(!mask&(1<<(j-1)) && (i+1)&(j)==(i+1)) if(getcount(mask|(1<<i))) count++ ; } } } return count; } int main(){



return 0;

} please help me with the above one.

asked 02 Jan, 20:39

riju321's gravatar image

accept rate: 0%

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: 02 Jan, 20:39

question was seen: 49 times

last updated: 02 Jan, 20:39