I am getting tle in one of the test case all others are working fine
TLE IN ONE OF THE TEST CASES
your code is giving wrong answer for n=11 , your code output is tle correct output is 2680
use optimzesolution
if Queen is placed in particular row then change row value