CF1722A.Spell Check
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Timur likes his name. As a spelling of his name, he allows any permutation of the letters of the name. For example, the following strings are valid spellings of his name: Timur, miurT, Trumi, mriTu. Note that the correct spelling must have uppercased T and lowercased other letters.
Today he wrote string s of length n consisting only of uppercase or lowercase Latin letters. He asks you to check if s is the correct spelling of his name.
蒂穆尔很喜欢自己的名字。对于他名字的拼写,他允许名字中字母的任意排列。例如,以下字符串都是他名字的有效拼写:Timur、miurT、Trumi、mriTu。注意,正确的拼写必须满足:字母 T 为大写,其余字母均为小写。
今天,他写了一个长度为 n 的字符串 s,该字符串仅由大写或小写的拉丁字母组成。他请你检查 s 是否是他名字的正确拼写。
输入格式
The first line of the input contains an integer t (1≤t≤103) — the number of test cases.
The first line of each test case contains an integer n (1≤n≤10) — the length of string s.
The second line of each test case contains a string s consisting of only uppercase or lowercase Latin characters.
输入的第一行包含一个整数 t(1≤t≤103)—— 表示测试用例的数量。
每个测试用例的第一行包含一个整数 n(1≤n≤10)—— 表示字符串 s 的长度。
每个测试用例的第二行包含一个字符串 s,该字符串仅由大写或小写的拉丁字母组成。
输出格式
For each test case, output "YES" (without quotes) if s satisfies the condition, and "NO" (without quotes) otherwise.
You can output the answer in any case (for example, the strings "yEs", "yes", "Yes" and "YES" will be recognized as a positive answer).
对于每个测试用例,如果字符串 s 满足条件,则输出 "YES"(不带引号);否则输出 "NO"(不带引号)。
您可以以任意大小写形式输出答案(例如,字符串 "yEs"、"yes"、"Yes" 和 "YES" 均会被识别为肯定回答)。
输入输出样例
输入#1
10 5 Timur 5 miurT 5 Trumi 5 mriTu 5 timur 4 Timr 6 Timuur 10 codeforces 10 TimurTimur 5 TIMUR
输出#1
YES YES YES YES NO NO NO NO NO NO
输入解题思路,AI测评打分。不知道怎么写?