Language: C++

#include <cstdio>
#include <cstring>



void counts(int n, int &one, int &two, int staone)
{
	one=0;
	two=0;
	staone=0;
	statwo=0;
	int tot=2;
	while (n)
	{
		one+=(n%3==1);
		two+=(n%3==2);
		n/=3;
		if (n%3==1)
			staone+=tot;
		if (n%3==2)
			statwo+=tot;
		tot*=2;
	}
}

int edgev[20][20];
double prab[200];
double pp[20][200000];
double dp[2000000];
int main()
{

	int n, m, p;
	scanf("%d%d%d", &n, &m, &p);
	memset(edgev, 0, sizeof(edgev);
	for (int i=1; i<=m; i++)
	{
		int u, v;
		scanf("%d%d", &u, &v);
		edgev[u][v]=edgev[v][u]=1;
	}
	prab[0]=1.0;
	for (int i=1; i<=m; i++)
		prab[i]=prab[i-1]*p/100.0;
		
	pp[1][0]=1.0;
	for (int i=2; i<=n; i++)
		pp[i][0]=0.0;
	for (int sta=1; sta<(1<<n); sta++)
	{
		pp[1][sta]=1.0;
		for (int i=2; i<=n; i++)
			if (sta&(1<<(i-1)))
				pp[i][sta]=1.0;
			else
			{
				double temp=1.0;
				for (int j=1; j<=n; j++)
					if (sta&(1<<(j-1)))
						if (edgev[i][j])
							temp*=p;
				pp[i][sta]=1.0-temp;
			}
	}
		
	int tot=1; 
	for (int i=1; i<=n-1; i++)
		tot*=3;
	for (int sta=1; sta<tot; sta++)
	{
		int one, two, staone, statwo;
		counts(sta, one, two, staone, statwo);
		if (!one)
			continue;
		if (two==0)
		{
			dp[sta]=1.0;
			for (int i=1; i<=n; i++)
				if (staone&(1<<(i-1)))
					dp[sta]*=pp[i][1];
		}
		else
		{
			int have[20]={0};
			for (int i=1; i<=n; i++)
				if (sta&(1<<(i-1)))
				{
					have[0]++;
					have[have[0]]=i;
				}
			int s=0, t=0;
			for (int i=1, totsta=(1<<(two-1)); i<totsta; i++)
			{
				for (int i=1; i<=
				
				


	

		
		
	return 0;
}
 

Compiler output:
a.cc: In function 'void counts(int, int&, int&, int)':
a.cc:11:9: error: 'statwo' was not declared in this scope; did you mean 'static'?
   11 |         statwo=0;
      |         ^~~~~~
      |         static
a.cc: In function 'int main()':
a.cc:35:39: error: expected ')' before ';' token
   35 |         memset(edgev, 0, sizeof(edgev);
      |               ~                       ^
      |                                       )
a.cc:72:23: error: too many arguments to function 'void counts(int, int&, int&, int)'
   72 |                 counts(sta, one, two, staone, statwo);
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:6:6: note: declared here
    6 | void counts(int n, int &one, int &two, int staone)
      |      ^~~~~~
a.cc:103:9: error: expected primary-expression before 'return'
  103 |         return 0;
      |         ^~~~~~
a.cc:94:50: error: expected ';' before 'return'
   94 |                                 for (int i=1; i<=
      |                                                  ^
      |                                                  ;
......
  103 |         return 0;
      |         ~~~~~~                                    
a.cc:103:9: error: expected primary-expression before 'return'
  103 |         return 0;
      |         ^~~~~~
a.cc:94:50: error: expected ')' before 'return'
   94 |                                 for (int i=1; i<=
      |                                     ~            ^
      |                                                  )
......
  103 |         return 0;
      |         ~~~~~~                                    
a.cc:104:2: error: expected '}' at end of input
  104 | }
      |  ^
a.cc:83:17: note: to match this '{'
   83 |                 {
      |                 ^
a.cc:104:2: error: expected '}' at end of input
  104 | }
      |  ^
a.cc:70:9: note: to match this '{'
   70 |         {
      |         ^
a.cc:104:2: error: expected '}' at end of input
  104 | }
      |  ^
a.cc:31:1: note: to match this '{'
   31 | {
      | ^