以前对于指针直接比较总是不放心,包括std::find用法总感觉不放心,后面发现这种用法是可以的 ...
分类:
其他好文 时间:
2016-10-07 23:26:59
阅读次数:
117
1146. Maximum Sum Time limit: 0.5 secondMemory limit: 64 MB Given a 2-dimensional array of positive and negative integers, find the sub-rectangle with ...
分类:
其他好文 时间:
2016-10-07 17:58:27
阅读次数:
170
<select id="selector"></select> 1、设置value为pxx的项选中 $("#selector").val("xxx"); 2、设置text为pxx的项选中 $("#selector").find("option[text='xxx']").attr("selected ...
分类:
Web程序 时间:
2016-10-07 17:31:28
阅读次数:
245
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng ...
分类:
其他好文 时间:
2016-10-07 15:43:12
阅读次数:
149
常用: grep -nr "关键字" 搜索当前目录下所有匹配关键字的文件 grep -nr "关键字" *php 搜索当前目录下所有匹配关键字的php文件 find -name '*.php'|xargs grep 'Hello!' 搜索当前目录下所有匹配关键字"Hello!"的php文件 替换文件 ...
分类:
系统相关 时间:
2016-10-07 13:34:40
阅读次数:
221
首先照着这篇文章操作 http://blog.csdn.net/Toshiya14/article/details/51417076 结果发现一直报Cannot find OpenSSL's libraries 并且装了libcurl4-openssl-dev也没用 后来参看 http://linu ...
分类:
数据库 时间:
2016-10-07 13:28:02
阅读次数:
330
传送门 Description Byteasar is addicted to the English letter 'q'. Now he comes across a string S consisting of lowercase English letters. He wants to fi ...
分类:
其他好文 时间:
2016-10-07 11:27:10
阅读次数:
151
传送门 Description Alex has two sequences a1,a2,...,an and b1,b2,...,bm. He wants find a longest common subsequence that consists of consecutive values i ...
分类:
其他好文 时间:
2016-10-07 11:25:11
阅读次数:
150
题解: 将其中一边sort,然后另一边使用rmq_min.对于p[i],只要rmq_min(1,i-1)>=p[i].se即可 但是这有一个问题。忽略了sort的那条边相等的情况 这里提供2种处理方式 1.在判断p[i]时,添加一个判断 2.注意到题目有:The number will be non ...
分类:
其他好文 时间:
2016-10-07 07:40:04
阅读次数:
135
Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This ...
分类:
其他好文 时间:
2016-10-07 01:14:31
阅读次数:
112