没有必要非得使用一个额外的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; }
点赞

相关推荐

点赞 评论 收藏
分享
牛客网
牛客企业服务