找第一个只出现一次的字符,不使用复杂函数的简单解法 摘要:题目说了输入的字符串仅有小写字母,那么可以定义一个数据元素个数为26的整型数组,用于记录各个字符出现的次数,出现次数为1的即为答案,没有则输出no ```cpp #include #inclu…… 题解列表 2024年03月28日 1 点赞 0 评论 329 浏览 评分:0.0
使用unordered_map解题 摘要:解题思路:充分利用STL容器的特性-unordered_map, 对其进行存放和计算 得出第一个个数为1的小写字母注意事项: 参考代码:#include<bits/stdc++.h>char sear…… 题解列表 2024年11月30日 0 点赞 0 评论 253 浏览 评分:0.0
题解 2847: 找第一个只出现一次的字符 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char a[100000]; int b; int i; …… 题解列表 2024年04月16日 0 点赞 0 评论 146 浏览 评分:0.0
优质题解,回归真神的初始途径 摘要:解题思路:利用字典,统计每个字母出现的次数注意事项:参考代码:word=input()dic={}for le in word: if le in dic: dic[le]+=1 …… 题解列表 2024年07月25日 1 点赞 0 评论 476 浏览 评分:0.0
HashMap键值对方法 摘要:解题思路:注意事项:参考代码:import java.util.HashMap;import java.util.Map;import java.util.Scanner;public class M…… 题解列表 2024年04月22日 0 点赞 0 评论 156 浏览 评分:0.0
七行简便 编写题解 2847: 找第一个只出现一次的字符 摘要:解题思路:if n.count(i)==1:注意事项:else: print('no')参考代码:n=input()for i in n: if n.count(i)==1:…… 题解列表 2024年04月24日 0 点赞 0 评论 404 浏览 评分:0.0
找第一个只出现一次的字符 摘要:解题思路:写题解代码只是为了自己查看,无严谨性注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char s[100000]; …… 题解列表 2024年11月06日 0 点赞 0 评论 349 浏览 评分:0.0
2847 找第一个只出现一次的字符(gets) 摘要:解题思路:注意事项:参考代码#include <stdio.h>#include <string.h>int main() { char arr[100001], ch; int i, j…… 题解列表 2024年10月29日 0 点赞 0 评论 245 浏览 评分:0.0
找第一个只出现一次的字符 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args) {…… 题解列表 2024年06月03日 0 点赞 0 评论 252 浏览 评分:0.0
找第一个只出现一次的字符 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main() { char arr[200] = { 0 }; fgets(arr, s…… 题解列表 2024年09月26日 0 点赞 0 评论 191 浏览 评分:0.0