Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1="aabcc",s2="dbbca",Whens3="aadbbcbcac", return true.Whens3="...
分类:
其他好文 时间:
2014-12-23 17:03:49
阅读次数:
107
#include #include #include using namespace std;templateT mul(T a, P b) { return a * b;}templatestring mul(string a, int b) { string res; for ...
分类:
编程语言 时间:
2014-12-23 16:59:54
阅读次数:
189
//一个POJO例子class User {String name;String age;public User(String name,String age){this.name=name;this.age=age;}public String getAge() {return age;}publ...
分类:
编程语言 时间:
2014-12-23 16:50:28
阅读次数:
228
import java.io.*;
class Demo1
{
public static void main(String[] args)throws IOException
{
/*
PrintStream:打印流,具备字节输出流的基本功能,添加了打印功能
是一个可以向目的写入的输出流
目的:File
字符串形式的路径
...
分类:
编程语言 时间:
2014-12-23 15:36:01
阅读次数:
235
namespace ConsoleApplication1{ class A { int age=13; string name="南哥"; public override string ToString() { ...
分类:
其他好文 时间:
2014-12-23 15:13:44
阅读次数:
214
Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For example, the ...
分类:
其他好文 时间:
2014-12-23 15:05:53
阅读次数:
174
题目:给你一个长目标串str,和一些模式串,求每个串出现的次数。模式串有可覆盖和不可覆盖两种。
分析:字符串,多串匹配,AC自动机。由于数据有可能不允许相交,所以记录上一个的结束位置。
题目的数据比较猥琐,可能相同,采用一个 Fath域记录第一次出现的 id,计算一次就可以了。
说明:注意数据有相同的串;该题可以使用 RK算法+二分。
#include
#incl...
分类:
其他好文 时间:
2014-12-23 14:01:51
阅读次数:
210
字符串水题,旋转90度输出。注意字符串的长度和空格的处理。
code:
import java.util.*;
public class Main490 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
char[][] str = new char[105][105...
分类:
其他好文 时间:
2014-12-23 13:59:56
阅读次数:
165
operator is not a known binary operator swift 语法错误笔记
error: operator is not a known binary operator
for x in 1..10
版本更新,开区间 改为 “..
var arr = String[]()
array types are...
分类:
编程语言 时间:
2014-12-23 13:57:58
阅读次数:
432
写移动文件练习时候发现Directory.move只能在同一个盘符进行操作,于是度娘一下,还真有人也遇到这种情况,搜索一番发现一位仁兄写的一个跨盘符移动的demo很好分享一下,原文如下: 1 public void MoveDirectory(string strSourceDir, string ...
分类:
移动开发 时间:
2014-12-23 13:49:38
阅读次数:
164