{"problem":{"name":"A. New Year and Counting Cards","description":{"content":"Your friend has _n_ cards. You know that each card has a lowercase English letter on one side and a digit on the other. Currently, your friend has laid out the cards on a table so only one side of e","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF908A"},"statements":[{"statement_type":"Markdown","content":"Your friend has _n_ cards.\n\nYou know that each card has a lowercase English letter on one side and a digit on the other.\n\nCurrently, your friend has laid out the cards on a table so only one side of each card is visible.\n\nYou would like to know if the following statement is true for cards that your friend owns: \"If a card has a vowel on one side, then it has an even digit on the other side.\" More specifically, a vowel is one of '_a_', '_e_', '_i_', '_o_' or '_u_', and even digit is one of '_0_', '_2_', '_4_', '_6_' or '_8_'.\n\nFor example, if a card has '_a_' on one side, and '_6_' on the other side, then this statement is true for it. Also, the statement is true, for example, for a card with '_b_' and '_4_', and for a card with '_b_' and '_3_' (since the letter is not a vowel). The statement is false, for example, for card with '_e_' and '_5_'. You are interested if the statement is true for all cards. In particular, if no card has a vowel, the statement is true.\n\nTo determine this, you can flip over some cards to reveal the other side. You would like to know what is the minimum number of cards you need to flip in the worst case in order to verify that the statement is true.\n\n## Input\n\nThe first and only line of input will contain a string _s_ (1 ≤ |_s_| ≤ 50), denoting the sides of the cards that you can see on the table currently. Each character of _s_ is either a lowercase English letter or a digit.\n\n## Output\n\nPrint a single integer, the minimum number of cards you must turn over to verify your claim.\n\n[samples]\n\n## Note\n\nIn the first sample, we must turn over both cards. Note that even though both cards have the same letter, they could possibly have different numbers on the other side.\n\nIn the second sample, we don't need to turn over any cards. The statement is vacuously true, since you know your friend has no cards with a vowel on them.\n\nIn the third sample, we need to flip the second and fourth cards.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"你的朋友有 #cf_span[n] 张卡片。\n\n你知道每张卡片的一面是小写英文字母，另一面是数字。\n\n目前，你的朋友将卡片摊在桌面上，使得每张卡片只有一面可见。\n\n你想知道以下陈述对于你朋友拥有的所有卡片是否成立：“如果一张卡片的一面是元音字母，则另一面是偶数数字。” 更具体地说，元音字母是 '_a_'、'_e_'、'_i_'、'_o_' 或 '_u_'，偶数数字是 '_0_'、'_2_'、'_4_'、'_6_' 或 '_8_'。\n\n例如，如果一张卡片一面是 '_a_'，另一面是 '_6_'，则该陈述对此卡片成立。同样，对于一面是 '_b_' 和 '_4_' 的卡片，或一面是 '_b_' 和 '_3_' 的卡片，该陈述也成立（因为字母不是元音）。但对于一面是 '_e_' 和 '_5_' 的卡片，该陈述不成立。你关心的是该陈述是否对所有卡片都成立。特别地，如果没有卡片有元音字母，则该陈述成立。\n\n为了确定这一点，你可以翻转一些卡片以查看另一面。你希望知道，在最坏情况下，为了验证该陈述成立，最少需要翻转多少张卡片。\n\n输入的第一行也是唯一一行包含一个字符串 #cf_span[s]（#cf_span[1 ≤ |s| ≤ 50]），表示当前桌面上可见的卡片一面。#cf_span[s] 中的每个字符要么是小写英文字母，要么是数字。\n\n请输出一个整数，表示为验证你的主张所需翻转的最少卡片数。\n\n在第一个样例中，我们必须翻转两张卡片。注意，即使两张卡片的字母相同，它们另一面的数字也可能不同。\n\n在第二个样例中，我们不需要翻转任何卡片。由于你知道你的朋友没有带元音字母的卡片，该陈述是空真成立的。\n\n在第三个样例中，我们需要翻转第二张和第四张卡片。\n\n## Input\n\n第一行也是唯一一行输入包含一个字符串 #cf_span[s]（#cf_span[1 ≤ |s| ≤ 50]），表示当前桌面上可见的卡片一面。#cf_span[s] 中的每个字符要么是小写英文字母，要么是数字。\n\n## Output\n\n请输出一个整数，表示为验证你的主张所需翻转的最少卡片数。\n\n[samples]\n\n## Note\n\n在第一个样例中，我们必须翻转两张卡片。注意，即使两张卡片的字母相同，它们另一面的数字也可能不同。在第二个样例中，我们不需要翻转任何卡片。该陈述是空真成立的，因为你知道你的朋友没有带元音字母的卡片。在第三个样例中，我们需要翻转第二张和第四张卡片。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ s \\in \\{ \\text{lowercase letters} \\} \\cup \\{ \\text{digits} \\}^* $ be the string representing the visible sides of $ n = |s| $ cards.  \nLet $ V = \\{ \\texttt{a}, \\texttt{e}, \\texttt{i}, \\texttt{o}, \\texttt{u} \\} $ be the set of vowels.  \nLet $ E = \\{ \\texttt{0}, \\texttt{2}, \\texttt{4}, \\texttt{6}, \\texttt{8} \\} $ be the set of even digits.  \n\nFor each card $ i \\in \\{1, \\dots, n\\} $, let $ v_i \\in s $ be the visible side. The hidden side is unknown and must be either a letter (if $ v_i $ is a digit) or a digit (if $ v_i $ is a letter).  \n\nThe statement to verify:  \n> If the hidden side is a vowel, then the other side is an even digit.  \nEquivalently: For each card, if one side is a vowel, the other must be even; if one side is an odd digit, the other must not be a vowel.  \n\n**Constraints**  \n1. $ 1 \\leq |s| \\leq 50 $  \n2. Each character in $ s $ is either a lowercase English letter or a digit.  \n\n**Objective**  \nFind the minimum number of cards to flip to verify the implication:  \n$$ \\forall i \\in \\{1, \\dots, n\\}, \\quad \\text{if } v_i \\in V \\text{ then hidden side} \\in E \\quad \\text{and} \\quad \\text{if } v_i \\in D \\setminus E \\text{ then hidden side} \\notin V $$  \nwhere $ D $ is the set of digits.  \n\nThus, flip cards where:  \n- $ v_i \\in V $ (vowel visible → must check if hidden digit is even),  \n- $ v_i \\in D \\setminus E $ (odd digit visible → must check if hidden letter is not a vowel).  \n\nDo **not** flip:  \n- $ v_i \\notin V \\cup (D \\setminus E) $, i.e., consonants or even digits (statement holds regardless of hidden side).  \n\n**Answer**  \n$$\n\\boxed{ \\left| \\left\\{ i \\mid s_i \\in V \\right\\} \\right| + \\left| \\left\\{ i \\mid s_i \\in \\{ \\texttt{1}, \\texttt{3}, \\texttt{5}, \\texttt{7}, \\texttt{9} \\} \\right\\} \\right| }\n$$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF908A","tags":["brute force","implementation"],"sample_group":[["ee","2"],["z","0"],["0ay1","2"]],"created_at":"2026-03-03 11:00:39"}}