Recursion Rat in a Maze

Hi I dont know why my code is wrong. And instead of counting 6 ways it only counts 3 ways please help!

#include<bits/stdc++.h>
using namespace std;
int c=0;
void PrintMaze(bool a[][3]){
    for(int i=0;i<3;++i){
        for(int j=0;j<3;++j){
            cout << a[i][j] << " ";
        }
        cout << endl;
    }
}
void Solve(bool init[][3],bool a[][3],int i,int j,int n){
    if(i==n && j==n){
        init[i][j]=1;++c;
        PrintMaze(init);cout << endl;
        return;
    }
    if(i>n || j>n)return;
    if(a[i][j]==1)return;
    init[i][j]=1;
    Solve(init,a,i+1,j,n);Solve(init,a,i,j+1,n);
    init[i][j]=0;
}
int main()
{
    bool a[][3]={{0,0,0},{0,0,0},{0,0,0}};
    PrintMaze(a);
    bool init[][3]={0};
    Solve(init,a,0,0,2);
    cout << c << endl;

}

can you mention question link? coz in question i’m seeing it is not asking for counting the ways. or please put appropriate tag and contents so that i can find from my portal, i’m not able to view it in my portal.

Yes Im Doing This At the main i can say:

if(c>=1){cout << “YES”}

post your question link …

https://hack.codingblocks.com/contests/c/95/398
This is the link but now im counting the ways and my code is different.

can you post you different code and share it on ide.