You are viewing a single comment's thread. Return to all comments →
my python 3 code but there is terminate due to timeout can anyone help me:
from itertools import permutations a=int(input()) b=input().split(' ') l=[int(i) for i in b] l1=permutations(l) l2=[] l3=[] for i in l1: for j in range(len(i)-1): l2.append(i[j]^i[j+1]) l3.append(max(l2)) l2=[] print(min(l3))
Seems like cookies are disabled on this browser, please enable them to open this website
Yet Another Minimax Problem
You are viewing a single comment's thread. Return to all comments →
my python 3 code but there is terminate due to timeout can anyone help me: