uva 11988 这题可以看出c++中string效率的底下
2020-11-24 13:08
阅读:647
标签:style blog os io 2014 for
用c语言实现
#include#include #include using namespace std; typedef struct node { char x; struct node *next; }chan; chan *root = new chan; char a[100010]; int main() { while(scanf("%s" , a) != EOF) { int i ; root->next = NULL; int n = strlen(a); chan *r = root , *q = root; for(i = 0; i x = a[i]; t->next = r->next; r->next = t; r = t; //coutnext->xnext == NULL) q = t; } } r = root->next; while(r != NULL) { q = r; printf("%c" , r->x); r =r->next; delete q; } cout
用c++的string实现
#include#include #include using namespace std; int main() { string a; while(cin>>a) { string b; int n = a.size(); int i; string::iterator x , y; x = b.begin(); y = b.end(); for(i = 0; i
结果TELuva 11988 这题可以看出c++中string效率的底下,搜素材,soscw.com
uva 11988 这题可以看出c++中string效率的底下
标签:style blog os io 2014 for
原文地址:http://blog.csdn.net/zengchen__acmer/article/details/24670931
上一篇:C++ Daily 《3》----构造函数可否是虚函数
下一篇:c语言参数传递方式
文章来自:搜素材网的编程语言模块,转载请注明文章出处。
文章标题:uva 11988 这题可以看出c++中string效率的底下
文章链接:http://soscw.com/index.php/essay/22399.html
文章标题:uva 11988 这题可以看出c++中string效率的底下
文章链接:http://soscw.com/index.php/essay/22399.html
评论
亲,登录后才可以留言!