码迷,mamicode.com
首页 >  
搜索关键字:common substrings    ( 9647个结果
Codeforces Round #258 D Count Good Substrings --计数
题意:由a和b构成的字符串,如果压缩后变成回文串就是Good字符串。问一个字符串有几个长度为偶数和奇数的Good字串。分析:可知,因为只有a,b两个字母,所以压缩后肯定为..ababab..这种形式,所以是good substrings,那么首尾字符肯定相同,于是就好搞了。用:odd[0],odd[...
分类:其他好文   时间:2014-07-26 14:14:45    阅读次数:219
Codeforces 451D Count Good Substrings(组合数学)
题目链接:Codeforces 451D Count Good Substrings 题目大意:定义good string,就是就一个字符串的连续相同字符用一个该字符替代后,形成回文串的字符串。现在给出一个字符串,问说该字符串的子串中,为good string的串有多少个,分长度为奇数和偶数的输出。 解题思路:因为字符串的组成为a和b,所以只要是头尾相同的子串都是满足的。所以我们计算在...
分类:其他好文   时间:2014-07-26 03:03:36    阅读次数:268
DalEmployeeInfo
namespace Global.PM.Common.Data{ using Global.PM.Common.Entity.HR; using Global.Utils.ORM; using Global.Utils.ORM.Common; using Global.Uti...
分类:其他好文   时间:2014-07-26 00:57:06    阅读次数:356
dede修改templets模板文件夹后,出现“无法在这个位置找到: ”错误的解决办法
修改templets模板文件夹的方法:首先找到系统配置文件common.inc.php,此文件存放在Include目录下,打开common.inc.php来修改默认模板目录templets,查找:$cfg_templets_dir = $cfg_cmspath.'/templets';将上面的红色部...
分类:其他好文   时间:2014-07-26 00:41:16    阅读次数:207
Heap Sort (堆排序)
Heap sort is common in written exams.First of all, what is heap? Heap is a kind of data struct that can be seen as a complete binary tree. The objectt...
分类:其他好文   时间:2014-07-26 00:13:06    阅读次数:343
DBHelper (支持事务与数据库变更) z
using System;using System.Data;using System.Data.Common;using Project.BaseFramework;using System.Collections.Generic;using System.Configuration;namesp...
分类:数据库   时间:2014-07-25 14:13:31    阅读次数:365
codefroces451D - Count Good Substrings 数位DP
题意:给你n,m 问你n-m中有多少个数首位等于末位。解题思路:数位DP,从0-n有多少个,这样分开计算,首先把每一位所有可能都枚举出来,然后在一位一位的比对DP解题代码: 1 // File Name: 204a.cpp 2 // Author: darkdream 3 // Created Ti...
分类:其他好文   时间:2014-07-25 14:01:21    阅读次数:236
HDU 1019 Least Common Multiple 数学题解
求一组数据的最小公倍数。 先求公约数在求公倍数,利用公倍数,连续求所有数的公倍数就可以了。 #include int GCD(int a, int b) { return b? GCD(b, a%b) : a; } inline int LCM(int a, int b) { return a / GCD(a, b) * b; } int main() { int T, m, a,...
分类:其他好文   时间:2014-07-24 23:13:03    阅读次数:203
java程序执行SQL脚本文件
首先引入ibatis-common-2.jar包import com.ibatis.common.jdbc.ScriptRunner; import com.ibatis.common.resources.Resources;jpetstore测试代码如下:package com.ibatis.jp...
分类:数据库   时间:2014-07-24 22:58:14    阅读次数:307
psp开发------helloworld
1.创建helloworld.c #include #include PSP_MODULE_INFO("Hello World", 0, 1, 1); #define printf pspDebugScreenPrintf /* Exit callback */ int exit_callback(int arg1, int arg2, void *common) {...
分类:其他好文   时间:2014-07-24 17:45:46    阅读次数:253
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!