......
2023-12-24 20:33:46
发布于:广东
2阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
struct abc{
string name;
string password;
string email;
}a[100000];
int main(){
string u_email;
int n;
cin >> u_email >> n;
for(int i = 1; i <= n; i++)
cin >> a[i].name >> a[i].password >> a[i].email;
bool temp = false;
for(int i = 1; i <= n; i++)
{
if(a[i].email == u_email)
{
for(int j = 0; j < a[i].password.length(); j++)
{
if(a[i].password[j] >= 'a' && a[i].password[j] <= 'z')
a[i].password[j] -= 32;
else if(a[i].password[j] >= 'A' && a[i].password[j] <= 'Z')
a[i].password[j] += 32;
}
cout << a[i].name <<" "<< a[i].password << endl;
temp = true;
}
}
if(!temp) cout << "empty" << endl;
return 0;
}
这里空空如也
有帮助,赞一个