CF 1722A. Spell Check
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.
Input
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.
Output
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).
--------------------------------
帖木兒喜歡他的名字。 作為他名字的拼寫,他允許名字字母的任何排列。 例如,以下字符串是他名字的有效拼寫:Timur、miurT、Trumi、mriTu。 請注意,正確的拼寫必須是大寫的 T 和小寫的其他字母。
今天他寫了長度為 n 的字符串 s,僅由大寫或小寫拉丁字母組成。 他要求你檢查 s 是否是他名字的正確拼寫。
輸入
輸入的第一行包含一個整數(shù) t (1≤t≤103) — 測試用例的數(shù)量。
每個測試用例的第一行包含一個整數(shù)n(1≤n≤10)——字符串s的長度。
每個測試用例的第二行包含一個僅由大寫或小寫拉丁字符組成的字符串 s。
輸出
對于每個測試用例,如果 s 滿足條件,則輸出“YES”(不帶引號),否則輸出“NO”(不帶引號)。
您可以在任何情況下輸出答案(例如,字符串“yEs”、“yes”、“Yes”和“YES”將被識別為肯定答案)。
---------------------
字符串排序,合并匹配問題,easy題目;
下面是代碼: