Jabber IDAI (CI翻译)
Jabber ID on the national Berland service «Babber» has a form <username>@<hostname>[/resource], where
Jabber ID 在 Berland 国家服务 «Babber» 上的格式为 <username>@<hostname>[/resource],其中:AI (CI翻译)
<username>— is a sequence of Latin letters (lowercase or uppercase), digits or underscores characters «_», the length of<username>is between 1 and 16, inclusive.<hostname>— is a sequence of word separated by periods (characters «.»), where each word should contain only characters allowed for<username>, the length of each word is between 1 and 16, inclusive. The length of<hostname>is between 1 and 32, inclusive.<resource>— is a sequence of Latin letters (lowercase or uppercase), digits or underscores characters «_», the length of<resource>is between 1 and 16, inclusive.
<username>— 由拉丁字母(小写或大写)、数字或下划线字符 «_» 组成的序列,<username>的长度在 1 到 16 之间(包括 1 和 16)。<hostname>— 由单词组成的序列,单词之间使用句点(字符 «.»)分隔。每个单词只能包含<username>中允许的字符,且每个单词的长度在 1 到 16 之间(包括 1 和 16)。<hostname>的长度在 1 到 32 之间(包括 1 和 32)。<resource>— 由拉丁字母(小写或大写)、数字或下划线字符 «_» 组成的序列,<resource>的长度在 1 到 16 之间(包括 1 和 16)。
The content of square brackets is optional — it can be present or can be absent.
方括号中的内容是可选的,可以存在,也可以省略。AI (CI翻译)
There are the samples of correct Jabber IDs: mike@codeforces.com, 007@en.codeforces.com/contest.
以下是正确的 Jabber ID 示例:mike@codeforces.com、007@en.codeforces.com/contest。AI (CI翻译)
Your task is to write program which checks if given string is a correct Jabber ID.
你的任务是编写一个程序,检查给定的字符串是否为正确的 Jabber ID。AI (CI翻译)
Input
输入格式
AI (CI翻译)The input contains of a single line. The line has the length between 1 and 100 characters, inclusive. Each characters has ASCII-code between 33 and 127, inclusive.
输入包含一行。该行的长度在 1 到 100 之间(包括 1 和 100)。每个字符的 ASCII 码在 33 到 127 之间(包括 33 和 127)。AI (CI翻译)
Output
输出格式
AI (CI翻译)Print YES or NO.
输出 YES 或 NO。AI (CI翻译)
样例
mike@codeforces.com
YES
john.smith@codeforces.ru/contest.icpc/12
NO
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。