20ABerOS file system
来源:互联网 发布:audition cc 2018 mac 编辑:程序博客网 时间:2024/06/05 19:03
题意:输入一串字符,是一个电脑路径,把路径中有大于一个/的去掉只保留一个。末尾有/的去掉。
题意:模拟
#include<bits/stdc++.h>using namespace std;int main(){ char s[1000]; int m; while(cin>>s) { m=0; int len=strlen(s); for(int i=1; i<len; i++) if(s[i]!='/'||s[m]!='/') s[++m]=s[i]; while(m>0&&s[m]=='/') ///末尾是'/'去掉 m--; s[m+1]=0; ///字符串结尾添加'/0' puts(s); } return 0;}
阅读全文
0 0
- 20ABerOS file system
- file system
- file system
- File system
- cf 20a BerOS file system
- Code Forces 20A BerOS file system
- 试试Fedora 20里头的File System on File
- File System Drivers & File System Filter Drivers
- The proc File System:
- The System.map File
- mount file system
- mount file system
- Google File System(中文翻译)
- embedded system (control file )
- The Google File System
- unix file system
- Apollo Local File System
- File System Comparison
- (三十九)MaterialDesign 动画
- wannafly练习赛8
- Java设计模式之适配器模式(Adapter Pattern)
- 最近有点累 QUCT
- 手机发送验证码的业务逻辑探究-主要是安全性,响应性
- 20ABerOS file system
- 随笔
- Convolution Neural Network (CNN) 原理与实现
- 59. DNS 服务器
- Python之继承与多态
- 训练日记
- 素数算法吐血总结
- 错误:
- npm 淘宝镜像的安装