QOJ.ac

QOJ

時間限制: 3.0 s 記憶體限制: 256 MB 總分: 100

#15908. 化学家的誓言

统计

化学家 Clara 发下了一个庄严的誓言——从现在起,她只能说出化学元素的符号。 当然,这限制了她的表达能力。例如,她可以说 “I Am CLaRa”(因为 I 是碘的符号,Am 是镅,C 是碳,以此类推)。她也可以说 “InTeRnAtIONAl”,但在说 “collegiate”、“programming” 和 “contest” 时却遇到了很大困难。

给定一个单词,请判断 Clara 是否能说出它(即该单词是否为原子符号的拼接)。如果没有你的帮助,她可能只能选择保持沉默!

你可以忽略大小写,因为 Clara 本来就无法说出大写字母。如果你忘记了元素的符号,这里是完整的元素周期表:

H He Li Be B C N O F Ne Na Mg Al Si P S Cl Ar K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn Fr Ra ** Rf Db Sg Bh Hs Mt Ds Rg Cn Fl Lv La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu ** Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr

输入格式

输入的第一行包含测试用例的数量 $T$。接下来是各个测试用例的描述: 每个测试用例是一个由英文字母组成的单个小写单词。单词长度为正数且不超过 $50\,000$。

输出格式

按输入顺序输出每个测试用例的答案。对于每个测试用例,如果 Clara 能说出该单词,则输出一行 YES,否则输出 NO。

样例

输入 1

4
international
collegiate
programming
contest

输出 1

YES
NO
NO
NO

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.