注意 is 和 are 注意 account 和accounts!!!
注意 is 和 are 注意 account 和accounts!!!
注意 is 和 are 注意 account 和accounts!!!
#include <iostream>
#include <string>
#include <vector>
#define MAX 1010
using namespace std;
bool Convert(string & s) {
bool tag = false;
for (int i = 0; i < s.size(); i++) {
switch (s[i]) {
case '1':s[i] = '@', tag = true; break;
case 'l':s[i] = 'L', tag = true; break;
case 'O':s[i] = 'o', tag = true; break;
case '0':s[i] = '%', tag = true; break;
}
}
return tag;
}
struct User{
string name;
string password;
};
User list[MAX];
vector <bool> isChange;
int Count = 0;
int main() {
int N;
cin >> N;
isChange.resize(N,false);
bool tag = false;
for (int i = 0; i < N; i++) {
cin >> list[i].name >> list[i].password;
isChange[i] = Convert(list[i].password);
if (isChange[i]) {
Count++;
tag = true;
}
}
if (!tag) {
if(N == 1)
cout << "There is " << N << " account and no account is modified" << endl;
else
cout << "There are " << N << " accounts and no account is modified" << endl;
}
else {
cout << Count << endl;
for (int i = 0; i < N; i++) {
if (isChange[i]) {
cout << list[i].name << " " << list[i].password << endl;
}
}
}
system("pause");
return 0;
}