#include #include #include using namespace std; int p[20][20]; int q[20][20]; double dp[13][1<<11]; int st[20]; double pr[1<<11]; int v[20]; double EPS=1e-9; int main(){ int a,b;scanf("%d%d",&a,&b); for(int i=0;iQ; for(int j=0;j=4){ Q.push(j);v[j]=1; } } while(Q.size()){ int at=Q.front();Q.pop(); if(at){ st[at-1]++; if(st[at-1]==4){Q.push(at-1);v[at-1]=1;} } if(atQ; for(int j=0;j=4){ Q.push(j);v[j]=1; } } while(Q.size()){ int at=Q.front();Q.pop(); if(at){ st[at-1]++; if(st[at-1]==4){Q.push(at-1);v[at-1]=1;} } if(at