题解 2974: 统计字符数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int tong[1000];int main(){ string s; cin>…… 题解列表 2024年07月16日 0 点赞 0 评论 547 浏览 评分:0.0
2974: 统计字符数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N=1e7;ll to…… 题解列表 2024年07月16日 0 点赞 0 评论 534 浏览 评分:0.0
题解 2974: 统计字符数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;const ll N=1001;ll to…… 题解列表 2024年07月16日 0 点赞 0 评论 491 浏览 评分:0.0
哈希法,map+vector法# 2974: 统计字符数 [TOC]#哈希法```#include#includeusingnamespacestd;//统计每个字符出现的次数,因为有26个字母,所以开到26intcnt[26];intmain(){strings;cin>>s;intmax=0;//每个字母减去a就能映射到0~25上去for(inti=0; 题解列表 2024年10月25日 0 点赞 0 评论 455 浏览 评分:0.0