B. Baby Bites

Codeforces
IDCF10193B
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Arild just turned $1$ year old, and is currently learning how to count. His favorite thing to count is how many mouthfuls he has in a meal: every time he gets a bite, he will count it by saying the number out loud. Unfortunately, talking while having a mouthful sometimes causes Arild to mumble incomprehensibly, making it hard to know how far he has counted. Sometimes you even suspect he loses his count! You decide to write a program to determine whether Arild's counting makes sense or not. The first line of input contains an integer $n$ ($1 <= n <= 1 thin 000$), the number of bites Arild receives. Then second line contains $n$ space-separated words spoken by Arild, the $i$'th of which is either a non-negative integer $a_i$ ($0 <= a_i <= 10 thin 000$) or the string "_mumble_". If Arild's counting might make sense, print the string "_makes sense_". Otherwise, print the string "_something is fishy_". ## Input The first line of input contains an integer $n$ ($1 <= n <= 1 thin 000$), the number of bites Arild receives. Then second line contains $n$ space-separated words spoken by Arild, the $i$'th of which is either a non-negative integer $a_i$ ($0 <= a_i <= 10 thin 000$) or the string "_mumble_". ## Output If Arild's counting might make sense, print the string "_makes sense_". Otherwise, print the string "_something is fishy_". [samples]
**Definitions** Let $ n \in \mathbb{Z} $ be the number of bites. Let $ W = (w_1, w_2, \dots, w_n) $ be a sequence of words, where each $ w_i $ is either a non-negative integer $ a_i \in \mathbb{Z}_{\geq 0} $ or the string "mumble". **Constraints** 1. $ 1 \leq n \leq 1000 $ 2. For each $ i \in \{1, \dots, n\} $: - If $ w_i \neq \text{"mumble"} $, then $ w_i = a_i $ for some $ a_i \in \mathbb{Z} $ with $ 0 \leq a_i \leq 10000 $. **Objective** Determine whether there exists an assignment of integers to "mumble" positions such that for all $ i \in \{1, \dots, n\} $: $$ w_i = i \quad \text{(if not "mumble")} $$ If such an assignment exists, output "makes sense"; otherwise, output "something is fishy".
API Response (JSON)
{
  "problem": {
    "name": "B. Baby Bites",
    "description": {
      "content": "Arild just turned $1$ year old, and is currently learning how to count. His favorite thing to count is how many mouthfuls he has in a meal: every time he gets a bite, he will count it by saying the nu",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10193B"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Arild just turned $1$ year old, and is currently learning how to count. His favorite thing to count is how many mouthfuls he has in a meal: every time he gets a bite, he will count it by saying the nu...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of bites.  \nLet $ W = (w_1, w_2, \\dots, w_n) $ be a sequence of words, where each $ w_i $ is either a non-negative integer $ a_i \\in \\mathbb{Z}...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments