1035. Password (20)
来源:互联网 发布:淘宝金币大转盘 编辑:程序博客网 时间:2024/05/29 02:01
直接上代码。
#include "bits/stdc++.h"using namespace std;#define maxN 10001int main(){ int n; cin>>n; int flag[maxN]; string name[maxN],password[maxN]; int cnt=0; for(int i=0;i<n;i++) { cin>>name[i]>>password[i]; bool temp=false; for(int j=0;j<password[i].size();j++) { if(password[i][j]=='O'||password[i][j]=='1'||password[i][j]=='l'||password[i][j]=='0') { temp=true; } if(password[i][j]=='O') { password[i][j]='o'; } else if(password[i][j]=='0') { password[i][j]='%'; } else if(password[i][j]=='l') { password[i][j]='L'; } else if(password[i][j]=='1') { password[i][j]='@'; } } if(temp) { flag[cnt++]=i; } } if(cnt==0) { if(n==1) cout<<"There is 1 account and no account is modified"<<endl; else if(n>=2) cout<<"There are "<<n<<" accounts and no account is modified"<<endl; } else { cout<<cnt<<endl; for(int i=0;i<cnt;i++) { cout<<name[flag[i]]<<" "<<password[flag[i]]<<endl; } } return 0;}
阅读全文
0 0
- 1035. Password (20)
- 【PAT】1035. Password (20)
- 1035. Password (20)-PAT
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- PAT 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- pat 1035. Password (20)
- Android-Activity页面之间的数据传递
- [机器学习入门] 李宏毅机器学习笔记-15 (Unsupervised Learning: Word Embedding;无监督学习:词嵌入)
- oracle 创建job进行submit时提示字符缓冲去太小
- Android中View绘制过程(二) Activity的decorView , Window ,ViewRooImpl 分别什么时候创建
- 射线检测UGUI的Button组件,控制Button四种状态状态
- 1035. Password (20)
- SpringMVC参数接受填坑
- thread47
- 三元表达式和列表解析
- 22. 编写函数:移动字符串中的内容
- SLAM札记
- 0是不是自然数
- Codeforces Round #198 (Div. 2) E. Iahub and Permutations —— 容斥原理
- js获取浏览器滚动条垂直滚动距离scrollTop的兼容方法