#create a tuple tuplex = (2, 4, 3, 5, 4, 6, 7, 8, 6, 1) #used tuple[start:stop] the start index is inclusive and the stop index _slice = tuplex[3:5] #... ...
分类:
编程语言 时间:
2018-11-13 00:04:28
阅读次数:
302
Jamie's Contact Groups Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others) 题目链接:http://poj.org/problem?id=2289 Descripti ...
分类:
其他好文 时间:
2018-11-12 22:18:57
阅读次数:
327
修改文件/目录的权限:chmod 规则 文件/目录名 规则: 角色:u 自己人 user g 同组人 group o 其他人 other a 所有人 all 操作: + - 权限 r w x 数字:644 755 举例:rwx rwx rwx 777 #chomod u+x 1.txt 针对自己增加 ...
分类:
系统相关 时间:
2018-11-12 17:27:21
阅读次数:
239
问题描述:m个旅行商去旅游 n个城市,规定都必须从同一个出发点出发,而且返回原出发点,需要将所有的城市遍历完毕,每个城市只能游历一次,但是为了路径最短可以路过这个城市多次。这个就是多旅行商问题。是在TSP问题的基础上进行了扩展。 问题解决方案: 明确M-TSP与TSP的区别在哪里? TSP指的是单个 ...
分类:
其他好文 时间:
2018-11-11 23:37:48
阅读次数:
347
Ackerman 递归算法 一 . 问题描述及分析 图1 二 . 代码实现 package other; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; public clas ...
分类:
其他好文 时间:
2018-11-11 15:03:43
阅读次数:
147
多个命令执行用分号 创建shell脚本文件 开头是 ? 新建的脚本文件记得赋予执行权限 ? 这里 u for user g for group o for other a for all , default is a ...
分类:
其他好文 时间:
2018-11-10 22:39:43
阅读次数:
145
Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in nums. If target exists, ...
分类:
其他好文 时间:
2018-11-10 10:53:38
阅读次数:
151
场景 某天我在本地修改了某个子项目的代码,并进行了打包: ,接着我运行父项目却发现自己刚刚的改动并没有生效,或者说,我刚刚打包好的子项目变回了打包前的代码。 通过cmd的输出我发现在运行父项目的时候,自动下载更新了远程依赖库的子项目,因此将我本地打包修改好的子项目依赖给更新成了远程库的,这就是为什么 ...
分类:
其他好文 时间:
2018-11-10 00:17:24
阅读次数:
343
这个题是给树的前序和中序,输出后序。 做法是根据前序找根,根据根在中序中找中序的左右子树,根据左右子树长度找前序的左右子树,依此递归。 做过之后感觉还是比较基础的,废话不多说,上题上代码。 Bob will get a bag as gift from Alice, but Alice don't ...
分类:
其他好文 时间:
2018-11-09 23:25:25
阅读次数:
369