题解 2847: 找第一个只出现一次的字符 摘要:#include#includeusing namespace std;char str[100010];int cnt[26];int main(){ cin >> str; for(i…… 题解列表 2023年08月15日 0 点赞 0 评论 497 浏览 评分:9.9
Python编写简单易懂 包含知识点 markdown编写 摘要:``` str1=input() # 字符串的输入 flag=len(str1) # 字符串的长度 for i in str1 : a=str1.find(i) …… 题解列表 2023年07月12日 0 点赞 0 评论 579 浏览 评分:9.9
2847-找第一个只出现一次的字符-数组解法 摘要:注意事项: 找到只出现一次的字符,输出第一次出现的字符。 注意题目条件:用字符型数组储存输入的小写字母,用整形数组储存26个字母的出现次数输出第一次出现的字母 ```cpp #in…… 题解列表 2024年06月08日 0 点赞 0 评论 713 浏览 评分:9.9
找第一个只出现一次的字符 摘要:解题思路:注意事项:参考代码:a=input()for i in a: if a.count(i)==1: print(i) breakelse: print(…… 题解列表 2023年06月09日 0 点赞 1 评论 668 浏览 评分:9.9
利用map的有序性来计数 摘要:```c++ #include #include using namespace std; int main(){ map mmap; string s; cin >> s…… 题解列表 2023年05月22日 1 点赞 0 评论 421 浏览 评分:9.9
collections.OrderedDict 有序字典 摘要:# 解题思路 1. 通过collections.OrderedDict统计字母个数,以空间换时间,降低查找的时间复杂度。 2. 时间复杂度为O(nlogn),空间复杂度为O(n) # 代码 …… 题解列表 2023年05月22日 0 点赞 1 评论 584 浏览 评分:9.9
双循环遍历 摘要:# 纯纯打表 ```c++ #include #include using namespace std; char str[10000]; int f[26]; int main() …… 题解列表 2023年05月09日 0 点赞 0 评论 397 浏览 评分:9.9
找第一个只出现一次的字符(C语言)(简单) 摘要: #include #include int main() { char a[100000]; gets(a); int y =…… 题解列表 2024年11月25日 1 点赞 0 评论 975 浏览 评分:9.9
找到第一个仅出现一次的字符。 摘要:解题思路:注意事项:参考代码://题目描述//给定一个只包含小写字母的字符串,请你找到第一个仅出现一次的字符。//如果没有,输出no。//输入格式//一个字符串,长度小于100000。//输出格式//…… 题解列表 2023年01月08日 0 点赞 0 评论 1072 浏览 评分:9.9
菜鸟的java循环解法 摘要:解题思路:两层循环嵌套,外层选出某一字符,里层带着此字符对字符串遍历,记录字符出现的次数,如为一则输出,跳出循环。注意事项:参考代码:import java.util.Scanner;public c…… 题解列表 2022年11月02日 0 点赞 1 评论 583 浏览 评分:9.9