CF1040B Shashlik Cooking

题目描述

### 题目大意: 有$n$个烤串,翻动第$i$根烤串会连带着$max(1,i-k)$到$min(n,i+k)$根烤串翻动,问把所有烤串都翻动一遍最少需要翻动几根烤串

输入格式

两个整数$n,k$

输出格式

第一行一个整数 $ans$,表示最少翻动烤串根数。 接下来一行 $ans$ 个整数,表示方案。

说明/提示

In the first example the first operation turns over skewers $ 1 $ , $ 2 $ and $ 3 $ , the second operation turns over skewers $ 4 $ , $ 5 $ , $ 6 $ and $ 7 $ . In the second example it is also correct to turn over skewers $ 2 $ and $ 5 $ , but turning skewers $ 2 $ and $ 4 $ , or $ 1 $ and $ 5 $ are incorrect solutions because the skewer $ 3 $ is in the initial state after these operations.