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

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

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. cogs P1578【模板】 次小生成树初级练习题

    1578. 次小生成树初级练习题 ☆   输入文件:mst2.in   输出文件:mst2.out   简单对比时间限制:1 s   内存限制:256 MB [题目描述] 求严格次小生成树 [输入格式 ...

  2. 让JavaScript在Visual Studio 2015中编辑得更easy

    微软公布的Visual Studio 2015展示了该公司对于让该开发工具更好的支持主流的开发语言的工作.微软项目经理Jordan Matthiesen已经具体列出了一些具体处理JavaScript开 ...

  3. Oracle11gR2 Windows 7 64bit and PL/SQL Developer排错

    1.Environment variable: "PATH" - This test checks whether the length of the environment va ...

  4. oracle跨数据库跨用户訪问注意事项

    java代码中不同意出现oracle的username.数据链路名. 跨用户.跨数据库的訪问必须在oracle中建同义词或视图来实现.在java代码中仅仅需当做当前用户下的对象处理.

  5. BZOJ2555: SubString(后缀自动机,LCT维护Parent树)

    Description 懒得写背景了,给你一个字符串init,要求你支持两个操作 (1):在当前字符串的后面插入一个字符串 (2):询问字符串s在当前字符串中出现了几次?(作为连续子串) 你必须在线支 ...

  6. [Vue + TS] Use Properties in Vue Components Using @Prop Decorator with TypeScript

    With properties we can follow a one-way parent→child flow communication between components. This les ...

  7. HTML高级标签之表格标签

    前面学习了一下HTML的经常使用标签, 今天開始高级标签之路! 一.表格标签 1.作用: 创建一张表格 2.各属性作用: <table cellspacing="0" cel ...

  8. HDU1203 I NEED A OFFER! 【贪心】

    I NEED A OFFER! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  9. xcode6.3 模版位置

    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templ ...

  10. touch、touchevent-事件总结

    1.废话不多说,直接上代码,如下 package com.example.mygestrue; import android.support.v7.app.ActionBarActivity; imp ...