Given a string S and a string T, count the number of distinct subsequences of T in S.
A subsequence of a string is a new string which is formed from the original string by deleting some (can be non...
分类:
其他好文 时间:
2014-08-09 13:30:47
阅读次数:
211
//sql过滤关键字 public static bool CheckKeyWord(string sWord) { //过滤关键字 string StrKeyWord = @"select|insert|delete|from|count\(|drop tabl...
分类:
数据库 时间:
2014-08-09 13:10:17
阅读次数:
357
原文:https://www.technovelty.org//linux/bash-arithmetic-evaluation-and-errexit-trap.html
在 "traps for new players" 一章:
count=0
things="0 1 0 0 1"
for i in $things;
do
if [ $i == "1" ]; then
...
分类:
其他好文 时间:
2014-08-08 21:33:46
阅读次数:
258
/*
题意:
给出数组A,有以下几个操作:
1: AND(opn, L, R):把区间[L, R]中的元素A[i]改为A[i] & opn;;;;;;
2: OR(opn, L, R) :把区间[L, R]中的元素A[i]改为A[i] | opn;;;;;;;
3: XOR(opn, L, R):把区间[L, R]中的元素A[i]改为A[i] ^ opn;;;;;;;
4: SUM(L, R) ...
分类:
其他好文 时间:
2014-08-08 21:24:52
阅读次数:
305
1 #include 2 #include 3 4 int parallel_qsort(int * data , int start , int end, int p_count, int pid); 5 int quick_sort(int *data ,int start , int en.....
分类:
其他好文 时间:
2014-08-08 20:55:06
阅读次数:
239
测试MTU的时候用得到的, 命令如下: ping -f -l 9000 10.110.68.40 ping命令的帮助输出如下: C:\Users\administrator>ping /? Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL...
分类:
其他好文 时间:
2014-08-08 20:44:56
阅读次数:
240
题目:poj 2777 Count Color
题意:给出一段1 * n 的栅栏,有两种操作,第一种:把 l -- r 全部染成同一颜色t,第二种,查询 l---r 一共有多少种颜色。
分类:线段树
分析:我们可以给每个节点加一个标记,标记当前节点是否只有一种颜色,然后对只有一种颜色的节点如果要染色的话,那么他会变成几种颜色的,这时候记得向下更新一次就好,统计的时候统...
分类:
其他好文 时间:
2014-08-08 18:18:16
阅读次数:
161
public class Division { public static void main(String[] args){ int count = 1; for(int number = 100;number <= 1000;number++){ ...
分类:
其他好文 时间:
2014-08-08 17:51:46
阅读次数:
197
Weekend counterSofia has given you a schedule and two dates and told you she needs help planning her weekends. She has asked you to count each day of ...
分类:
其他好文 时间:
2014-08-08 17:36:46
阅读次数:
167
No limit to transaction count, so it is a recursive sum calculation. Take care of boundary condition.class Solution {public: int maxProfit(vector &...
分类:
其他好文 时间:
2014-08-08 15:58:06
阅读次数:
212