![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字符串
Emiyasstar__
这个作者很懒,什么都没留下…
展开
-
HDU-1106排序
虽然是水题,不过写的仍然好纠结啊,一直超内存,最后改了又改 无奈舍弃使用 substr 计数排序方法 #include #include #include #define N 1005 #define MAX 1005 char cstr[N]; int num[MAX]; std::string str; int pos1,pos2; int n; int n_num; int原创 2013-04-19 16:18:53 · 695 阅读 · 0 评论 -
HDU-1274展开字符串/HDU-2072单词数
需要简单的递归调用,主要是string用的有点纠结,还是不熟练啊 #include #include #include #define N 255 char str[N]; std::string stri; std::string strn; int num; std::string::iterator process( std::string& str,std::strin原创 2013-04-16 21:17:32 · 856 阅读 · 0 评论 -
HDU 1062 Text Reverse
字符串水题一枚 #include #include int t; //char s[1003]; std::string word; std::string reserve; int pos1,pos2; int main() { int size; while (std::cin>>t){ std::getline(std::cin,word); for(int原创 2013-04-01 18:00:10 · 764 阅读 · 0 评论 -
HDU-2846Repository(字典树)
TLE状态#include #include #include #include class dr_tree { private: typedef struct node { bool flag; node* next[26]; node() { flag=false; for(int i=0;i!=26;i++){ next[i]=NULL;原创 2013-05-10 16:27:08 · 677 阅读 · 0 评论 -
HDU-2026首字母大写
水啊水,求排名 前10000 其实一种情况未处理,第一个空格以后的单词有bug,不过数据太弱,没查出来 #include #include std::string str; int size; int pos1,pos2; int main() { while (std::getline(std::cin,str)){ if(isalpha(str[0])){ str[0]原创 2013-05-11 22:08:24 · 954 阅读 · 0 评论