uva 10905-Children’s Game
来源:互联网 发布:重庆生活频道 网络直播 编辑:程序博客网 时间:2024/05/01 10:42
字符串比较
#include <iostream>#include <algorithm>#include <string>#include <cstdio>#include <vector>using namespace std;bool cmp(const string& str1,const string& str2){return (str1+str2)>(str2+str1);}int N,num;vector<string> str;char s[100];void input(){for(int i=0; i<N; i++){scanf("%s", s);str.push_back(string(s));//memcpy(str[num++], s, strlen(s)+1);}}int main() {while(scanf("%d",&N)==1){if(N==0) break;str.clear();input();sort(str.begin(), str.end(), cmp);//solve();for(int i=0; i<str.size(); i++)printf("%s",str[i].c_str());printf("\n");} return 0;}
- UVa 10905 - Children's Game
- UVa 10905 - Children's Game
- uva 10905 - Children's Game
- uva 10905 - Children's Game
- UVA 10905 Children's Game
- UVa 10905 - Children's Game
- Uva-10905-Children’s Game
- UVa 10905 - Children's Game
- UVa 10905 - Children's Game
- uva 10905 - Children's Game
- UVa 10905 - Children's Game
- uva 10905-Children’s Game
- UVa 10905: Children's Game
- UVA 10905 - Children's Game
- UVA 10905 Children's Game
- UVA 10905 - Children’s Game
- uva 10905 Children's Game
- uva 10905 Children's Game
- test
- arcgis api for flex 开发入门(一)环境搭建
- 用Visual C++.NET进行GDI+编程
- arcgis api for flex 开发入门(二)map 的创建
- getch
- uva 10905-Children’s Game
- WSAEventSelect模型中FD_READ 网络事件的处理
- 数据库分库分表(sharding)系列
- POJ | 1065 Wooden Sticks | 贪心
- RIA Service部署IIS6 - WIN2003
- arcgis api for flex 开发入门(三)地图浏览控件的使用
- qt编译不识别tslib报找不到问题的解决
- hdu4180-RealPhobia
- arcgis api for flex 开发入门(四)Darw控件的使用