Uva 10905 Children's Game
来源:互联网 发布:手机棋牌源码 编辑:程序博客网 时间:2024/06/03 18:31
题意:给定n个正整数,求他们能拼接成的最大整数是多少。
白书诚不欺我,果然wa了好久....
#include <cstdio>#include <cstring>#include <iostream>#include <algorithm>using namespace std;int n;string s[51];bool camp(string a,string b){return a + b > b + a;}int main(){cin.sync_with_stdio(false);while(cin>>n && n){for(int i = 1;i <= n;i++) cin>>s[i];sort(s+1,s+1+n,camp);for(int i = 1;i <= n;i++) cout<<s[i];cout<<endl;}}
0 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
- Linux spi驱动框架之执行流程
- Windows编程学习之路--框架介绍
- ADO.NET
- 用java写计算器
- 《LeetBook》leetcode题解(19):Remove Nth Node From End of List[E]——双指针解决链表倒数问题
- Uva 10905 Children's Game
- 技术分析之CSS+div
- ubuntu安装ftp服务器——vsftpd,实现ftp传输文件
- PHP学习中遇到的小坑
- 搜索总结
- Oracle 常用命令
- HDU 1003 Max Sum
- zoj 3430 AC自动机
- torch7学习笔记1——itorch_notebook与lua编译的安装