摘要: temp = "".join(sorted(arr[i])) arr[i] = temp 阅读全文
posted @ 2018-10-10 15:18 夜歌乘年少 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 2019年1月10日15:39:23 去掉了所有不必要的循环区间 还是超时 本地运行大概3s 注意 anagrammatic 是拼字游戏的意思,任意调换顺序可以组成对方都成立,不是简单的回文数字。 1.第一种解法想省些时间 结果都比测试集少了20多个 应该是有些规则题目没有描述清楚。 5ifailu 阅读全文
posted @ 2018-10-10 15:17 夜歌乘年少 阅读(603) 评论(0) 推荐(0) 编辑
摘要: string[::-1] 阅读全文
posted @ 2018-10-10 10:39 夜歌乘年少 阅读(140) 评论(0) 推荐(0) 编辑
摘要: https://www.hackerrank.com/challenges/two-strings/problem?h_l=interview&playlist_slugs%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D=dictionari 阅读全文
posted @ 2018-10-09 18:07 夜歌乘年少 阅读(126) 评论(1) 推荐(0) 编辑
摘要: 1 题目重点:whole words | case-sensitive 阅读全文
posted @ 2018-10-09 17:20 夜歌乘年少 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 第一版有7个时间超限,优化成了第二版: 1: 2: 阅读全文
posted @ 2018-10-09 15:28 夜歌乘年少 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 源代码超时 看了评论区改用了字典序列。 阅读全文
posted @ 2018-10-09 11:05 夜歌乘年少 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 1.没有考虑i+2越界的问题 2.没有考虑结尾三个零导致 -5 3.没有考虑len(c)<2 导致 -5 阅读全文
posted @ 2018-09-30 17:59 夜歌乘年少 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 把字符串数字化之后应该从 i>0开始判断而不是 i>1 因此错了4个testcases。 阅读全文
posted @ 2018-09-30 16:07 夜歌乘年少 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 列表循环式:[x * x for x in range(1, 11)] 生成器:(x * x for x in range(1, 11))后者返回一个对象: >>> L = [x*x for x in range(10)] >>> L [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] >>> g = (x*x for x in range(10)) >>> g at... 阅读全文
posted @ 2018-09-27 16:02 夜歌乘年少 阅读(282) 评论(1) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-09-27 10:01 夜歌乘年少 阅读(1) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-09-27 09:47 夜歌乘年少 阅读(1) 评论(5) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-09-26 17:59 夜歌乘年少 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 轻量化 抢占式 节约切换成本 阅读全文
posted @ 2018-09-26 17:55 夜歌乘年少 阅读(667) 评论(0) 推荐(0) 编辑
摘要: 变量 作用域 全局变量( external linkage ) 定义在函数外 Int a=1 作用于整个工程 在连接两个文件时若有两个a会报错 Staic 函数外(internal linkage) 作用于本文件内 Static 函数内 作用于函数内 但在多次调用值不会丢失 extern:类似imp 阅读全文
posted @ 2018-09-26 17:54 夜歌乘年少 阅读(247) 评论(0) 推荐(0) 编辑
摘要: MIT 6.828 JOS 操作系统实验 阅读全文
posted @ 2018-09-13 17:12 夜歌乘年少 阅读(161) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-08-23 20:23 夜歌乘年少 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 重启 阅读全文
posted @ 2018-08-21 11:41 夜歌乘年少 阅读(1768) 评论(0) 推荐(0) 编辑
摘要: for Windows : for Linux : 阅读全文
posted @ 2018-08-09 10:13 夜歌乘年少 阅读(5281) 评论(0) 推荐(0) 编辑
摘要: 修改服务器中/etc/ssh/sshd.config 文件,将LoginGraceTime的值设为0,默认为2m,TCPKeepAlive 设为yes, 然后使用service sshd restart来重启sshd服务,这样就可以了。 补充: 在sshd_config中有LoginGraceTim 阅读全文
posted @ 2018-08-08 00:19 夜歌乘年少 阅读(30783) 评论(0) 推荐(1) 编辑
摘要: http://www.voidcn.com/article/p-kjolxwrh-yd.html cat jordan_shoes.tar.gz.a* |tar zxv 解释: 用cat来读所有的压缩包,利用tar来进行解压。 阅读全文
posted @ 2018-08-04 16:22 夜歌乘年少 阅读(498) 评论(0) 推荐(0) 编辑
摘要: 修改debian9 stretch源 修改配置文件/etc/apt/sources.list 修改成163源: 1 2 3 4 5 6 7 8 修改成清华源: 1 2 3 4 5 6 7 8 修改成科大源: 阅读全文
posted @ 2018-08-03 11:42 夜歌乘年少 阅读(326) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/jiangjiang_jian/article/details/79453856 [s[i:i + x + 1] for x in range(len(s)) for i in range(len(s) - x)] [s[i:i + x + 1] for 阅读全文
posted @ 2018-08-02 14:44 夜歌乘年少 阅读(4325) 评论(2) 推荐(0) 编辑
摘要: https://blog.csdn.net/wchoclate/article/details/42297173 round(float,N-digit) 阅读全文
posted @ 2018-08-01 14:10 夜歌乘年少 阅读(344) 评论(2) 推荐(0) 编辑
摘要: TCP: nmap -sC -sS -sV -p 1-65535 -A -v -v -oX filename.xml -Pn ip 类似: nmap -sS -A -sV -vv -sC -PN -p1-65535 -S 51.196.200.5 -oX nmap -sS -A -sV -vv -s 阅读全文
posted @ 2018-07-18 16:43 夜歌乘年少 阅读(710) 评论(0) 推荐(0) 编辑
摘要: https://zh.wikipedia.org/wiki/%E7%94%9F%E6%97%A5%E5%95%8F%E9%A1%8C 365的空间中找到f(x)的值 有99.9%的把握在70次尝试中找到一样的fx 对hash算法的强度评估应主要关注长度。 生日攻击,一般是指对hash的攻击。hash 阅读全文
posted @ 2018-03-15 17:18 夜歌乘年少 阅读(623) 评论(0) 推荐(0) 编辑
摘要: 1 正确 2.错误 阅读全文
posted @ 2018-02-26 16:44 夜歌乘年少 阅读(241) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-12-21 19:55 夜歌乘年少 阅读(0) 评论(0) 推荐(0) 编辑
摘要: https://my.oschina.net/u/2367514/blog/668434 阅读全文
posted @ 2017-11-21 17:47 夜歌乘年少 阅读(388) 评论(0) 推荐(0) 编辑
摘要: http://blog.sina.com.cn/s/blog_5252f6ca0102uy47.html 阅读全文
posted @ 2017-11-21 16:09 夜歌乘年少 阅读(360) 评论(0) 推荐(0) 编辑
摘要: http://www.infoq.com/cn/articles/recommendation-algorithm-overview-part02 阅读全文
posted @ 2017-11-20 16:13 夜歌乘年少 阅读(125) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/jlei_apple/article/details/8168856 阅读全文
posted @ 2017-10-09 20:11 夜歌乘年少 阅读(122) 评论(0) 推荐(0) 编辑
摘要: http://www.infoq.com/cn/articles/spark-core-rdd/ 阅读全文
posted @ 2017-10-09 19:57 夜歌乘年少 阅读(143) 评论(1) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-07-04 17:54 夜歌乘年少 阅读(2) 评论(0) 推荐(0) 编辑
摘要: http://www.jianshu.com/p/463f229c0a20 阅读全文
posted @ 2017-06-20 00:33 夜歌乘年少 阅读(122) 评论(0) 推荐(0) 编辑
摘要: iostat -d -k 1 10 每秒刷新一次,共10次。 未完待续。。 阅读全文
posted @ 2017-05-29 21:26 夜歌乘年少 阅读(6577) 评论(0) 推荐(0) 编辑
摘要: lspci -vnn|grep VGA -A 12 查看openGL信息: sudo apt install mesa-utils glxinfo|grep OpenGL -A 12 阅读全文
posted @ 2017-05-29 17:49 夜歌乘年少 阅读(5101) 评论(0) 推荐(0) 编辑
摘要: apt-get remove xfce4 apt-get remove xfce4* apt-get autoremove apt-get autoclean apt-get clean 更新软件 apt-get update update softwarelist apt-get upgrade 阅读全文
posted @ 2017-05-29 17:30 夜歌乘年少 阅读(2030) 评论(0) 推荐(0) 编辑
摘要: 1.禁用CMD win+Q gpedit 打开组策略 用户配置--管理模板--系统--阻止访问命令提示符--已启用。 2.启用PowerShell PS:需要使用CMD时可用powershell代替: win+Q powershell 阅读全文
posted @ 2017-05-28 18:10 夜歌乘年少 阅读(10798) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-03-06 14:28 夜歌乘年少 阅读(2) 评论(0) 推荐(0) 编辑