题目大意:给出一个不能出现的字符串,问长度为k的字符串有多少种。
思路:用给定串建立一个AC自动机(或者KMP随便了),然后跑矩阵乘法就行了。
CODE:
#include
#include
#include
#include
#include
using namespace std;
int k,length,p;
char s[MAX];
int so...
分类:
其他好文 时间:
2015-02-09 09:26:32
阅读次数:
198
1.液晶(Liquid Crystal)是一种高分子材料。液晶显示器(Liquid Crystal Display)的主要原理是以电流刺激液晶分子产生点,线,面并配合背光构成画面。各种型号的液晶通常是按照显示字符的行数或液晶点阵的行,列数来命名的。如1602的意思是每行显示16个字符,可以显示两行,这类LCD通常都是字符型液晶,即只显示ASCII字符,如数字,大小写字母,各种符号等。12864是图...
分类:
其他好文 时间:
2015-02-09 09:26:05
阅读次数:
207
题意:看着样例说吧 先给你n,m。接着是n行数据,然后要求你把这n行数据分成m份(同一份数据必须是挨着的),使的各份的和尽量小,输出值最大的那一份。
分析:单纯模拟会超时 我用的二分,左边界假设m==n,则ans为所输入数据中最大的那一个。右边界假设m==1,则ans为所输入数据的和。然后不断二分直到两边界重合。
代码:
#include
#include
#include
#in...
分类:
其他好文 时间:
2015-02-09 09:26:46
阅读次数:
158
acl(one advanced C/C++ library) 是一个跨平台的网络通信与服务器开发开源框架,至今已经被很多大公司所使用,使开发者在享受C/C++的高性能的同时,可以使用 acl 框架提高开发效率与系统的稳定性。该框架不仅提供了丰富的服务器模式(多进程模式、多线程模式、非阻塞模式、UDP模式、触发器模式),同时还提供了丰富 的常见应用协议库(http/ping/smtp/memcache/redis/beanstalk/handler socket, etc) 以及丰富的编码库(base64/...
分类:
其他好文 时间:
2015-02-09 09:25:50
阅读次数:
166
1、编译
2、静态分析器检查
3、代码评审
4、动态测试
驱动模块(driver)
桩模块(stub)
摘自:《软件工程教学视频21讲》(上海交通大学,郭斌老师)。...
分类:
其他好文 时间:
2015-02-09 09:25:13
阅读次数:
138
题目:UVA-10970-Big Chocolate水题。思路:先n-1刀切成m*1的条再切。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 int .....
分类:
其他好文 时间:
2015-02-09 09:24:45
阅读次数:
103
这个周末的娱乐,通用模块,让后端自检,严格客户端按照文档的要求来,妈妈再也不担心我加班了,对某些团队来说,可能根本用不着,本是想到就尝试一把而已。check-docking.https://pypi.python.org/pypi/check-docking/check-docking is a.....
分类:
其他好文 时间:
2015-02-09 09:23:36
阅读次数:
105
利用Opencv在PictureControl中显示IplImage格式的照片。bool MyDlg::IfExistFile(CString strFilePath){ CFile file; if (file.Open(strFilePath,CFile::modeRead)) ...
分类:
其他好文 时间:
2015-02-09 09:22:09
阅读次数:
191
cPanel interfaces can include HTML,Template Toolkit, PHP, or CGI files.Store plugin interface files in the/usr/local/cpanel/base/frontend/theme/direct...
分类:
其他好文 时间:
2015-02-09 09:22:02
阅读次数:
134
(1) 先看一个实例:#include ; #include ; main () { pid_t pid; pid=fork(); if (pid #include pid_t fork(void);正确返回:在父进程中返回子进程的进程号,在子进程中返回0。功能:子进程是父进程的一个拷贝。即,...
分类:
其他好文 时间:
2015-02-09 09:21:31
阅读次数:
137
查询记录时rs.previous()的使用 ...
分类:
其他好文 时间:
2015-02-09 09:24:01
阅读次数:
156
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:
其他好文 时间:
2015-02-09 09:23:32
阅读次数:
176
近几年,连锁药店得到了迅速扩张,由于药品种类过于繁杂、客户分散票据过多,急剧扩张之后的连锁药店企业在信息流处理上遇到了各种各样的问题 到现在已经有3000多家连锁药房,需要采购的正规药品就有数万个品种,如何将繁杂的药品种类和大量营业单据进行规范整理,及时了解各商品的库存情况,并以直观的信息化平台方....
分类:
其他好文 时间:
2015-02-09 09:21:33
阅读次数:
195
Typical rolling-hash solution. That is, Boyer-Moore algorithm variation.class Solution {public: inline int encode(char c) { switch (c) ...
分类:
其他好文 时间:
2015-02-09 09:19:39
阅读次数:
142
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
其他好文 时间:
2015-02-09 09:19:08
阅读次数:
124
本学习主要参考Andrew Troelsen的C#与.NET4高级程序设计,这小节主要述说以下几个东西:1、构建支持任意数量的构造函数的定义明确的类类型。2、类和分配对象的基本知识3、封装的作用4、定义类属性以及静态成员、对象初始化语法、只读字段、常亮和分部类的作用C#类类型.net平台最基本的编程...
分类:
其他好文 时间:
2015-02-09 09:21:17
阅读次数:
232
Rails连接远程mongo数据库报错:"Could not connect to a primary node for replica set #]>"配置文件内容如下:development: sessions: default: database: spider h...
分类:
其他好文 时间:
2015-02-09 09:18:25
阅读次数:
189