{"problem":{"name":"A. Artwork","description":{"content":"The complete problemset is available on http://maratona.ime.usp.br/primfase19/provas/competicao/maratona_en.pdf ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10234A"},"statements":[{"statement_type":"Markdown","content":"The complete problemset is available on http://maratona.ime.usp.br/primfase19/provas/competicao/maratona_en.pdf\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ a_1, a_2 \\in \\mathbb{Z}^+ $ be the number of players in team 1 and team 2, respectively.  \nLet $ k_1, k_2 \\in \\mathbb{Z}^+ $ be the red card thresholds for team 1 and team 2, respectively.  \nLet $ n \\in \\mathbb{Z}^+ $ be the total number of yellow cards distributed, with $ 1 \\le n \\le a_1 k_1 + a_2 k_2 $.  \n\nLet $ x_i \\in \\mathbb{Z}_{\\ge 0} $ be the number of yellow cards received by the $ i $-th player in team 1 ($ i = 1, \\dots, a_1 $).  \nLet $ y_j \\in \\mathbb{Z}_{\\ge 0} $ be the number of yellow cards received by the $ j $-th player in team 2 ($ j = 1, \\dots, a_2 $).  \n\n**Constraints**  \n1. $ \\sum_{i=1}^{a_1} x_i + \\sum_{j=1}^{a_2} y_j = n $  \n2. $ 0 \\le x_i \\le k_1 $ for all $ i \\in \\{1, \\dots, a_1\\} $  \n3. $ 0 \\le y_j \\le k_2 $ for all $ j \\in \\{1, \\dots, a_2\\} $  \n\n**Objective**  \nDetermine:  \n- Minimum number of players sent off:  \n  $$\n  \\min \\left( \\sum_{i=1}^{a_1} \\mathbf{1}_{\\{x_i \\ge k_1\\}} + \\sum_{j=1}^{a_2} \\mathbf{1}_{\\{y_j \\ge k_2\\}} \\right)\n  $$  \n- Maximum number of players sent off:  \n  $$\n  \\max \\left( \\sum_{i=1}^{a_1} \\mathbf{1}_{\\{x_i \\ge k_1\\}} + \\sum_{j=1}^{a_2} \\mathbf{1}_{\\{y_j \\ge k_2\\}} \\right)\n  $$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10234A","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}