啦啦啦,水一发准备去复习功课~

------------------------------------------水一发的分割线------------------------------------------

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1514

水题,没有一次AC我很惭愧,竟然忘了输出总共的个数。。。。。

#include<cstdio>
#include<cstring>
const int MAXN=1000;
struct data
{
bool ok;
char user[12];
char password[12];
}a[MAXN]; int main()
{
int n;
while(~scanf("%d",&n),n)
{
for(int i=0;i<n;i++)
{
scanf("%s%s",a[i].user,a[i].password);
a[i].ok=false;
} int cnt=0;
for(int i=0;i<n;i++)
{
int len=strlen(a[i].password); for(int j=0;j<len;j++)
{
if(a[i].password[j]=='1')
{
a[i].password[j]='@';
a[i].ok=true;
}
else if(a[i].password[j]=='0')
{
a[i].password[j]='%';
a[i].ok=true;
}
else if(a[i].password[j]=='O')
{
a[i].password[j]='o';
a[i].ok=true;
}
else if(a[i].password[j]=='l')
{
a[i].password[j]='L';
a[i].ok=true;
}
} if(a[i].ok)
cnt++;
} if(cnt==0)
printf("No account is modified.\n");
else
{
printf("%d\n",cnt);
for(int i=0;i<n;i++)
{
if(a[i].ok)
{
printf("%s %s\n",a[i].user,a[i].password);
}
}
}
}
return 0;
}

ZOJ 2514 Generate Passwords 水的更多相关文章

  1. ZOJ 2723 Semi-Prime ||ZOJ 2060 Fibonacci Again 水水水!

    两题水题: 1.如果一个数能被分解为两个素数的乘积,则称为Semi-Prime,给你一个数,让你判断是不是Semi-Prime数. 2.定义F(0) = 7, F(1) = 11, F(n) = F( ...

  2. ZOJ 3827 Information Entropy 水

    水 Information Entropy Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge Informati ...

  3. ZOJ 3819 Average Score 水

    水 Average Score Time Limit: 2 Seconds      Memory Limit: 65536 KB Bob is a freshman in Marjar Univer ...

  4. ZOJ Special AC String 水

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3702 题目大意: 对于给定的一个字符串,满足如下要求输出AC,否则WA(好吧我 ...

  5. ZOJ 3168 Sort ZOJ7 水

    再水一发,舍友肿么还在睡T T. ---------------------------------舍友还在睡觉的分割线--------------------------------- http:/ ...

  6. ZOJ 3827 Information Entropy 水题

    Information Entropy Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.zju.edu.cn/onlinejudge/sh ...

  7. ZOJ 3846 GCD Reduce//水啊水啊水啊水

    GCD Reduce Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge You are given a sequ ...

  8. ZOJ 3787 Access System 水

    LINK:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3787 思路:结构体 时间转化为秒记录下最小并且排序就好了 /** ...

  9. ZOJ - 3932 Handshakes 【水】

    题目链接 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3932 题意 给出 N 个人,然后 1-N 然后 从 1 - N ...

随机推荐

  1. RecyclerView具体解释

    public class RecyclerView extends ViewGroup implements ScrollingView, NestedScrollingChild { 由上面的继承结 ...

  2. sql简单的语句

    选择:select * from table1 where 范围 插入:insert into table1(field1,field2) values(value1,value2) 删除:delet ...

  3. Python 之Numpy应用

    NumPy 数据类型 numpy 支持的数据类型比 Python 内置的类型要多很多,基本上可以和 C 语言的数据类型对应上,其中部分类型对应为 Python 内置的类型.下表列举了常用 NumPy ...

  4. 一个理性战胜感性的成功案例:P2P投资和活期理财,纠结中提炼出来的1个数学问题

    我经常是投资了P2P,然后用钱,因而损失了一部分收益. 这是一个让我纠结的问题,为了解决这个问题,我不再凭感觉,而是从现实情况,提炼出来1个数学题,解答我的疑惑. 这是一个理性战胜感性的成功案例~ P ...

  5. SpringCloud核心教程 | 第三篇:服务注册与发现 Eureka篇

    Spring Cloud简介 Spring Cloud是一个基于Spring Boot实现的云应用开发工具,它为基于JVM的云应用开发中涉及的配置管理.服务发现.断路器.智能路由.微代理.控制总线.全 ...

  6. 洛谷——P1316 丢瓶盖

    https://www.luogu.org/problem/show?pid=1316 题目描述 陶陶是个贪玩的孩子,他在地上丢了A个瓶盖,为了简化问题,我们可以当作这A个瓶盖丢在一条直线上,现在他想 ...

  7. [Javascript AST] 4. Continue: Report ESLint error

    const disallowedMethods = ["log", "info", "warn", "error", & ...

  8. install-软件安装跟push的区别

    今天在做项目的时候,需要往一个user版本的手机中安装一个应用,就在网上查了相应的方法,可以使用如下命令 adb install -r out/target/product/vanzo6752_lwt ...

  9. Font Awesome 图标如何使用

    Font Awesome 图标如何使用 一.总结 一句话总结:Font Awesome字体图标非常好用,直接引入font-awesome.css,然后就可以直接使用了,使用的时候是用的i标签. 1.字 ...

  10. 程序是怎么跑起来的? —— CPU 是什么?C/C++程序的运行

    1. 概念初步 程序:计算机的程序,和做饭.运动会的程序一样,指的是"做事的先后次序": 程序的组成:程序是指令(及物动词)和数据(宾语)的组合体: C 语言 printf(&qu ...