A. Artwork

Codeforces
IDCF10234A
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
The complete problemset is available on http://maratona.ime.usp.br/primfase19/provas/competicao/maratona_en.pdf [samples]
**Definitions** Let $ a_1, a_2 \in \mathbb{Z}^+ $ be the number of players in team 1 and team 2, respectively. Let $ k_1, k_2 \in \mathbb{Z}^+ $ be the red card thresholds for team 1 and team 2, respectively. Let $ 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 $. Let $ 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 $). Let $ 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 $). **Constraints** 1. $ \sum_{i=1}^{a_1} x_i + \sum_{j=1}^{a_2} y_j = n $ 2. $ 0 \le x_i \le k_1 $ for all $ i \in \{1, \dots, a_1\} $ 3. $ 0 \le y_j \le k_2 $ for all $ j \in \{1, \dots, a_2\} $ **Objective** Determine: - Minimum number of players sent off: $$ \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) $$ - Maximum number of players sent off: $$ \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) $$
API Response (JSON)
{
  "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, r...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments