I. Substring

Codeforces
IDCF10100I
Time2000ms
Memory64MB
Difficulty
English · Original
Formal · Original
Given an array of positive integers, count the number of substrings with the following properties: The input will contain on the first line one integer (. The second line contains numbers and the array for which we want the solution is obtained as following: . Both arrays and are 0-indexed. The output will contain the number of substrings with the given properties. ## Input The input will contain on the first line one integer (. The second line contains numbers and the array for which we want the solution is obtained as following: . Both arrays and are 0-indexed. ## Output The output will contain the number of substrings with the given properties. [samples]
**Definitions** Let $ n \in \mathbb{Z}^+ $ be the length of the array. Let $ a = (a_0, a_1, \dots, a_{n-1}) $ be a sequence of positive integers. **Constraints** 1. $ 1 \leq n \leq \text{given bound} $ (incomplete in input) 2. $ a_i \in \mathbb{Z}^+ $ for all $ i \in \{0, 1, \dots, n-1\} $ **Objective** Count the number of substrings $ a[i:j] = (a_i, a_{i+1}, \dots, a_{j-1}) $ for $ 0 \leq i < j \leq n $ satisfying unspecified properties. **Note**: The desired properties of the substrings are not specified in the input.
API Response (JSON)
{
  "problem": {
    "name": "I. Substring",
    "description": {
      "content": "Given an array of positive integers, count the number of substrings with the following properties:  The input will contain on the first line one integer (. The second line contains  numbers  and the ",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 65536
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10100I"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Given an array of positive integers, count the number of substrings with the following properties: \n\nThe input will contain on the first line one integer (. The second line contains  numbers  and the ...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the length of the array.  \nLet $ a = (a_0, a_1, \\dots, a_{n-1}) $ be a sequence of positive integers.  \n\n**Constraints**  \n1. $ 1 \\leq n \\leq \\text{give...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments