摘要: map按value排序/自定义排序规则 \(sort\)不能直接排\(map\),需要把map放入到vector中再对vector排序 方法如下 using PSI = pair<string, int>; vector<PSI> arr; unordered_map<string, int> mp 阅读全文
posted @ 2022-05-04 18:18 Tshaxz 阅读(59) 评论(0) 推荐(0)
摘要: 1346. 回文平方 进位制、双指针判断回文数 #include <iostream> #include <algorithm> #include <cstring> using namespace std; char get(int x) // 将x转化为b进制 { if(x <= 9) retu 阅读全文
posted @ 2022-05-04 16:29 Tshaxz 阅读(42) 评论(0) 推荐(0)
Language: HTML