字符串
文章平均质量分 66
azhuge233
Keep ya head up,legs closed,eyes open.
展开
-
HDU 2564 词组缩写
链接 : http://acm.hdu.edu.cn/showproblem.php?pid=2564水题#include #include #include using namespace std;int main(){ char str[150]; int T; scanf("%d%*c",&T); while(T-- && gets(原创 2016-05-12 11:04:15 · 658 阅读 · 0 评论 -
HDU 2205 亲和串
链接 : http://acm.hdu.edu.cn/showproblem.php?pid=2205只要把第一个字符串复制两遍,在其中找字串2的字串即可,水过#include #include #define MAX 100001using namespace std;char str1[MAX],str2[MAX],str3[MAX*2];int main()原创 2016-05-03 22:05:32 · 323 阅读 · 0 评论 -
HDU 2029 Palindromes _easy version
链接 : http://acm.hdu.edu.cn/showproblem.php?pid=2029栈的运用 //不用栈也可以当时把奇数和偶数分开写了,有点啰嗦,其实非常简单#include #include #include using namespace std;int main(){ int T; cin>>T; while(T--)原创 2016-05-06 21:53:43 · 227 阅读 · 0 评论 -
HDU 2163 Palindromes
链接 : http://acm.hdu.edu.cn/showproblem.php?pid=2163还是判断回文,栈,输入“STOP”时停止#include #include #include #include using namespace std;int main(){ int k=1; char str[53]; while(ci原创 2016-05-06 21:57:51 · 223 阅读 · 0 评论 -
POJ 2418 Hardwood Species
链接:http://poj.org/problem?id=2418前面三段认真看看,可以学习到很多树种的英文名称【正经脸 (/▽\=)】题意:给你一堆字符串,求出每种字符串占总体的百分比首先想到的是Trie树【啊......写Trie树好烦啊】然后想到STL的map,string类的key和int(double)类的value时间为10s,确实很长因为使原创 2016-09-09 17:39:40 · 199 阅读 · 0 评论