首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
Heart997
2026年3月23日 15:58
单词识别 题解:c++,按map中的次数排序
P1452
回复 0
|
赞 2
|
浏览 50
#include<bits/stdc++.h> using namespace std; map<string, int> m; bool cmp(string a,string b){ int count_a = m[a]; int count_b = m[b]; if(count_a != count_b)return count_a > count_b;//次数多的排在前面 els...
My_opt
2022年4月30日 15:45
c++
P1452
回复 0
|
赞 9
|
浏览 6.3k
#include <iostream> #include <map> #include <algorithm> using namespace std; const int N = 1010; char x; string s; map<string, int> h; struct node { string s; int cnt; }r[N]; bool cmp(node a, node b) { return a.cnt > b.cnt; } int main() { ...
A1120161820
2020年3月9日 09:52
单词识别(c++)
P1452
回复 0
|
赞 9
|
浏览 13.1k
#include<iostream> #include<string> #include<cstring> #include<map> #include<algorithm> using namespace std; typedef map<string, int> msi; int main() { char line[1024], str[20]; cin.getline(line, 1024); msi words; int i = 0, head = 0, len = 0;...
题目
单词识别
题解数量
3
发布题解
在线答疑
热门题解
1
c++
2
单词识别(c++)
3
单词识别 题解:c++,按map中的次数排序