05. Labyrinth-5

Codeforces
IDCF92105
Time8000ms
Memory512MB
Difficulty
English · Original
Chinese · Translation
Formal · Original
See the problem statement here: [http://codeforces.com/contest/921/problem/01](//codeforces.com/contest/921/problem/01). [samples]
请参见此处的问题描述:http://codeforces.com/contest/921/problem/01. [samples]
**Definitions** Let $ n \in \mathbb{Z}^+ $ be the length of the sequence. Let $ A = (a_1, a_2, \dots, a_n) $ be a sequence of positive integers. **Constraints** 1. $ 1 \leq n \leq 100 $ 2. $ 1 \leq a_i \leq 100 $ for all $ i \in \{1, \dots, n\} $ **Objective** Find the minimum number of elements to remove from $ A $ such that the resulting sequence has an alternating sum of zero, i.e., $$ \sum_{i=1}^{m} (-1)^{i-1} b_i = 0 $$ where $ B = (b_1, b_2, \dots, b_m) $ is the subsequence of $ A $ after removals, preserving order.
API Response (JSON)
{
  "problem": {
    "name": "05. Labyrinth-5",
    "description": {
      "content": "See the problem statement here: [http://codeforces.com/contest/921/problem/01](//codeforces.com/contest/921/problem/01).",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 8000,
      "memory_limit": 524288
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF92105"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "See the problem statement here: [http://codeforces.com/contest/921/problem/01](//codeforces.com/contest/921/problem/01).\n\n[samples]...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "请参见此处的问题描述:http://codeforces.com/contest/921/problem/01.\n\n[samples]...",
      "is_translate": true,
      "language": "Chinese"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the length of the sequence.  \nLet $ A = (a_1, a_2, \\dots, a_n) $ be a sequence of positive integers.\n\n**Constraints**  \n1. $ 1 \\leq n \\leq 100 $  \n2. $ ...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments