这个题有更简单的做法
查看原帖
这个题有更简单的做法
767660
zhaohanwen楼主2023/5/3 16:14

可以对一些英语单词特判(文本都来自真实、易于人类阅读的文本。)

#include<bits/stdc++.h>
using namespace std;
int main(){
	int t;
	cin>>t;
	for(int i=0;i<t;i++)
	{
		int s;
		cin>>s;
		int y=0;
		for(int i=0;i<s;i++)
		{
			string temp;
			cin>>temp;
			if(temp=="is" or temp=="this" or temp=="that" or temp=="of" or temp=="the" or temp=="are" or temp=="it" or temp=="but" or temp=="so" or temp=="and" or temp=="to")
			{
				y=1;
			}
		}
		if(y==1) cout<<"English"<<endl;
		else if (y==0) cout<<"Pinyin"<<endl;
	 } 
    return 0;
}
2023/5/3 16:14
加载中...