【1201】字符串排序
来源:互联网 发布:网络数字电视无信号 编辑:程序博客网 时间:2024/06/02 00:01
字符串排序
Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^
题目描述
输入3个字符串,按字典序从小到大进行排序。
输入
输入数据 有一行,分别为3个字符串,用空格分隔。
输出
输出排序后的三个字符串,用空格分隔。
示例输入
abcd cdef bcde
示例输出
abcd bcde cdef
提示
来源
示例程序
#include<stdio.h>#include<string.h>int main(){ char str1[10000],str2[10000],str3[10000],t[10000]; scanf("%s%s%s",str1,str2,str3); if(strcmp(str1,str2)>0) { strcpy(t,str1);strcpy(str1,str2);strcpy(str2,t); } if(strcmp(str1,str3)>0) { strcpy(t,str1);strcpy(str1,str3);strcpy(str3,t); } if(strcmp(str2,str3)>0) { strcpy(t,str2);strcpy(str2,str3);strcpy(str3,t); } printf("%s %s %s\n",str1,str2,str3); return 0;}
0 0
- 1201字符串排序
- 【1201】字符串排序
- SDUT-1201 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序。
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- KMP字符串模式匹配详解
- 使用树莓派与微信公众平台对接(python)
- JVM简介,写的挺好,虽然看评论有说里面有错误,但是可以参考
- 流接口驱动程序的工作原理和开发步骤嵌入式
- #实验#课后的实践—顺序栈的实现 物联1131-01(待完善)
- 【1201】字符串排序
- Linux Bash 脚本:自定义延迟代码块(裸数据保存方案)
- 设计模式之代理模式
- 外包公司第一天
- extjs的grid的行操作
- 开源地图OSM
- Java库中的具体集合
- 二分查找 Java
- UVA - 993 Product of digits 贪心