最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

CF 1722A. Spell Check

2023-08-23 13:21 作者:您是打尖兒還是住店呢  | 我要投稿

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題目;

下面是代碼:


CF 1722A. Spell Check的評論 (共 條)

分享到微博請遵守國家法律
务川| 汝南县| 仙桃市| 夹江县| 霍城县| 凤山市| 武山县| 瓦房店市| 疏附县| 阳江市| 河曲县| 奈曼旗| 会理县| 扶沟县| 陆丰市| 宣汉县| 资溪县| 汝阳县| 萨迦县| 益阳市| 吉水县| 盐山县| 宜章县| 嘉鱼县| 三河市| 嵊泗县| 寿宁县| 北京市| 陆丰市| 遵义市| 高陵县| 大港区| 红原县| 左云县| 和田县| 上高县| 衢州市| 景谷| 新宾| 东港市| 舟山市|