随笔分类 - STL---map
摘要:class Solution { public: static bool cmp(pair<char,int> a, pair<char,int> b){ return a.second>b.second; } string frequencySort(string s) { string ans=
阅读全文
摘要:题目链接:http://118.190.20.162/view.page?gpid=T26 返回试题列表 返回试题列表 问题描述 试题编号: 201503-2 试题名称: 数字排序 时间限制: 1.0s 内存限制: 256.0MB 问题描述: 问题描述 给定n个整数,请统计出每个整数出现的次数,按出
阅读全文
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 int main() 6 { 7 map mp; 8 map ::iterator it; 9 mp.insert({'a',1}); 10 mp.insert({'b',2}); 11 mp.insert({'c',...
阅读全文