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

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

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. Jenkins学习总结(3)——Jenkins+Maven+Git搭建持续集成和自动化部署的

    前言 持续集成这个概念已经成为软件开发的主流,可以更频繁的进行测试,尽早发现问题并提示.自动化部署就更不用说了,可以加快部署速度,并可以有效减少人为操作的失误.之前一直没有把这个做起来,最近的新项目正 ...

  2. [AngularFire2 & Firestore] Example for collection and doc

    import {Injectable} from '@angular/core'; import {Skill} from '../models/skills'; import {AuthServic ...

  3. 带你一分钟理解闭包--js面向对象编程(转载他人)

    什么是闭包? 先看一段代码: function a(){ var n = 0; function inc() { n++; console.log(n); } inc(); inc(); } a(); ...

  4. 一文了解sun.misc.Unsafe

    Java语言和JVM平台已经度过了20岁的生日.它最初起源于机顶盒.移动设备和Java-Card,同时也应用在了各种服务器系统中,Java已成为物联网(Internet of Things)的通用语言 ...

  5. (转)修改 ubuntu 默认启动项

    转自: http://jingyan.baidu.com/article/afd8f4de58959134e386e969.html 当我们安装windows和ubuntu双系统以后,默认启动变成ub ...

  6. Redmine安装

    http://www.itnpc.com/news/web/146433249372595.html http://www.cnblogs.com/iluzhiyong/p/redmine.html ...

  7. 感谢党,软考过了。系统集成项目管理project师

    人品爆发了,刚用干巴巴的日语做完2小时的设计说明,回到家一查,人品爆发了.软考竟然过了. 绝对是评卷老师给人品啊!真想请他吃顿饭. 系统集成项目管理project师  64 53 幸运飞过! 今天真是 ...

  8. 日历控件input框默认显示当日日期

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <script sr ...

  9. amazeui学习笔记--css(常用组件5)--评论列表Comment

    amazeui学习笔记--css(常用组件5)--评论列表Comment 一.总结 1.am-comment:使用am-comment来声明评论对象,这个是放在article里面的,虽然article ...

  10. Spring Profiles example--转载

    原文地址:http://www.mkyong.com/spring/spring-profiles-example/ Spring @Profile allow developers to regis ...