#P1186. 感应门

感应门

Description

     

Input Format

Output Format

7 3
1 2 7 10 15 17 22
18

Hint

Source

一类题