{"raw_statement":[{"iden":"statement","content":"Harry Potter is on a mission to destroy You-Know-Who's Horcruxes. The first Horcrux that he encountered in the Chamber of Secrets is Tom Riddle's diary. The diary was with Ginny and it forced her to open the Chamber of Secrets. Harry wants to know the different people who had ever possessed the diary to make sure they are not under its influence.\n\nHe has names of _n_ people who possessed the diary in order. You need to tell, for each person, if he/she possessed the diary at some point before or not.\n\nFormally, for a name _s__i_ in the _i_\\-th line, output \"_YES_\" (without quotes) if there exists an index _j_ such that _s__i_ = _s__j_ and _j_ < _i_, otherwise, output \"_NO_\" (without quotes)."},{"iden":"input","content":"First line of input contains an integer _n_ (1 ≤ _n_ ≤ 100) — the number of names in the list.\n\nNext _n_ lines each contain a string _s__i_, consisting of lowercase English letters. The length of each string is between 1 and 100."},{"iden":"output","content":"Output _n_ lines each containing either \"_YES_\" or \"_NO_\" (without quotes), depending on whether this string was already present in the stream or not.\n\nYou can print each letter in any case (upper or lower)."},{"iden":"examples","content":"Input\n\n6\ntom\nlucius\nginny\nharry\nginny\nharry\n\nOutput\n\nNO\nNO\nNO\nNO\nYES\nYES\n\nInput\n\n3\na\na\na\n\nOutput\n\nNO\nYES\nYES"},{"iden":"note","content":"In test case 1, for _i_ = 5 there exists _j_ = 3 such that _s__i_ = _s__j_ and _j_ < _i_, which means that answer for _i_ = 5 is \"_YES_\"."}],"translated_statement":[{"iden":"statement","content":"哈利·波特正在执行摧毁伏地魔魂器的任务。他在密室中遇到的第一个魂器是汤姆·里德尔的日记。这本日记曾被金妮持有，并迫使她打开了密室。哈利想知道所有曾经持有过这本日记的人，以确保他们没有受到日记的影响。\n\n他拥有按顺序记录的 #cf_span[n] 个曾持有日记的人的名字。你需要对每个人判断：他/她是否在之前某个时刻已经持有过这本日记。\n\n形式化地，对于第 #cf_span[i] 行中的名字 #cf_span[si]，如果存在一个下标 #cf_span[j] 使得 #cf_span[si = sj] 且 #cf_span[j < i]，则输出 \"_YES_\"（不含引号）；否则输出 \"_NO_\"（不含引号）。\n\n输入的第一行包含一个整数 #cf_span[n]（#cf_span[1 ≤ n ≤ 100]）——列表中名字的数量。\n\n接下来的 #cf_span[n] 行，每行包含一个字符串 #cf_span[si]，由小写英文字母组成，每个字符串的长度在 #cf_span[1] 到 #cf_span[100] 之间。\n\n请输出 #cf_span[n] 行，每行包含 \"_YES_\" 或 \"_NO_\"（不含引号），取决于该字符串是否在之前已经出现过。\n\n你可以以任意大小写形式输出每个字母。\n\n在测试用例 #cf_span[1] 中，对于 #cf_span[i = 5]，存在 #cf_span[j = 3] 使得 #cf_span[si = sj] 且 #cf_span[j < i]，因此 #cf_span[i = 5] 的答案为 \"_YES_\"。"},{"iden":"input","content":"输入的第一行包含一个整数 #cf_span[n]（#cf_span[1 ≤ n ≤ 100]）——列表中名字的数量。接下来的 #cf_span[n] 行，每行包含一个字符串 #cf_span[si]，由小写英文字母组成，每个字符串的长度在 #cf_span[1] 到 #cf_span[100] 之间。"},{"iden":"output","content":"请输出 #cf_span[n] 行，每行包含 \"_YES_\" 或 \"_NO_\"（不含引号），取决于该字符串是否在之前已经出现过。你可以以任意大小写形式输出每个字母。"},{"iden":"examples","content":"输入\n6\ntom\nlucius\nginny\nharry\nginny\nharry\n输出\nNO\nNO\nNO\nNO\nYES\nYES\n\n输入\n3\na\na\na\n输出\nNO\nYES\nYES"},{"iden":"note","content":"在测试用例 #cf_span[1] 中，对于 #cf_span[i = 5]，存在 #cf_span[j = 3] 使得 #cf_span[si = sj] 且 #cf_span[j < i]，因此 #cf_span[i = 5] 的答案为 \"_YES_\"。"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of names.  \nLet $ S = (s_1, s_2, \\dots, s_n) $ be a sequence of strings, where each $ s_i $ consists of lowercase English letters.\n\n**Constraints**  \n1. $ 1 \\leq n \\leq 100 $  \n2. For each $ i \\in \\{1, \\dots, n\\} $, $ 1 \\leq |s_i| \\leq 100 $, and $ s_i \\in \\{a, b, \\dots, z\\}^* $\n\n**Objective**  \nFor each $ i \\in \\{1, \\dots, n\\} $, output:  \n$$\n\\begin{cases}\n\\text{\"YES\"} & \\text{if } \\exists j < i \\text{ such that } s_j = s_i \\\\\n\\text{\"NO\"} & \\text{otherwise}\n\\end{cases}\n$$","simple_statement":null,"has_page_source":false}