04. Labyrinth-4

Codeforces
IDCF92104
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 number of candles. Let $ h = (h_1, h_2, \dots, h_n) $ be a sequence of positive integers representing the heights of the candles. **Constraints** $ 1 \le n \le 100 $, $ 1 \le h_i \le 100 $ for all $ i \in \{1, \dots, n\} $. **Objective** Compute the minimum number of blows required to extinguish all candles, where each blow extinguishes all candles in a contiguous segment of height at most $ k $, and $ k $ is chosen optimally (i.e., minimize the number of blows over all possible $ k \ge 1 $). Equivalently: Find $$ \min_{k \ge 1} \left( \text{minimum number of contiguous segments needed to cover all candles, such that each segment contains only candles with } h_i \le k \right) $$
API Response (JSON)
{
  "problem": {
    "name": "04. Labyrinth-4",
    "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": "CF92104"
  },
  "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 number of candles.  \nLet $ h = (h_1, h_2, \\dots, h_n) $ be a sequence of positive integers representing the heights of the candles.  \n\n**Constraints...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments