摘要:
这道题主要是解决超时问题 使用unordered_map代替map 参考: std::unordered_map map与unordered_map map和unordered_map的差别和使用 在PAT里使用map还是unordered_map? 使用unordered_map<string, 阅读全文
posted @ 2020-08-01 20:59
Hellofds
阅读(76)
评论(0)
推荐(0)
摘要:
题目的要求即为:对任意两个数字,确定它们的排序,使得两个数字串起来后得到的新数字最小 struct cmp { bool operator() (const int a, const int b) { char str[2][2*M]; strcpy(str[0], num[a]); strcat( 阅读全文
posted @ 2020-08-01 19:45
Hellofds
阅读(69)
评论(0)
推荐(0)