题解 1402: 简单的字符串

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

筛选

结构体数组解决(c语言代码)

```c#include#include#include#include#defineMAX10001typedefstruct{charch;//字符intcount;//字符出现次数}String;//比较函数用于qsort排序字符intcmp(constvoid*a,

字符数组遍历解决

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){      char str[100] = { 0 };//初始化字符数组  ……

简单的字符串

摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<string.h> int main() {        char str[100] = { 0 }; ……

思路即可解题

摘要:解题思路:定义一个结构体,分别含有字母,字母的数字,然后统计,最后输出;注意事项:参考代码:#include<iostream>using namespace std;typedef struct {……

map集合(简单易懂)

解题思路:注意事项:参考代码:importjava.util.HashMap;importjava.util.Map;importjava.util.Map.Entry;importjava.util.Scanner;publicclassMain{publicstaticvoidmain(Strin

搞懂map自定义排序

#include#includeusingnamespacestd;//mapa相当于mapa;//如果是mapa,char由大到小排序//自定义排序structcmp{booloperator()(constchar&a,constchar&b)const{returna

简单的字符串

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){       int n=0;    scanf("%d",&n);    g……

简单的字符串

摘要:解题思路:用字典去重注意事项:参考代码:n = int(input())for i in range(n):    L = list(input())    dic = {}    for i in ……