int count[256];void count_sort(char str[]){ int length=strlen(str); char *result=new char[length+1]; for(int i=0;i<length;++i){ count[...
分类:
编程语言 时间:
2015-09-12 16:11:51
阅读次数:
207
Distinct SubsequencesGiven a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is...
分类:
其他好文 时间:
2015-09-12 12:15:57
阅读次数:
134
意甲冠军:鉴于n节点,满足子节点的相同的树节点号的同一层较少不同的形式。思考:dp[i][j] 代表i节点。最后,一个层j方法节点由于满足同层节点,所以j一层又一层必须是j 整数倍所以就能得到兴许的状态代码:#include"cstdlib"#include"cstdio"#include"cstr...
分类:
其他好文 时间:
2015-09-11 19:17:21
阅读次数:
152
存储过程创建语法: create or replace procedure 存储过程名(param1 in type,param2 out type)as变量1 类型(值范围);变量2 类型(值范围);Begin Select count(*) into 变量1 from 表A where列名=pa...
分类:
数据库 时间:
2015-09-11 16:06:51
阅读次数:
197
# dd if=/dev/zero of=/tmp/myswap bs=1M count=4096# mkswap /tmp/myswap# swapon /tmp/myswap# vim /etc/fstab/tmp/myswap swap swap defaults 0 0 (开机时启动此swa...
分类:
其他好文 时间:
2015-09-11 14:21:34
阅读次数:
135
题意:多个模式串和多个待匹配串,求每个待匹配串对于所有模式串的匹配个数;思路:1、与最裸的ac自动机的区别在于讯问后的叶子节点的count值会改变,在每次询问时count值不要清零; 2、对于多个串的保存直接用二维数组;#include#include#include#include#incl...
分类:
其他好文 时间:
2015-09-10 21:16:11
阅读次数:
259
MySQL中select的基本语法形式:select 属性列表from 表名和视图列表[where 条件表达式][group by 属性名[having 条件表达式]][order by 属性名[asc|desc]][limit ,row count]说明:where子句:按照“条件表达式”指定的条...
分类:
数据库 时间:
2015-09-10 21:01:54
阅读次数:
245
1452: [JSOI2009]CountTime Limit: 1 Sec Memory Limit: 256 MB题目连接http://www.lydsy.com/JudgeOnline/problem.php?id=1452DescriptionInputOutputSample InputS...
分类:
编程语言 时间:
2015-09-10 19:13:25
阅读次数:
258
--数据库的使用过程中由于程序方面的问题有时候会碰到重复数据,重复数据导致了数据库部分设置不能正确设置……方法一declare@maxinteger,@idintegerdeclarecur_rowscursorlocalforselect主字段,count(*)from表名groupby主字段havingcount(*)>1opencur_rowsfetchcur_rowsint..
分类:
数据库 时间:
2015-09-10 17:51:34
阅读次数:
156
#include<stdio.h>#include<stdlib.h>//实现strlenintmy_strlen1(charstr[])//数组{intcount=0;inti=0;while(str[i]!=‘\0‘){count++;i++;}returncount;}intmy_strlen2(char*str)//指针{inti=0;while(*str){i++;str++;}returni;}intmy_strlen3(char*str)//递归{inti..
分类:
其他好文 时间:
2015-09-10 17:48:20
阅读次数:
126