public int placeQueen(int i, int n) {
        if (i == n) {
            return 1;
        }

        int count = 0;

        for (int j = 0; j < n; j++) {
            if (isSafe(i, j)) {
                line[i] = j;
                count += placeQueen(i + 1, n);
                line[i] = 0;        //delete this line can also pass the oj, why?
            }
        }
        return count;
    }