跳到正文

题解

题解:B3759 [信息与未来 2021] 文本分类

easy42约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年3月21日
篇幅
约 1 分钟
题目
B3759

版本

  1. v1当前

中文。

Let’s explore our intuition.

There is no th in Pinyin, but it is quite common in English, such as in th and these.

You can make a direct judgment.

Code:

The code uses the getline and find functions and is extremely short.

C++
#include<bits/stdc++.h>
using namespace std;
int t,n;
string s;
int main(){
	cin>>t;
	while(t--){
		cin>>n;
		getline(cin,s);
		if(int(s.find("th"))!=-1) cout<<"English\n";
		else cout<<"Pinyin\n";
	}
	return 0;
}
原文