2014年7月25日

python 中初始化二维数组的方法

摘要: 最好的方法是:初始化4*3的二维数组a = [[0 for col in xrange(3)] for row in xrange(4)]而不可以用:a = [[0]*3]*4[0]*3是生成一个一维数组,再*4只是会复制出三个引用,当修改a[0][0]时,其他的三个引用的值也会发生改变,故这种方法... 阅读全文

posted @ 2014-07-25 23:52 Stomach_ache 阅读(653) 评论(0) 推荐(0) 编辑

Codeforces 451D

摘要: 题目链接D. Count Good Substringstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe call a stringgood... 阅读全文

posted @ 2014-07-25 23:41 Stomach_ache 阅读(268) 评论(0) 推荐(0) 编辑

导航