摘要:
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=1075大意:有外星人来了,但是我不懂外星文。然后我有一本字典,然我去翻译,字典由start开始有end结束的相当于map转换,然后是由由start开始有end结束的需要翻译的句子。代码#include <stdio.h>#include <string.h>#include <stdlib.h>#include <ctype.h>typedef struct node{ int flag; char ans[55]; struct node *next 阅读全文
摘要:
这道题我用得静态树,发现静态树不如动态树啊,虽然时间快点,但是空间要求的也太离谱了~题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=1247大意:让你输入几个单词,然后看看这有几个是可以有其他的任意两个单词或者一个单词两次,连接组成的,把他们输出就可以了代码View Code 1 #include <iostream> 2 #include <cstring> 3 #include <cstdio> 4 const int N=26; 5 const int maxn=1000000; 6 char s[5000 阅读全文