注意下单复数

#include<bits/stdc++.h>

using namespace std;
pair<string,string>pa;
int main()
{
int n;
scanf("%d",&n); vector<pair<string,string> >vec;
for(int i=;i<n;i++){
char a[],b[];
scanf("%s %s",a,b);
bool flag=false;
for(int j=;b[j];j++){
if(b[j]=='l'){
b[j]='L';
flag=true;
}
else if(b[j]==''){
b[j]='@';
flag=true;
}
else if(b[j]==''){
b[j]='%';
flag=true;
}
else if(b[j]=='O'){
b[j]='o';
flag=true;
}
}
if(flag) vec.push_back(make_pair(a,b));
}
if(vec.size()==){
if(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",vec.size());
for(int i=;i<vec.size();i++){
cout<<vec[i].first<<" "<<vec[i].second<<endl;
}
}
return ;
}

其实没必要用vector<pari<string,string>> 直接用vector<string> 即可 把空格也当成字符串放在一个字符串里

1035 Password (20 分)(字符串)的更多相关文章

  1. PAT (Advanced Level) Practice 1035 Password (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1035 Password (20 分) 凌宸1642 题目描述: To prepare for PAT, the judge someti ...

  2. PAT 甲级 1035 Password (20 分)(简单题)

    1035 Password (20 分)   To prepare for PAT, the judge sometimes has to generate random passwords for ...

  3. PAT甲级——1035 Password (20分)

    To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem ...

  4. PAT Advanced 1035 Password (20 分)

    To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem ...

  5. PAT (Advanced Level) Practice 1035 Password (20 分)

    To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem ...

  6. 【PAT甲级】1035 Password (20 分)

    题意: 输入一个正整数N(<=1000),接着输入N行数据,每行包括一个ID和一个密码,长度不超过10的字符串,如果有歧义字符就将其修改.输出修改过多少组密码并按输入顺序输出ID和修改后的密码, ...

  7. 1035 Password (20分)(水)

    To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem ...

  8. 【PAT】1035. Password (20)

    题目:http://pat.zju.edu.cn/contests/pat-a-practise/1035 分析:简单题.直接搜索,然后替换,不会超时,但是应该有更好的办法. 题目描述: To pre ...

  9. 1035 Password (20)(20 point(s))

    problem To prepare for PAT, the judge sometimes has to generate random passwords for the users. The ...

  10. 1035 Password (20)

    #include <stdio.h> #include <string.h> struct MyStruct { ]; ]; bool changed; }; int main ...

随机推荐

  1. 记一次jvm异常排查及优化

    为方便自己查看,根据工作遇到的问题,转载并整理以下jvm优化内容 有次接到客服反馈,生产系统异常,无法访问.接到通知紧急上后台跟踪,查看了数据库死锁情况--正常,接着查看tomcat 内存溢出--正常 ...

  2. iOS:cocoapods 配置相关(19-04-02更)

    1.gem sources 2.libwebp 1.gem sources 因为,mac更新,cocoapods也要更新,使用下面指令,提示找不到.org,原因是淘宝的镜像源.org换成.com,所以 ...

  3. vue+echarts实现可拖动节点的折现图(支持拖动方向和上下限的设置)

    本篇文档主要是利用echarts实现可拖动节点的折现图,在echarts中找到了一个demo,传送门:https://echarts.baidu.com/examples/editor.html?c= ...

  4. MySQL学习【第十三篇日志管理】

    一.MySQL日志类型 日志文件 选项  文件名/表名称   程序 错误日志 --log-error   host_name.err N/A 常规日志 --general_log host_name. ...

  5. 基于Centos7系统部署cobbler批量安装系统

    前言 cobbler是一个可以实现批量安装系统的Linux应用程序.它有别于pxe+kickstart,cobbler可以实现同个服务器批量安装不同操作系统版本 系统环境的准备及下载cobbler 一 ...

  6. html5手机浏览器启动微信客户端支付实例

    html5手机浏览器启动微信客户端支付实例,外部浏览器html5微信支付技术,如何在手机浏览器微信支付,在微信客户端外的移动端网页使用微信支付 首先在微信支付官网https://pay.weixin. ...

  7. urllib库使用方法 3 get html

    import urllib.requestimport urllib.parse #https://www.baidu.com/s?ie=UTF-8&wd=中国#将上面的中国部分内容,可以动态 ...

  8. Linux使用scp命令进行文件远程拷贝详解

    前言 scp是 secure copy的缩写, scp是Linux系统下基于ssh登陆进行安全的远程文件拷贝命令.Linux的scp命令可以在Linux服务器之间复制文件和目录. 使用语法: scp  ...

  9. UART学习之路(三)基于STM32F103的USART实验

    关于STM32串口的资料可以在RM0008 Reference Manual中找到,有中文版的资料.STM32F103支持5个串口,选取USART1用来实验,其对应的IO口为PA9和PA10.这次的实 ...

  10. PWA-清单文件

    应用清单 介绍 Web 应用清单文件是简单的 JSON 文件,提供了应用的相关信息 (比如应用的名称.作者.图标和描述).可使用户将 Web 应用安装到设备的主屏幕上,并允许开发者自定义启动画面.模板 ...