void totalNQueensDFS(int level, int n, int[] occ) {
        if(level == n) {
            ++res;return;
        }
        for (int i = 0; i < n; ++i) {
            if (safe(level, i, n, occ)) {
                occ[level] = i;
                totalNQueensDFS(level + 1, n, occ);
                occ[level] = Integer.MIN_VALUE;
            }
        }
    }