CF989B A Tide of Riverscape

题目描述

**题目大意:** 给定一个由'0','1','.'构成的字符串,问可不可能无论'.'是什么,这个字符串都存在长度为$p$的周期

输入格式

一行两个数,$n,p$,$1

输出格式

如果不满足条件,输出不满足条件的字符串(把'.'用'0'或'1'替换),否则输出"No" 感谢@守望 提供翻译

说明/提示

In the first example, $ 7 $ is not a period of the resulting string because the $ 1 $ -st and $ 8 $ -th characters of it are different. In the second example, $ 6 $ is not a period of the resulting string because the $ 4 $ -th and $ 10 $ -th characters of it are different. In the third example, $ 9 $ is always a period because the only constraint that the first and last characters are the same is already satisfied. Note that there are multiple acceptable answers for the first two examples, you can print any of them.