#P1894. K-SternSeq

K-SternSeq

题目描述

Click here to read PDF of this problem

输入格式

As shown in the PDF.

输出格式

As shown in the PDF

样例

3 5 
10
1234 763
525909

提示

By 秦浩源