poj 1106
来源:互联网 发布:python安装cv2库 编辑:程序博客网 时间:2024/06/05 07:46
// 5为空格,排序输出
#include <cstdio>#include <string>#include <iostream>#include <cstring>#include <algorithm>using namespace std;string str;long long num[1005];int main(){ int i = 0; while (cin >> str) { memset(num, 0, sizeof(num)); i = 0; for(int j=0; j<str.length();) { int temp=str[j]-'0'; if(temp!=5) { num[i]=num[i]*10+temp; j++; } else { if(j) i++; while(str[j]=='5') j++; if(j>str.length()-1) i--; } } sort(num, num + i + 1); cout << num[0]; for (int k = 1; k <= i; k++) cout << " " << num[k]; cout << endl; } return 0;}
0 0
- poj 1106
- poj 1106
- poj 1106
- POJ 1106 计算几何
- POJ 1106 Transmitters
- poj 1106 Transmitters
- POJ 1106 Transmitters
- zoj 1041 || poj 1106
- POJ 1106 Transmitters
- POJ 1106 Transmitters
- POJ 1106 Transmitters
- poj 1106 计算几何
- POJ 1106 Transmitters
- POJ 1106 Transmitters
- POJ 1106 Transmitters
- POJ
- poj
- POJ
- 搜索题库
- 解决sublime text输出decode error问题
- POJ 3694 Network
- 简单搜索求输入数字的位置
- 重拾8051
- poj 1106
- 对 jiffies 溢出、 系统滴答数ticks、time_after 宏的分析理解
- csdn string to Integer
- UE-9260使用说明1
- C#调用摄像头拍摄,截图,视频
- hdu 1087 Super Jumping! Jumping! Jumping!(dp:上升子序列最大和)
- JDK 1.8 下载,安装,配置环境变量
- IDF实验室之天罗地网古老的邮件编码
- Conditionals with Omitted Operands (x ? : y)