编写题解 1754: 字符串排序 摘要:解题思路:注意事项:对于题目中提到的可能有多组输入,可以用while(scanf("%d",&n)!=EOF)解决;题目中还提到每个字符串以‘\n’结束,说明其中可能会含有空格,不能用scanf函数进…… 题解列表 2023年04月22日 1 点赞 0 评论 547 浏览 评分:9.9
结构体简化排序 摘要:解题思路:用结构体方式储存字符串以及字符串的长度 可以更方便地进行排序注意事项:参考代码:typedef struct str{ char str[101]; int len;}st;int main…… 题解列表 2023年02月07日 0 点赞 0 评论 168 浏览 评分:0.0
字符串排序(思路清晰版) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int n; char str[100][100],t[100]; int …… 题解列表 2023年02月06日 0 点赞 1 评论 357 浏览 评分:10.0
C++和C语言实现 摘要:解题思路:上边是c语言版本(忽略头文件),下边是c++版本;(大佬勿喷)C:strcpy_s看成strcpy即可,因为不加_s在VS中编译不通过,还有cin.getline()。可以看到写了个Sort…… 题解列表 2023年01月02日 0 点赞 0 评论 259 浏览 评分:9.9
字符串排序-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include<cstdio> #include<vector> #include<algorithm> #include<string> #include<i…… 题解列表 2020年08月07日 0 点赞 0 评论 447 浏览 评分:0.0
字符串排序-题解(C语言代码) 摘要: #include <iostream> #include <string.h> #include <cstring> #include <vector> using namespa…… 题解列表 2020年07月03日 0 点赞 0 评论 492 浏览 评分:0.0
字符串排序-题解(C语言代码) 摘要:#include #include #include int cmp( const void*q,const void*w) { return strlen((char*)q)-str…… 题解列表 2019年08月06日 0 点赞 0 评论 917 浏览 评分:0.0
字符串排序-题解(C语言代码) 摘要:#include #include int main() { char a[1000][100],b[1000],t[1000],t1[5]={"stop"}; int n,i,j,k,…… 题解列表 2019年07月02日 0 点赞 0 评论 806 浏览 评分:0.0
字符串排序 (C语言代码)卡了比较久的。。。 摘要:解题思路:思路还可以。。注意事项:需要用getchar()吞掉‘\n’; 还有,我觉得需要注意n的值,如果n<=0,就要while(n<=0) scanf("%d",&n);参考代码:…… 题解列表 2019年04月14日 0 点赞 0 评论 1122 浏览 评分:9.9
字符串排序 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstring> #include<algorithm> using namespace std; str…… 题解列表 2019年04月14日 0 点赞 0 评论 720 浏览 评分:2.0