Enumerate Sequences
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
AT_abc367_c [ABC367C] Enumerate Sequences
题目描述
给定长度为 的正整数序列 和正整数 。
以字典序从小到大的顺序输出所有满足 且 是 的倍数的长度为 的整数序列 。
数据范围:,,。
输入格式
无
输出格式
无
输入输出样例 #1
输入 #1
3 2
2 1 3
输出 #1
1 1 2
2 1 1
2 1 3
输入输出样例 #2
输入 #2
1 2
1
输出 #2
输入输出样例 #3
输入 #3
5 5
2 3 2 3 2
输出 #3
1 1 1 1 1
1 2 2 3 2
1 3 1 3 2
1 3 2 2 2
1 3 2 3 1
2 1 2 3 2
2 2 1 3 2
2 2 2 2 2
2 2 2 3 1
2 3 1 2 2
2 3 1 3 1
2 3 2 1 2
2 3 2 2 1
1128(B)
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 5
- Start at
- 2025-11-28 14:00
- End at
- 2025-11-28 16:30
- Duration
- 2.5 hour(s)
- Host
- Partic.
- 70