题解 2974: 统计字符数

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

题解 2974: 统计字符数

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int tong[1000];int main(){ string s; cin>……

2974: 统计字符数

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N=1e7;ll to……

题解 2974: 统计字符数

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;const ll N=1001;ll to……

哈希法,map+vector法# 2974: 统计字符数

[TOC]#哈希法```#include#includeusingnamespacestd;//统计每个字符出现的次数,因为有26个字母,所以开到26intcnt[26];intmain(){strings;cin>>s;intmax=0;//每个字母减去a就能映射到0~25上去for(inti=0;