Python中引用复制、分片复制、完整复制首先直接看例子:>>> l1=[1,2,3]
>>> l11 = l1
>>> l2=[4,5,l1]
>>> l2
[4, 5, [1, 2, 3]]
>>> l3 = l2[:]
>>> l3
[4, 5, [1, 2, 3]]
>>> import copy
>>> l4 = copy.deepcopy(l2)
>>> l4
[4, 5, [1, 2,...
分类:
编程语言 时间:
2015-06-01 18:49:26
阅读次数:
169
Problem Description
You are given two strings s1[0..l1], s2[0..l2] and Q - number of queries.
Your task is to answer next queries:
1) 1 a i c - you should set i-th character in a-th string to c...
分类:
其他好文 时间:
2015-05-31 12:30:58
阅读次数:
131
一数据库初识lSQL是StructuredQueryLanguage(结构化查询语言)的缩写。lSQL是专为数据库而建立的操作命令集,是一种功能齐全的数据库语言。在使用它时,只需要发出“做什么”的命令,“怎么做”是不用使用者考虑的。二数据库的组成l1.一个SQL数据库是表(Table)的集合,它由一...
分类:
数据库 时间:
2015-05-30 09:14:55
阅读次数:
269
L1,L2正则都可以看成是 条件限制,即 $\Vert w\Vert \leq c$ $\Vert w\Vert^2 \leq c$当w为2维向量时,可以看到,它们限定的取值范围如下图:所以它们对模型的限定不同而对于一般问题来说,L1 正则往往取到正方形的顶点,即会有很多分量为0,具有稀疏性,有.....
分类:
其他好文 时间:
2015-05-29 13:35:44
阅读次数:
287
Reorder List
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,...
分类:
其他好文 时间:
2015-05-28 23:16:08
阅读次数:
198
一:磁盘分区二:文件系统三:修改文件系统属性1.1查看当前系统识别了几块硬盘[root@localhost/]#fdisk-l1.2创建新分区1.3使用partx来让内核重读分区表,增加分区[root@localhost/]#partx-v-a/dev/sda1.4重读分区表,删除分区[root@localhost/]#partx-v-d/dev/sda2.1查看当前内..
分类:
其他好文 时间:
2015-05-27 01:12:06
阅读次数:
146
根据某市地铁线路图写一个地铁票价计算程序需求描述:1.计费规则:最低2元,超过5站以上每站加收0.5元,换乘重新起算,例如L1先坐4站,换乘L2再坐6站,结果就是2+2.5=5.5元2.程序启动以后读取输入文件(in.txt),内容格式如:L2-8,L2-2X3,L3-8....每行表示一次行程,起...
分类:
其他好文 时间:
2015-05-26 00:07:54
阅读次数:
273
Frogs' NeighborhoodTime Limit:5000MSMemory Limit:10000KTotal Submissions:8215Accepted:3491Special JudgeDescription未名湖附近共有N个大小湖泊L1,L2, ...,Ln(其中包括未名湖),...
分类:
其他好文 时间:
2015-05-25 17:57:55
阅读次数:
103
http://blog.163.com/l1_jun/blog/static/14386388201441344612/http://blog.chinaunix.net/uid-25073805-id-2984335.htmlhttp://jingyan.baidu.com/article/948...
分类:
其他好文 时间:
2015-05-24 17:03:12
阅读次数:
152
public class Solution { public ListNode addTwoNumbers(ListNode l1, ListNode l2) { ListNode ret = new ListNode(0); ListNode cur = ret; ...
分类:
其他好文 时间:
2015-05-24 14:11:28
阅读次数:
110