#P5613. [MtOI2019] 黑蚊子多

    ID: 4567 远端评测题 1000ms 125MiB 尝试: 0 已通过: 0 难度: 1 上传者: 标签>模拟2019洛谷原创O2优化洛谷月赛

[MtOI2019] 黑蚊子多

Description

There are n(1n1000)n(1\leq n\leq 1000) steps in front of Hikari. Every 1s1s, she can jump upward by m(1mn)m(1\leq m\leq n) steps (she does not stop on the steps in between).

There are k(k10)k(k\leq 10) special platforms aia_i on the steps. When Hikari stops on such a platform, mm increases by 11.

Ask for the time Hikari spends to reach the top of the steps.

Input Format

There are 22 lines in total.

The first line contains 33 non-negative integers n,m,kn, m, k.

The second line contains kk positive integers. The ii-th positive integer is aia_i. It is guaranteed that the input aia_i are strictly increasing.

Output Format

There is 11 line in total. Output 11 positive integer, the time spent.

10 5 0
2
31 4 2
8 13
6

Hint

Subtasks

For 60%60\% of the testdata, k=0k = 0.

For 100%100\% of the testdata, 1mn10001\leq m\leq n\leq 1000, k10k\leq 10.

Source

MtOI2019 Extra Round T1

Problem setter: disangan233.

Translated by ChatGPT 5