題目 : Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last ...
分类:
编程语言 时间:
2019-02-23 01:01:37
阅读次数:
171
准备 准备两台机器,IP地址信息如下: 为了测试需要,分别在两台机器上安装apache并启动httpd服务,使下面两个url均可访问: http://192.168.56.103 http://192.168.56.104 安装keepalived 在两台机器上分别安装keepalived 配置ke ...
分类:
其他好文 时间:
2019-02-22 21:23:46
阅读次数:
139
1基础数据类型 数字: int 1,2,3 + - * / %(取余) PS:查看数据类型print(type(1)) 字符串转化成数字:int(str) 条件:str必须是数字组成 数字转换字符串:str(int) 字符串: str Python凡是用引号引起来的都是字符串. 字符串可以相加(拼接 ...
分类:
编程语言 时间:
2019-02-22 12:02:20
阅读次数:
179
一、使用内置函数 28ms,12.4M 28ms,12.5M Python性能优化的20条建议 Python性能优化的20条建议 Python性能优化的20条建议 Python性能优化的20条建议 优化算法时间复杂度 算法的时间复杂度对程序的执行效率影响最大,在Python中可以通过选择合适的数据结 ...
分类:
其他好文 时间:
2019-02-22 10:42:48
阅读次数:
165
Palindrome subsequence HDU - 4632 In mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some elements with ...
分类:
其他好文 时间:
2019-02-21 00:27:52
阅读次数:
188
We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wron ...
分类:
其他好文 时间:
2019-02-17 23:30:23
阅读次数:
147
题意:N个格子排出一排,开始格子颜色都是1;现在有M个操作: 或,把区间[L,R]颜色改为c; 或,查询一共有多少格子颜色为c。 最后求颜色最多的数量。 数据是随机的,且强制在线。 思路:ODT裸题。维护相同颜色的区间。 split拆分区间,assign操作收缩区间,由于数据随机,区间的个数趋近于l ...
分类:
其他好文 时间:
2019-02-17 20:28:45
阅读次数:
177
在MySQL中,可以通过lower_case_table_names参数来设置是否区分表名大小写问题,参数有效取值为:0,1,2:0表示,表在文件系统存储的时候,对应的文件名是按建表时指定的大小写存的,MySQL 内部对表名的比较也是区分大小写的;1表示,表在文件系统存储的时候,对应的文件名都小写的 ...
分类:
数据库 时间:
2019-02-17 13:02:28
阅读次数:
150
考虑按顺序暴搜子序列。如果序列中的数两两不同,显然每次给上一个找到的子序列添上后缀最小值,即为下一个要找的子序列。如果不能再加了就回溯继续考虑后缀次小、第三小……值,直到找到k个子序列。 有重复的数后,考虑后缀k小值只取第一次出现的位置,并在每找到一个子序列后就统计其出现次数。显然这样就能找到所有要 ...
分类:
其他好文 时间:
2019-02-14 20:36:30
阅读次数:
168
将前两组求和n^2sort,后两个组枚举二分(upper lower)每个数字的相反数,求和 include include include include include include include include include include include include include ...
分类:
其他好文 时间:
2019-02-14 20:24:56
阅读次数:
192