{"problem":{"name":"A. Smiley Faces (A)","description":{"content":"Mr. Light got some pieces of paper, each contains one of the three symbols: '.', ':', and ')'. He wants to use these pieces to form as many smiley faces as possible. To form one smiley face he needs ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10140A"},"statements":[{"statement_type":"Markdown","content":"Mr. Light got some pieces of paper, each contains one of the three symbols: '.', ':', and ')'.\n\nHe wants to use these pieces to form as many smiley faces as possible. To form one smiley face he needs one piece with a bracket ')' on it and either two pieces with dots '.', or one piece with a colon ':'.\n\nMr. Light has A, B, and C of each symbol of '.', ':', ad ')', respectively. What is the maximum number of smiley faces he can form?\n\nThe input contains three space-separated integers A B C (0 ≤ A, B, C ≤ 100), the number of pieces with each symbol of '.', ':', and ')', respectively.\n\nPrint the maximum number of smiley faces Mr. Light can form, on a single line.\n\n## Input\n\nThe input contains three space-separated integers A B C (0 ≤ A, B, C ≤ 100), the number of pieces with each symbol of '.', ':', and ')', respectively.\n\n## Output\n\nPrint the maximum number of smiley faces Mr. Light can form, on a single line.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ A, B, C \\in \\mathbb{Z}_{\\geq 0} $ denote the counts of symbols '.', ':', and ')', respectively.\n\n**Constraints**  \n$ 0 \\leq A, B, C \\leq 100 $\n\n**Objective**  \nMaximize the number of smiley faces $ S $, where each smiley requires:  \n- One ')' (i.e., consumes 1 from $ C $), and  \n- Either:  \n  - Two '.' (i.e., consumes 2 from $ A $), or  \n  - One ':' (i.e., consumes 1 from $ B $).\n\nLet $ x $ be the number of smileys formed using two '.' and one ')',  \nand $ y $ be the number of smileys formed using one ':' and one ')'.  \n\nThen:  \n$$\nS = x + y\n$$  \nsubject to:  \n$$\n2x \\leq A, \\quad y \\leq B, \\quad x + y \\leq C, \\quad x, y \\in \\mathbb{Z}_{\\geq 0}\n$$\n\nMaximize $ S = x + y $ under these constraints.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10140A","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}