-
Notifications
You must be signed in to change notification settings - Fork 0
/
1035.cpp
52 lines (47 loc) · 1006 Bytes
/
1035.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char const *argv[])
{
// vector<pair<string, string> > ori;
vector<pair<string, string> > v;
int n;
cin >> n;
string id, pword;
bool flag = false;
for(int i = 0; i < n; ++i) {
flag = false;
cin >> id >> pword;
for(int j = 0; j < pword.size(); ++j) {
if(pword[j] == '1')
pword[j] = '@';
else if(pword[j] == '0')
pword[j] = '%';
else if(pword[j] == 'l')
pword[j] = 'L';
else if(pword[j] == 'O')
pword[j] = 'o';
else
continue;
flag = true;
}
if(flag)
v.push_back(pair<string, string>(id, pword));
}
if(0 == v.size()) {
if(1 == n) {
cout << "There is 1 account and no account is modified" << endl;
}
else {
cout << "There are " << n << " accounts and no account is modified" << endl;
}
}
else {
cout << v.size() << endl;
for(int i = 0; i < v.size(); ++i) {
cout << v[i].first << " " << v[i].second << endl;
}
}
return 0;
}