Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5400    Accepted Submission(s): 1704 Problem Description Liyuan lives in a old apartment. One day, he suddenly found that there was a wireless ne…
Wireless Password Time Limit: 1000MS   Memory Limit: 32768KB   64bit IO Format: %I64d & %I64u Description Liyuan lives in a old apartment. One day, he suddenly found that there was a wireless network in the building. Liyuan did not know the password…
题目链接:https://vjudge.net/problem/HDU-2825 Wireless Password Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7733    Accepted Submission(s): 2509 Problem Description Liyuan lives in a old apartmen…
题目大意:给一系列字符串,用小写字母构造出长度为n的至少包含k个字符串的字符串,求能构造出的个数. 题目分析:在AC自动机上走n步,至少经过k个单词节点,求有多少种走法. 代码如下: # include<iostream> # include<cstdio> # include<queue> # include<cstring> # include<algorithm> using namespace std; typedef long long…
题目链接 Problem Description Dr. X is a biologist, who likes rabbits very much and can do everything for them. 2012 is coming, and Dr. X wants to take some rabbits to Noah's Ark, or there are no rabbits any more. A rabbit's genes can be expressed as a st…
题目链接:hdu_2825_Wireless Password 题意: 给你m个串,问长度为n至少含k个串的字符串有多少个 题解: 设dp[i][j][k]表示考虑到长度为i,第j个自动机的节点,含有k这个压缩状态的方案数,然后DP下去就行了 #include<bits/stdc++.h> #define F(i,a,b) for(int i=a;i<=b;i++) using namespace std; ; *,tyn=;//数量乘串长,类型数 struct AC_automatio…
题目链接 做题, #include <cstdio> #include <string> #include <cstring> using namespace std; #define MOD 20090717 ][]; ]; ]; ]; ][][]; ]; int t; void CL() { memset(trie,-,sizeof(trie)); memset(dp,,sizeof(dp)); memset(o,,sizeof(o)); t = ; } void…
Description Liyuan lives in a old apartment. One day, he suddenly found that there was a wireless network in the building. Liyuan did not know the password of the network, but he got some important information from his neighbor. He knew the password…
Wireless Password Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5640    Accepted Submission(s): 1785 Problem Description Liyuan lives in a old apartment. One day, he suddenly found that there…
pid=2825">http://acm.hdu.edu.cn/showproblem.php? pid=2825 Wireless Password Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4560    Accepted Submission(s): 1381 Problem Description Liyuan li…