没有必要非得使用一个额外的string数组吧, static bool comp(const int &a, const int &b) { string s1 = to_string(a); string s2 = to_string(b); return s1 + s2 < s2 + s1; }
点赞

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务