嗯?
查看原帖
嗯?
1286347
jiggy_boogy楼主2025/8/1 19:24
#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	string a[100],b[100];
	bool first=true;
	cin>>n;
	for(int i=0;i<n;i++){
	  cin>>a[i]>>b[i];
	} 
	string s,temp;
	string db="!()-.[].{}\\|;:\'\",./?<>";
	cin>>s;
	for(int i=0;i<s.size();i++){
		if(db.find(s[i])!=string::npos){
			for(int j=0;j<n;j++){
				if(a[j]==temp){
					if(b[j]!= && first==true){
						cout<<"UNK";
						first=false;
					}
					else if(b[j]!=::){
						cout<<".UNK";
					}
					else{
						cout<<'.'<<b[j];
					}
				}
			}
		}
		else{
			temp+=s[i];
		}
	}
	return 0;
}














2025/8/1 19:24
加载中...