码迷,mamicode.com
首页 >  
搜索关键字:usaco 题解    ( 32152个结果
Milk Patterns
poj3261:http://poj.org/problem?id=3261题意:题解: 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn=20010; 6 char str[maxn]; 7 int w...
分类:其他好文   时间:2014-08-12 21:41:34    阅读次数:244
Musical Theme
poj1743:http://poj.org/problem?id=1743题意:题解: 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn=20010; 6 char str[maxn]; ...
分类:其他好文   时间:2014-08-12 21:37:44    阅读次数:259
Long Long Message
poj2774:http://poj.org/problem?id=2774题意:题解: 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn=220010; 6 char str[maxn]; ...
分类:其他好文   时间:2014-08-12 21:32:44    阅读次数:267
HDU 2594 Simpsons’ Hidden Talents KMP题解
KMP的应用。直接使用s1产生next 数组,然后在s2中搜索s1,那么记录最后一个搜索到的数值,就是s1的前缀在s2中的最长后缀了。 本题应该不能直接调用strstr了吧。 #include #include #include #include #include #include #include #include #include #include #include ...
分类:其他好文   时间:2014-08-12 19:09:14    阅读次数:192
Life Forms
poj3294:http://poj.org/problem?id=3294题意:就是求n个串的中一个最大的子串,这个子串在超过n/2的串中出现。题解:这是一道好题。首先一种解法就是用后缀数组来搞,首先把n个串拼接起来,然后,每个串后面加上一个特殊的额字符,然后求后缀数组以及h数组,然后一个很经典的...
分类:其他好文   时间:2014-08-12 18:40:44    阅读次数:206
oracle账户锁定解决方法
今天进使用orcle中,发现系统中,system账户登录里提示账户被锁定 ,后来查了查资料,问题解决,方法如下: Microsoft Windows [版本 5.2.3790] (C) 版权所有 1985-2003 Microsoft Corp. C:Documents and SettingsA....
分类:数据库   时间:2014-08-12 18:36:44    阅读次数:292
MFC常见问题解惑[转]
MFC类的分类1Root: CObject : CObject2Application Architecture Classes:CWinApp/CFrameWnd/...3Window, Dialog, and Control Classes:CWnd/CDialog/...4Drawing an...
分类:其他好文   时间:2014-08-12 18:05:54    阅读次数:223
Win系统问题解决
1. win系统忘记密码后如何登陆的问题: ? ?方法一,可以切换成administrator用户在登录(一般默认密码是空的) ? ?方法二,可以通过命令修改或者创建新的用户密码;? ? ?http://wenku.baidu.com/link?url...
分类:Windows程序   时间:2014-08-12 17:47:24    阅读次数:274
POJ 2752 Seek the Name, Seek the Fame KMP题解
本题是KMP的next数组的灵活运用。 具体就是看最后整个数列的最后一个字母,能有多少前缀。 理解了next数组就很容易了。 #include #include #include using std::vector; const int MAX_N = 400001; char name[MAX_N]; int next[MAX_N], len; void genNext() { ...
分类:其他好文   时间:2014-08-12 17:16:54    阅读次数:237
HDU 2087 剪花布条 KMP题解
KMP的应用,不过查找的时候注意一点就够了:查找到一个子串的时候,直接跳过整个串,而不是使用next数组前跳,因为根据题意需要剪出小饰条,小饰条之间不能重叠。 const int MAX_N = 1001; char txt[MAX_N], pat[MAX_N]; int next[MAX_N], len; void genNext() { for (int i = 1, j = 0...
分类:其他好文   时间:2014-08-12 17:11:34    阅读次数:197
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!