Submission #1602578


Source Code Expand

n, x = map(int,input().split())
if x == 1 or x == 2 * n - 1:
    print("No")
    exit()

print("Yes")
if n == 2:
    for i in range(1, 4):
        print(i)
    exit()

ans = []
if x == 2:
    l_x = [3, 2, 1, 4]
else:
    l_x = [x + 1, x, x - 1, x + 2]

i = 1
while len(ans) < n - 2:
    if i not in l_x:
        ans.append(i)
    i += 1

ans += l_x

while len(ans) < 2 * n:
    if i not in l_x:
        ans.append(i)
    i += 1

for i in range(2 * n - 1):
    print(ans[i])

Submission Info

Submission Time
Task B - Median Pyramid Easy
User ophelia
Language Python (3.4.3)
Score 0
Code Size 506 Byte
Status WA
Exec Time 257 ms
Memory 12500 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 400
Status
AC × 2
AC × 19
WA × 3
Set Name Test Cases
Sample 0_00.txt, 0_01.txt
All 0_00.txt, 0_01.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt, 1_11.txt, 1_12.txt, 1_13.txt, 1_14.txt, 1_15.txt, 1_16.txt, 1_17.txt, 1_18.txt, 1_19.txt
Case Name Status Exec Time Memory
0_00.txt AC 16 ms 3064 KB
0_01.txt AC 16 ms 3064 KB
1_00.txt AC 16 ms 3064 KB
1_01.txt AC 16 ms 3064 KB
1_02.txt AC 17 ms 3064 KB
1_03.txt AC 16 ms 3064 KB
1_04.txt AC 16 ms 3064 KB
1_05.txt AC 16 ms 3064 KB
1_06.txt WA 16 ms 3064 KB
1_07.txt AC 16 ms 3064 KB
1_08.txt AC 17 ms 3064 KB
1_09.txt AC 257 ms 12408 KB
1_10.txt AC 249 ms 12408 KB
1_11.txt AC 233 ms 12480 KB
1_12.txt AC 231 ms 12500 KB
1_13.txt WA 229 ms 12480 KB
1_14.txt AC 17 ms 3064 KB
1_15.txt AC 16 ms 3064 KB
1_16.txt AC 136 ms 8644 KB
1_17.txt AC 247 ms 12212 KB
1_18.txt WA 107 ms 7076 KB
1_19.txt AC 17 ms 3064 KB