Whats wrong in this code? pls help me


#1
int Solution::isValidSudoku(const vector<string> &a) {
int i,j;
map<char,int> m;
for(i=0;i<9;i++)
{
    for(j=0;j<9;j++)
    {
        if(a[i][j]!='.')
        {
            //cout<<a[i][j]<<" ";
            m[a[i][j]]++;
            if(m[a[i][j]]>1)
            {
                 //cout<<"l1 "<<" i "<<i<<" j "<<j<<" ";
                return 0;
            }
        }
        else
        {
            continue;
        }
    }
    m.clear();
}
//m.clear();
for(j=0;j<9;j++)
{
    for(i=0;i<9;i++)
    {
        if(a[i][j]!='.')
        {
            m[a[i][j]]++;
            if(m[a[i][j]]>1)
            {
                 //cout<<"l2 "<<" i "<<i<<" j "<<j<<" ";
                return 0;
            }
        }
        else
        {
            continue;
        }
    }
    m.clear();
}
//m.clear();
vector<int> c ={0,3,6,30,33,36,60,63,66};
int p,q;
for(int k=0;i<9;k++)
{
    p=c[k]%10;
    c[k]=c[k]/10;
    q=c[k]%10;
    for(i=q;i<q+3;i++)
    {
        for(j=p;j<p+3;j++)
        {
            if(a[i][j]!='.')
            {
                m[a[i][j]]++;
                if(m[a[i][j]]>1)
                {
                    //cout<<"l3 "<<" i "<<i<<" j "<<j<<" ";
                    return 0;
                }
            }
            else
            {
                continue;
            }
        }
    }
    m.clear();
}

return 1;

}