ZOJ 3200 Sort ZOJ7
来源:互联网 发布:长江证券炒股软件 编辑:程序博客网 时间:2024/05/16 12:01
水题
#include<bits/stdc++.h>using namespace std;char s[1020];char c[]="ZOJ7";int a[20],f[1020];int main(){ while(scanf("%s",s)!=EOF) { memset(f,0,sizeof(f)); memset(a,0,sizeof(a)); int len=strlen(s); for(int i=0;i<len;i++) { for(int j=0;j<4;j++) { if(s[i]==c[j]) { f[i]=1; a[j]++; break; } } } for(int i=0;i<4;i++) { for(int j=1;j<=a[i];j++) printf("%c",c[i]); } for(int i=0;i<len;i++) { if(f[i]==0) printf("%c",s[i]); } printf("\n"); } return 0;}
0 0
- ZOJ 3200 Sort ZOJ7
- ZOJ 3168 Sort ZOJ7
- ZOJ 3168 Sort ZOJ7 水
- zoj 3168 Sort ZOJ7(水!)
- 3168 Sort ZOJ7
- zoj3168------------------------Sort ZOJ7
- zoj 3355 Football Gambling I(zoj7月月赛)
- zoj 3359 Penalties Kick(zoj7月月赛)
- zoj 1171 sort the photo
- 线段树 ZOJ 1440 Bone Sort
- ZOJ 1440 Bone Sort (置换+逆序数)
- sort
- Sort
- sort
- Sort
- sort
- Sort
- sort
- Powerdesigner12.5激活方法
- VisualBox问题
- mysql 自定义存储过程和触发器
- 【Android UI设计与开发】使用ViewPager实现欢迎引导页面
- 题目1201:二叉排序树(2005年华中科技大学计算机保研机试真题)
- ZOJ 3200 Sort ZOJ7
- Excel中IF函数和AND函数结合使用进行多条件判断
- UVA1494 - Qin Shi Huang's National Road System
- 22种代码的坏味道,一句话概括
- linux shell 编程
- CryptoAPI 学习
- 创建一个Eclipse项目【Create a Project with Eclipse】
- hdu4502 吉哥系列故事——临时工计划
- tag