#include <iostream>
#include <cstdio>
#include <string>
#include <unordered_map>
using namespace std;
int main(){
int n;
cin>>n;
unordered_map<string, string> mp;
unordered_map<string, bool> st;
string ln, no, pw;
while(n--){
cin>>ln>>no>>pw;
if(ln == "N"){
if(st[no] == false){
st[no] = true;
cout<<"New: OK"<<endl;
mp[no] = pw;
}else{
cout<<"ERROR: Exist"<<endl;
}
}else{
if(st[no]==false) cout<<"ERROR: Not Exist"<<endl;
else if(mp[no]==pw) cout<<"Login: OK"<<endl;
else cout<<"ERROR: Wrong PW"<<endl;
}
}
return 0;
}
7-15 QQ帐户的申请与登陆 (25 分)
最新推荐文章于 2024-03-23 01:43:08 发布