I am submitting the solution, but it is showing different answer on RunCode and on Submit. However, answer on RunCode is coming correct, while incorrect on submission. How is this even possible ? Is Judge working properly ?

I have attached the pics of output and the code below, for the verification.

Thanks

```
class Solution {
public:
void solveNQueensUtil(int n, int & count, vector<string> & status, vector<int> & row, vector<int> & col, vector<int> & sum, vector<int> & diff, int level)
{
if(level == n)
{
count++;
//cout << count << endl;
return ;
}
for(int i=0; i<n; i++)
{
if(row[level] == 0 && col[i] == 0 && sum[level+i] == 0 && diff[n+(level-i)] == 0)
{
//cout << "here : " << level << endl;
string temp(n,'.');
temp[i] = 'Q';
status.push_back(temp);
row[level] = 1;
col[i] = 1;
sum[level+i] = 1;
diff[n+(level-i)] = 1;
solveNQueensUtil(n, count, status, row, col, sum, diff, level+1);
status.pop_back();
row[level] = 0;
col[i] = 0;
sum[level+i] = 0;
diff[n+(level-i)] = 0;
}
}
return ;
}
int totalNQueens(int n) {
vector<string> status;
vector<int> row(n, 0);
vector<int> col(n, 0);
vector<int> sum(2*n-1, 0);
vector<int> diff(2*n-1, 0);
//vector<vector<string> > res;
int count = 0;
solveNQueensUtil(n, count, status, row, col, sum, diff, 0);
status.clear();
row.clear();
col.clear();
sum.clear();
diff.clear();
return count;
}
};
```