Submission #33830154
Source Code Expand
n,m=map(int,input().split())
a=[i+1 for i in range(n)]
while a[0]<m-n+2:
print(*a)
a[-1]+=1
b=1
while a[-b]>m-b+1 and b<n:
b+=1
a[-b]+=1
for i in range(b-1):
a[-b+i+1]=a[-b+i]+1
Submission Info
| Submission Time | |
|---|---|
| Task | C - Monotonically Increasing |
| User | iwzk |
| Language | Python (3.8.2) |
| Score | 300 |
| Code Size | 209 Byte |
| Status | AC |
| Exec Time | 22 ms |
| Memory | 9112 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 300 / 300 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example_00.txt, example_01.txt |
| All | example_00.txt, example_01.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| example_00.txt | AC | 18 ms | 9092 KiB |
| example_01.txt | AC | 17 ms | 9080 KiB |
| test_00.txt | AC | 18 ms | 8764 KiB |
| test_01.txt | AC | 18 ms | 9028 KiB |
| test_02.txt | AC | 17 ms | 9080 KiB |
| test_03.txt | AC | 17 ms | 8904 KiB |
| test_04.txt | AC | 17 ms | 9112 KiB |
| test_05.txt | AC | 17 ms | 8756 KiB |
| test_06.txt | AC | 16 ms | 8952 KiB |
| test_07.txt | AC | 18 ms | 8768 KiB |
| test_08.txt | AC | 16 ms | 8908 KiB |
| test_09.txt | AC | 20 ms | 8948 KiB |
| test_10.txt | AC | 20 ms | 8960 KiB |
| test_11.txt | AC | 18 ms | 8996 KiB |
| test_12.txt | AC | 22 ms | 9000 KiB |
| test_13.txt | AC | 17 ms | 8952 KiB |
| test_14.txt | AC | 17 ms | 8988 KiB |