题意:上部分是单词表,下部分是句子,翻译句子.START开始,END结束. 思路:简单字典树. Ignatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian gives him a history book of Mars and a dictionary when it leaves. Now Ignatius want to…
Babelfish Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 36967 Accepted: 15749 Description You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have…
Chip Factory Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5536 Description John is a manager of a CPU chip factory, the factory produces lots of chips everyday. To manage large amounts of products, every proc…
kmp: const int maxn=1e5+5; char s[maxn],p[maxn]; int nex[maxn]; int KmpSearch(char* s, char* p) { int i = 0; int j = 0; int sLen = strlen(s); int pLen = strlen(p); while (i < sLen && j < pLen) { //①如果j = -1,或者当前字符匹配成功(即S[i] == P[j]),都令i++,j+…
2297: Carryon的字符串 Time Limit: C/C++ 1 s Java/Python 3 s Memory Limit: 128 MB Accepted: 11 Submit: 24 Submit My Status Problem Description Carryon最近喜欢上了一些奇奇怪怪的字符,字符都是英文小写字母,但奇怪的是a可能比b小,也可能比b大,好奇怪.与此同时,他拿到了好多的字符串,可是看着很不顺眼,因为他们很乱,所以他…
487-3279 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 309257 Accepted: 55224 Description Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable wor…