[语言月赛 202408] 于抑郁中支持

Luogu
IDLGB4021
Time1000ms
Memory512MB
DifficultyP1
2024数组语言月赛
那是一段混沌的时期,风的记忆裂变为 $n$ 块碎片,第 $i$ 块的特征值为 $a_i$。 定义整数 $x$ 的后 $p$ 位的值为 $x \bmod 10^p$。特征值后 $t$ 位相同的记忆碎片,从属于同一事件。 请问,$n$ 块碎片共从属于多少不同的事件。 ## Input 第一行为两个整数 $n,t$。 第二行为 $n$ 个整数,第 $i$ 个为 $a_i$。 ## Output 输出一行一个整数,表示事件个数。 [samples] ## Background > 感谢清曾在风最脆弱的时候给过支持。 ## Note 对于 $50\%$ 的测试数据,$t=1$; 对于 $100\%$ 的测试数据,$1 \le n \le 10^5$,$1 \le a_i \le 10^9$,$1 \le t \le 4$。
Samples
Input #1
4 2
1345 245 105 1
Output #1
3
API Response (JSON)
{
  "problem": {
    "name": "[语言月赛 202408] 于抑郁中支持",
    "description": {
      "content": "那是一段混沌的时期,风的记忆裂变为 $n$ 块碎片,第 $i$ 块的特征值为 $a_i$。 定义整数 $x$ 的后 $p$ 位的值为 $x \\bmod 10^p$。特征值后 $t$ 位相同的记忆碎片,从属于同一事件。 请问,$n$ 块碎片共从属于多少不同的事件。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB4021"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "那是一段混沌的时期,风的记忆裂变为 $n$ 块碎片,第 $i$ 块的特征值为 $a_i$。\n\n定义整数 $x$ 的后 $p$ 位的值为 $x \\bmod 10^p$。特征值后 $t$ 位相同的记忆碎片,从属于同一事件。\n\n请问,$n$ 块碎片共从属于多少不同的事件。\n\n## Input\n\n第一行为两个整数 $n,t$。\n\n第二行为 $n$ 个整数,第 $i$ 个为 $a_i$。\n\n## Outpu...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments