摘要: 题目: 输入一串数字,求用这些数字能组成最大的整数分析: 可以用sort()函数比较排序,比较方式为 int cmp(string a,string b){return a+b>b+a;}即可#include <iostream>#include <algorithm>#include <string>using namespace std;string s[52];int cmp(string a,string b){ return a+b>b+a;}int main(){ freopen("sum.in","r& 阅读全文
posted @ 2012-02-22 19:09 yejinru 阅读(131) 评论(0) 推荐(0) 编辑