{"raw_statement":[{"iden":"statement","content":"The complete problemset is available on http://maratona.ime.usp.br/primfase19/provas/competicao/maratona_en.pdf\n\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**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  $$","simple_statement":"Given two teams with a1 and a2 players, and card limits k1 and k2 to get sent off, and n total yellow cards shown, find the minimum and maximum number of players that could have been sent off.","has_page_source":false}