I have solved a question named NOMATCHES. It is showing TLE error after optimising the code as much as I can ,suggest me any way to solve this problem using python.
My code is :
from itertools import permutations as ps
for i in perm:
for j in range(0,n-1,2):
for i in range(t):
what are the ways through which I can optimise my code to achieve the target.