Hi everyone. Today I will start a new series of esssays introducing the elementary knowledge of Perl, a computer language of which probably many of u....
分类:
其他好文 时间:
2015-01-21 19:49:19
阅读次数:
271
题意:
那个输入中每个串先是一个长度然后才是串。
然后如果某猫姓名abcd·efgh,那么点名abc,bcd,fg等都是好使的,但是cde就不行。
然后输入姓名时格式为一行
a a个数,b b个数。
A表示姓,B表示名。
题解:
直接暴力枚举每个点名是哪些的子串,
然后我们发现可以用后缀数组来优化这个事情~~
时间复杂度是不准确的,也就是说可以被卡成TLE...
分类:
编程语言 时间:
2015-01-21 09:00:22
阅读次数:
187
Valid NumberValidate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the ...
分类:
其他好文 时间:
2015-01-20 23:29:44
阅读次数:
329
【题目】
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without
repeating letters for "abcabcbb" is "abc", which the length is...
分类:
其他好文 时间:
2015-01-20 15:42:24
阅读次数:
132
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum window is "BAN...
这是迅雷的一道面试题,顺序打印ABC十次。
public class TenABC {
public static void main(String[] args) {
final BlockingQueue queue = new ArrayBlockingQueue(30);
for (int i = 0; i < 10; i++) {
try {
queu...
分类:
编程语言 时间:
2015-01-19 00:15:38
阅读次数:
379
D:\xampp\htdocs\project\TPDev\abc如果我想访问project/目录,地址栏:localhost/project是不是很麻烦?直接pj.com是不是更简单一点!直接进入操作步骤:前提:1、会安装xampp2、前两步是在关闭apache下进行的1、添加httpd-vhosts.conf虚拟主机文件打开文件,在最后添加一段话..
分类:
其他好文 时间:
2015-01-18 08:14:17
阅读次数:
163
ondition可以实现多路Condition,notify只能通知随机的一个
如:ABC三个线程分别去处理一件事物,规则是A处理完通知B ,B处理完通知C,C通知A;如果使用notrfy无法做法这一点,所以我们可以使用Condition来new出来ABC三个Condition对象,来特定指明哪个对象await哪个对象single;
如:先放鸡蛋、拿鸡蛋、吃鸡蛋
public class...
分类:
其他好文 时间:
2015-01-18 07:07:43
阅读次数:
275
在没有package语句的java类,我们可以直接使用:javac Test.java就可以了,如果Test.java中包含package语句,如:package abc;编译后,是要求Test.class文件放在abc目录下的所以这时候就又两种方法达到目的:1.笨方法,先直接编译Test.java...
分类:
编程语言 时间:
2015-01-17 22:04:09
阅读次数:
231