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[])),matrix[][]
a=[]
for i in range(len(matrix)):
tmp = []
for j in range(len(matrix[])):
tmp.append((i,j))
a.append(tmp)
print a
matrix = map(lambda x: int(matrix[x[]][x[]]), a)#range(len(matrix)), range(len(matrix[])))
print matrix

Python strange questions list的更多相关文章

  1. python interview questions

    referce:python interview questions top 50 refercence:python interview questions top 15 summary Q: wh ...

  2. [译]Python面试中8个必考问题

    1.下面这段代码的输出结果是什么?请解释. def extendList(val, list=[]): list.append(val) return list list1 = extendList( ...

  3. 【转】Comprehensive learning path – Data Science in Python

    Journey from a Python noob to a Kaggler on Python So, you want to become a data scientist or may be ...

  4. python进阶资源

    本文为不同阶段的Python学习者从不同角度量身定制了49个学习资源. 初学者 Welcome to Python.org https://www.python.org/ 官方Python站点提供了一 ...

  5. R8:Learning paths for Data Science[continuous updating…]

    Comprehensive learning path – Data Science in Python Journey from a Python noob to a Kaggler on Pyth ...

  6. data cleaning

    Cleaning data in Python   Table of Contents Set up environments Data analysis packages in Python Cle ...

  7. 40 Questions to test your skill in Python for Data Science

    Comes from: https://www.analyticsvidhya.com/blog/2017/05/questions-python-for-data-science/ Python i ...

  8. Some Interview Questions About Python

    一大波超链接即将袭来 Django认证流程 Python实现阶乘 Python文件处理 Python统计日志文件IP出现次数 JSON数据解析 JSON数据解析2 买卖股票的最佳时期 读取一个大文件比 ...

  9. 笨办法学Python - 习题11-12: Asking Questions & Prompting People

    目录 1.习题 11: 提问 2.习题 12: 提示别人 3.总结 1.习题 11: 提问 学习目标:了解人机交互场景,熟悉raw_input 的用法. 1.在 Python2.x 中 raw_inp ...

随机推荐

  1. Ubuntu配置git

    安装ssh sudo apt-get install openssh-server sudo apt-get install openssh-client 启动SSH服务 sudo /etc/init ...

  2. Hash哈希(一)

    Hash哈希(一) 哈希是大家比较常见一个词语,在编程中也经常用到,但是大多数人都是知其然而不知其所以然,再加上这几天想写一个一致性哈希算法,突然想想对哈希也不是很清楚,所以,抽点时间总结下Hash知 ...

  3. [WinAPI] API 2 [MessageBox API][消息框API]

    /* 调用消息框 MessageBox API [peoject->set->link->project chose->subsystem:windows] */ #inclu ...

  4. [Java Web] 1、Web开发初识——一大堆历史和技术名词

    LZ前言 LZ最近发现网络真是个神奇的东西,以前做的好玩的只能自娱自乐(或者说顾影自怜),现在只要发一个帖子,写一个博客,很快能引来一大群小伙伴的围观(有时候还能遇见几个大牛给个战略性的指导)...L ...

  5. C语言实现二叉树-04版

    二叉树,通常应当是研究其他一些复杂的数据结构的基础.因此,通常我们应该精通它,而不是了解:当然,可能并不是每个人都认同这种观点,甚至有些人认为理解数据结构就行了!根本没有必要去研究如何实现,因为大多数 ...

  6. Windows环境下32位汇编语言程序设计(典藏版)

    Windows环境下32位汇编语言程序设计(典藏版)(含CD光盘1张)(年,经典再现!) 罗云彬 著 ISBN 978-7-121-20759-4 2013年7月出版 定价:99.00元 756页 1 ...

  7. jQuery/javascript实现简单网页计算器

    <html> <head> <meta charset="utf-8"> <title>jQuery实现</title> ...

  8. 使用vs自带的性能诊断工具

    visual studio是个强大的集成开发环境,内置了程序性能诊断工具.下面通过两段代码进行介绍. static void Main( string[] args) { Test1(); Test2 ...

  9. linux 解压命令

    .tar 解包:tar xvf FileName.tar打包:tar cvf FileName.tar DirName(注:tar是打包,不是压缩!) ------------------------ ...

  10. Android项目实战--手机卫士开发系列教程

    <ignore_js_op> banner131010.jpg (71.4 KB, 下载次数: 0) 下载附件  保存到相册 2 分钟前 上传   Android项目实战--手机卫士01- ...