Fork me on GitHub

sys.setrecursionlimit(1<<64)

Line 3: OverflowError: Python int too large to convert to C long

max: 2**64-1, (1<<64) - 1

 

sys.setrecursionlimit(1<<31)

Line 3: OverflowError: signed integer is greater than maximum 

signed integer should be -1<<31 ~ (1<<31) - 1, -2**31 ~ 2**31

 

 

how to map list of list?

#not right
class
Solution: # @param {character[][]} matrix # @return {integer} def maximalRectangle(self, matrix): print matrix,range(len(matrix)), range(len(matrix[0])),matrix[0][0] a=[] for i in range(len(matrix)): tmp = [] for j in range(len(matrix[0])): tmp.append((i,j)) a.append(tmp) print a matrix = map(lambda x: int(matrix[x[0]][x[1]]), a)#range(len(matrix)), range(len(matrix[0]))) print matrix

 

posted on 2015-06-20 14:50  huashiyiqike  阅读(611)  评论(0编辑  收藏  举报