PAT (Advanced Level) 1035. Password (20)
简单题。
#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<map>
#include<queue>
#include<vector>
using namespace std; int n;
struct X
{
string a;
string b;
bool flag;
} s[+]; int main()
{
scanf("%d",&n);int fail=;
for(int i=; i<=n; i++)
{
cin>>s[i].a>>s[i].b;
s[i].flag=; for(int j=; j<s[i].b.length(); j++)
{
if(s[i].b[j]=='') s[i].flag=,s[i].b[j]='@';
if(s[i].b[j]=='') s[i].flag=,s[i].b[j]='%';
if(s[i].b[j]=='l') s[i].flag=,s[i].b[j]='L';
if(s[i].b[j]=='O') s[i].flag=,s[i].b[j]='o'; }
fail=fail+s[i].flag;
}
if(fail==)
{
if(n==||n==) printf("There is %d account and no account is modified\n",n);
else printf("There are %d accounts and no account is modified\n",n);
}
else
{
printf("%d\n",fail);
for(int i=; i<=n; i++)
{
if(s[i].flag==) continue;
cout<<s[i].a<<" "<<s[i].b<<endl;
}
}
return ;
}
PAT (Advanced Level) 1035. Password (20)的更多相关文章
- PTA (Advanced Level)1035.Password
To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem ...
- PAT (Advanced Level) 1077. Kuchiguse (20)
最长公共后缀.暴力. #include<cstdio> #include<cstring> #include<cmath> #include<vector&g ...
- PAT (Advanced Level) 1061. Dating (20)
简单模拟. #include<stdio.h> #include<string.h> ],s2[],s3[],s4[]; ][]={"MON ", &quo ...
- PAT (Advanced Level) 1008. Elevator (20)
简单模拟. 注意a[i]==a[i-1]的情况. #include<iostream> #include<cstring> #include<cmath> #inc ...
- 【PAT甲级】1035 Password (20 分)
题意: 输入一个正整数N(<=1000),接着输入N行数据,每行包括一个ID和一个密码,长度不超过10的字符串,如果有歧义字符就将其修改.输出修改过多少组密码并按输入顺序输出ID和修改后的密码, ...
- PAT (Advanced Level) Practice 1035 Password (20 分) 凌宸1642
PAT (Advanced Level) Practice 1035 Password (20 分) 凌宸1642 题目描述: To prepare for PAT, the judge someti ...
- PAT 甲级 1035 Password (20 分)(简单题)
1035 Password (20 分) To prepare for PAT, the judge sometimes has to generate random passwords for ...
- PAT (Advanced Level) Practice 1046 Shortest Distance (20 分) 凌宸1642
PAT (Advanced Level) Practice 1046 Shortest Distance (20 分) 凌宸1642 题目描述: The task is really simple: ...
- PAT (Advanced Level) Practice 1042 Shuffling Machine (20 分) 凌宸1642
PAT (Advanced Level) Practice 1042 Shuffling Machine (20 分) 凌宸1642 题目描述: Shuffling is a procedure us ...
随机推荐
- 1 开发一个注重性能的JDBC应用程序不是一件容易的事. 当你的代码运行很慢的时候JDBC驱动程序并不会抛出异常告诉你。 本系列的性能提示将为改善JDBC应用程序的性能介绍一些基本的指导原则,这其中的原则已经被许多现有的JDBC应用程序编译运行并验证过。 这些指导原则包括: 正确的使用数据库MetaData方法 只获取需要的数据 选用最佳性能的功能 管理连
1 开发一个注重性能的JDBC应用程序不是一件容易的事. 当你的代码运行很慢的时候JDBC驱动程序并不会抛出异常告诉你. 本系列的性能提示将为改善JDBC应用程序的性能介绍一些基本的指导原则,这其中的 ...
- XML基本概念及增删改查操作
一.概念及特征: 1. XML 指可扩展标记语言(Extensible Markup Language),用户可以自己定义标签.XML 被设计用来传输和存储数据,而 HTML 用于格式化并显示数据,并 ...
- css3纯手写loading效果
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- 8.2.6 PEB —— PEB结构值不正确的问题
书中作者使用 dt _PEB xxxxxx 命令来查看当前进程的PEB结构. 实际操作后PEB结构显示的成员值: 作为进程链表的LDR结构居然没有值,这显然是不正常的,地址也没有输错,问题到底出在哪里 ...
- Python3 OpenCV3 图像处理基础
开发环境搭建 本人使用的是Ubuntu 16.04LTS. 1.安装Python3 ## 其实 Ubuntu 16.04 系统自带了 Python 3.5.2,因此不需要再安装了?但是需要安装一些开发 ...
- github 从一个仓库换到另一个仓库
1.找到.git目录 2.打开config文件 3.修改仓库地址 4.重新提交 git push --all origin 这样就替我们的项目换仓啦!!!^_^
- Perl语言入门: 斜线不是元字符,所以在不作为分隔符时不需要加上反斜线。
Perl语言入门: 斜线不是元字符,所以在不作为分隔符时不需要加上反斜线.
- 点击按钮打开一个新的窗口 关键词(Intent, setData , putExtra , startActivity |Bundle)
M3U8_Video_demo 项目 //------------------ 创建发送private void playVideo(String source, String title) { if ...
- 如何在Python中显式释放内存?
根据Python官方文档,您可以强制垃圾收集器释放未引用的内存gc.collect().例: import gc gc.collect() 所属网站分类: python高级 > 综合&其 ...
- solrJ 查询参数
一. Query参数 1. CoreQueryParam查询的参数 1) q: 查询字符串,必须的. 2) q.op: 覆盖schema.xml的defaultOperator(有空格时用" ...