{"problem":{"name":"A. Olympiad","description":{"content":"The recent All-Berland Olympiad in Informatics featured _n_ participants with each scoring a certain amount of points. As the head of the programming committee, you are to determine the set of partic","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF937A"},"statements":[{"statement_type":"Markdown","content":"The recent All-Berland Olympiad in Informatics featured _n_ participants with each scoring a certain amount of points.\n\nAs the head of the programming committee, you are to determine the set of participants to be awarded with diplomas with respect to the following criteria:\n\n*   At least one participant should get a diploma.\n*   None of those with score equal to zero should get awarded.\n*   When someone is awarded, all participants with score **not less** than his score should also be awarded.\n\nDetermine the number of ways to choose a subset of participants that will receive the diplomas.\n\n## Input\n\nThe first line contains a single integer _n_ (1 ≤ _n_ ≤ 100) — the number of participants.\n\nThe next line contains a sequence of _n_ integers _a_1, _a_2, ..., _a__n_ (0 ≤ _a__i_ ≤ 600) — participants' scores.\n\nIt's guaranteed that at least one participant has non-zero score.\n\n## Output\n\nPrint a single integer — the desired number of ways.\n\n[samples]\n\n## Note\n\nThere are three ways to choose a subset in sample case one.\n\n1.  Only participants with 3 points will get diplomas.\n2.  Participants with 2 or 3 points will get diplomas.\n3.  Everyone will get a diploma!\n\nThe only option in sample case two is to award everyone.\n\nNote that in sample case three participants with zero scores cannot get anything.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"最近的全俄罗斯信息学奥林匹克竞赛有 #cf_span[n] 名参赛者，每人获得一定的分数。\n\n作为编程委员会主席，你需要根据以下标准确定授予奖状的参赛者集合：\n\n计算选择获得奖状的参赛者子集的方式数。\n\n第一行包含一个整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 100]) —— 参赛者人数。\n\n第二行包含一个包含 #cf_span[n] 个整数的序列 #cf_span[a1, a2, ..., an] (#cf_span[0 ≤ ai ≤ 600]) —— 参赛者的分数。\n\n保证至少有一名参赛者的分数非零。\n\n请输出一个整数 —— 所需的方式数。\n\n在第一个样例中，有三种选择子集的方式。\n\n第二个样例中唯一的选项是授予所有人。\n\n注意：在第三个样例中，分数为零的参赛者无法获得任何奖状。\n\n## Input\n\n第一行包含一个整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 100]) —— 参赛者人数。第二行包含一个包含 #cf_span[n] 个整数的序列 #cf_span[a1, a2, ..., an] (#cf_span[0 ≤ ai ≤ 600]) —— 参赛者的分数。保证至少有一名参赛者的分数非零。\n\n## Output\n\n请输出一个整数 —— 所需的方式数。\n\n[samples]\n\n## Note\n\n在第一个样例中，有三种选择子集的方式：仅授予得 3 分的参赛者；授予得 2 分或 3 分的参赛者；授予所有人。第二个样例中唯一的选项是授予所有人。注意：在第三个样例中，分数为零的参赛者无法获得任何奖状。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of participants.  \nLet $ A = (a_1, a_2, \\dots, a_n) $ be a sequence of non-negative integers representing participants' scores, with $ \\max(A) > 0 $.  \n\nLet $ M = \\max(A) $ be the maximum score.  \n\n**Constraints**  \n1. $ 1 \\leq n \\leq 100 $  \n2. $ 0 \\leq a_i \\leq 600 $ for all $ i \\in \\{1, \\dots, n\\} $  \n3. $ M > 0 $  \n\n**Objective**  \nCount the number of non-empty subsets $ S \\subseteq \\{1, \\dots, n\\} $ such that:  \n$$\n\\forall i \\in S,\\ a_i = M\n$$  \nThat is, only participants with the maximum score may be awarded, and at least one such participant must be selected.  \n\nLet $ k = |\\{ i \\mid a_i = M \\}| $.  \nThen the number of valid subsets is:  \n$$\n2^k - 1\n$$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF937A","tags":["implementation","sortings"],"sample_group":[["4\n1 3 3 2","3"],["3\n1 1 1","1"],["4\n42 0 0 42","1"]],"created_at":"2026-03-03 11:00:39"}}