F. [USACO06DEC] 梦中的统计 Dream Counting B

    远端评测题 1000ms 125MiB

[USACO06DEC] 梦中的统计 Dream Counting B

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Description

Bessie's mind is sharp, as if she vividly sees each number she has counted. She starts to pay attention to every digit (090 \ldots 9): how many times does each digit appear during the counting process?

Given two integers MM and NN, determine how many times each digit appears in the sequence [M,M+1,M+2,,N1,N][M, M + 1, M + 2, \ldots, N - 1, N].

Input Format

Line 11: Two integers MM and NN separated by a space.

Output Format

Line 11: Ten integers separated by spaces, representing how many times the digits 090 \ldots 9 appear in the sequence.

129 137
1 10 2 9 1 1 1 1 0 1

Hint

Constraints: 1MN2×1091 \leq M \leq N \leq 2 \times 10^9, 0NM5×1050 \leq N - M \leq 5 \times 10^5.

Translated by ChatGPT 5

基础班数组考试

未参加
状态
已结束
规则
IOI
题目
6
开始于
2026-4-25 9:00
结束于
2026-4-25 11:30
持续时间
2.5 小时
主持人
参赛人数
54