QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#68564#5209. King's PuzzlelarryzhongAC ✓11ms3760kbC++17952b2022-12-17 11:50:542022-12-17 11:50:55

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3328kb

input:

5 2

output:

YES
4
1 5
1 4
1 2
1 3

result:

ok n = 5, k = 2: nice job dude

Test #2:

score: 0
Accepted
time: 2ms
memory: 3540kb

input:

4 1

output:

YES
4
1 2
2 3
3 4
4 1

result:

ok n = 4, k = 1: nice job dude

Test #3:

score: 0
Accepted
time: 2ms
memory: 3292kb

input:

11 1

output:

YES
11
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 1

result:

ok n = 11, k = 1: nice job dude

Test #4:

score: 0
Accepted
time: 2ms
memory: 3520kb

input:

11 2

output:

YES
10
1 11
1 10
1 9
1 8
1 7
1 6
1 5
1 4
1 2
1 3

result:

ok n = 11, k = 2: nice job dude

Test #5:

score: 0
Accepted
time: 0ms
memory: 3300kb

input:

11 3

output:

YES
11
1 11
1 10
1 9
1 8
1 7
1 6
1 5
1 2
1 3
1 4
2 3

result:

ok n = 11, k = 3: nice job dude

Test #6:

score: 0
Accepted
time: 2ms
memory: 3388kb

input:

11 9

output:

YES
26
1 11
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
2 3
2 4
2 5
2 6
2 7
2 8
2 9
3 4
3 5
3 6
3 7
3 8
4 5
4 6
4 7
5 6

result:

ok n = 11, k = 9: nice job dude

Test #7:

score: 0
Accepted
time: 2ms
memory: 3336kb

input:

11 10

output:

YES
30
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
2 3
2 4
2 5
2 6
2 7
2 8
2 9
2 10
3 4
3 5
3 6
3 7
3 8
3 9
4 5
4 6
4 7
4 8
5 6
5 7

result:

ok n = 11, k = 10: nice job dude

Test #8:

score: 0
Accepted
time: 0ms
memory: 3484kb

input:

11 11

output:

NO

result:

ok n = 11, k = 11: nice job dude

Test #9:

score: 0
Accepted
time: 2ms
memory: 3436kb

input:

53 1

output:

YES
53
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 5...

result:

ok n = 53, k = 1: nice job dude

Test #10:

score: 0
Accepted
time: 2ms
memory: 3384kb

input:

53 2

output:

YES
52
1 53
1 52
1 51
1 50
1 49
1 48
1 47
1 46
1 45
1 44
1 43
1 42
1 41
1 40
1 39
1 38
1 37
1 36
1 35
1 34
1 33
1 32
1 31
1 30
1 29
1 28
1 27
1 26
1 25
1 24
1 23
1 22
1 21
1 20
1 19
1 18
1 17
1 16
1 15
1 14
1 13
1 12
1 11
1 10
1 9
1 8
1 7
1 6
1 5
1 4
1 2
1 3

result:

ok n = 53, k = 2: nice job dude

Test #11:

score: 0
Accepted
time: 2ms
memory: 3540kb

input:

53 3

output:

YES
53
1 53
1 52
1 51
1 50
1 49
1 48
1 47
1 46
1 45
1 44
1 43
1 42
1 41
1 40
1 39
1 38
1 37
1 36
1 35
1 34
1 33
1 32
1 31
1 30
1 29
1 28
1 27
1 26
1 25
1 24
1 23
1 22
1 21
1 20
1 19
1 18
1 17
1 16
1 15
1 14
1 13
1 12
1 11
1 10
1 9
1 8
1 7
1 6
1 5
1 2
1 3
1 4
2 3

result:

ok n = 53, k = 3: nice job dude

Test #12:

score: 0
Accepted
time: 2ms
memory: 3496kb

input:

53 51

output:

YES
677
1 53
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
2 3
2 4
2 5
2 6
2 7
2 8
2 9
2 10
2 11
2 ...

result:

ok n = 53, k = 51: nice job dude

Test #13:

score: 0
Accepted
time: 2ms
memory: 3436kb

input:

53 52

output:

YES
702
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
2 3
2 4
2 5
2 6
2 7
2 8
2 9
2 10
2 11
2 ...

result:

ok n = 53, k = 52: nice job dude

Test #14:

score: 0
Accepted
time: 2ms
memory: 3472kb

input:

53 53

output:

NO

result:

ok n = 53, k = 53: nice job dude

Test #15:

score: 0
Accepted
time: 1ms
memory: 3356kb

input:

267 1

output:

YES
267
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 ...

result:

ok n = 267, k = 1: nice job dude

Test #16:

score: 0
Accepted
time: 2ms
memory: 3380kb

input:

267 2

output:

YES
266
1 267
1 266
1 265
1 264
1 263
1 262
1 261
1 260
1 259
1 258
1 257
1 256
1 255
1 254
1 253
1 252
1 251
1 250
1 249
1 248
1 247
1 246
1 245
1 244
1 243
1 242
1 241
1 240
1 239
1 238
1 237
1 236
1 235
1 234
1 233
1 232
1 231
1 230
1 229
1 228
1 227
1 226
1 225
1 224
1 223
1 222
1 221
1 220
1 21...

result:

ok n = 267, k = 2: nice job dude

Test #17:

score: 0
Accepted
time: 2ms
memory: 3496kb

input:

267 3

output:

YES
267
1 267
1 266
1 265
1 264
1 263
1 262
1 261
1 260
1 259
1 258
1 257
1 256
1 255
1 254
1 253
1 252
1 251
1 250
1 249
1 248
1 247
1 246
1 245
1 244
1 243
1 242
1 241
1 240
1 239
1 238
1 237
1 236
1 235
1 234
1 233
1 232
1 231
1 230
1 229
1 228
1 227
1 226
1 225
1 224
1 223
1 222
1 221
1 220
1 21...

result:

ok n = 267, k = 3: nice job dude

Test #18:

score: 0
Accepted
time: 2ms
memory: 3492kb

input:

267 265

output:

YES
17690
1 267
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 ...

result:

ok n = 267, k = 265: nice job dude

Test #19:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

267 266

output:

YES
17822
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 6...

result:

ok n = 267, k = 266: nice job dude

Test #20:

score: 0
Accepted
time: 1ms
memory: 3296kb

input:

267 267

output:

NO

result:

ok n = 267, k = 267: nice job dude

Test #21:

score: 0
Accepted
time: 2ms
memory: 3432kb

input:

499 1

output:

YES
499
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 ...

result:

ok n = 499, k = 1: nice job dude

Test #22:

score: 0
Accepted
time: 2ms
memory: 3484kb

input:

499 2

output:

YES
498
1 499
1 498
1 497
1 496
1 495
1 494
1 493
1 492
1 491
1 490
1 489
1 488
1 487
1 486
1 485
1 484
1 483
1 482
1 481
1 480
1 479
1 478
1 477
1 476
1 475
1 474
1 473
1 472
1 471
1 470
1 469
1 468
1 467
1 466
1 465
1 464
1 463
1 462
1 461
1 460
1 459
1 458
1 457
1 456
1 455
1 454
1 453
1 452
1 45...

result:

ok n = 499, k = 2: nice job dude

Test #23:

score: 0
Accepted
time: 2ms
memory: 3564kb

input:

499 3

output:

YES
499
1 499
1 498
1 497
1 496
1 495
1 494
1 493
1 492
1 491
1 490
1 489
1 488
1 487
1 486
1 485
1 484
1 483
1 482
1 481
1 480
1 479
1 478
1 477
1 476
1 475
1 474
1 473
1 472
1 471
1 470
1 469
1 468
1 467
1 466
1 465
1 464
1 463
1 462
1 461
1 460
1 459
1 458
1 457
1 456
1 455
1 454
1 453
1 452
1 45...

result:

ok n = 499, k = 3: nice job dude

Test #24:

score: 0
Accepted
time: 7ms
memory: 3680kb

input:

499 497

output:

YES
62002
1 499
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 ...

result:

ok n = 499, k = 497: nice job dude

Test #25:

score: 0
Accepted
time: 11ms
memory: 3760kb

input:

499 498

output:

YES
62250
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 6...

result:

ok n = 499, k = 498: nice job dude

Test #26:

score: 0
Accepted
time: 2ms
memory: 3420kb

input:

499 499

output:

NO

result:

ok n = 499, k = 499: nice job dude

Test #27:

score: 0
Accepted
time: 2ms
memory: 3296kb

input:

500 1

output:

YES
500
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 ...

result:

ok n = 500, k = 1: nice job dude

Test #28:

score: 0
Accepted
time: 2ms
memory: 3424kb

input:

500 2

output:

YES
499
1 500
1 499
1 498
1 497
1 496
1 495
1 494
1 493
1 492
1 491
1 490
1 489
1 488
1 487
1 486
1 485
1 484
1 483
1 482
1 481
1 480
1 479
1 478
1 477
1 476
1 475
1 474
1 473
1 472
1 471
1 470
1 469
1 468
1 467
1 466
1 465
1 464
1 463
1 462
1 461
1 460
1 459
1 458
1 457
1 456
1 455
1 454
1 453
1 45...

result:

ok n = 500, k = 2: nice job dude

Test #29:

score: 0
Accepted
time: 2ms
memory: 3580kb

input:

500 3

output:

YES
500
1 500
1 499
1 498
1 497
1 496
1 495
1 494
1 493
1 492
1 491
1 490
1 489
1 488
1 487
1 486
1 485
1 484
1 483
1 482
1 481
1 480
1 479
1 478
1 477
1 476
1 475
1 474
1 473
1 472
1 471
1 470
1 469
1 468
1 467
1 466
1 465
1 464
1 463
1 462
1 461
1 460
1 459
1 458
1 457
1 456
1 455
1 454
1 453
1 45...

result:

ok n = 500, k = 3: nice job dude

Test #30:

score: 0
Accepted
time: 11ms
memory: 3668kb

input:

500 498

output:

YES
62251
1 500
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 ...

result:

ok n = 500, k = 498: nice job dude

Test #31:

score: 0
Accepted
time: 11ms
memory: 3636kb

input:

500 499

output:

YES
62500
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 6...

result:

ok n = 500, k = 499: nice job dude

Test #32:

score: 0
Accepted
time: 2ms
memory: 3292kb

input:

500 500

output:

NO

result:

ok n = 500, k = 500: nice job dude

Test #33:

score: 0
Accepted
time: 0ms
memory: 3472kb

input:

1 1

output:

YES
0

result:

ok n = 1, k = 1: nice job dude

Test #34:

score: 0
Accepted
time: 1ms
memory: 3416kb

input:

2 1

output:

YES
1
1 2

result:

ok n = 2, k = 1: nice job dude

Test #35:

score: 0
Accepted
time: 2ms
memory: 3520kb

input:

2 2

output:

NO

result:

ok n = 2, k = 2: nice job dude

Test #36:

score: 0
Accepted
time: 2ms
memory: 3536kb

input:

3 1

output:

YES
3
1 2
2 3
3 1

result:

ok n = 3, k = 1: nice job dude

Test #37:

score: 0
Accepted
time: 2ms
memory: 3384kb

input:

3 2

output:

YES
2
1 2
1 3

result:

ok n = 3, k = 2: nice job dude

Test #38:

score: 0
Accepted
time: 2ms
memory: 3404kb

input:

3 3

output:

NO

result:

ok n = 3, k = 3: nice job dude

Test #39:

score: 0
Accepted
time: 2ms
memory: 3472kb

input:

4 1

output:

YES
4
1 2
2 3
3 4
4 1

result:

ok n = 4, k = 1: nice job dude

Test #40:

score: 0
Accepted
time: 0ms
memory: 3364kb

input:

4 2

output:

YES
3
1 4
1 2
1 3

result:

ok n = 4, k = 2: nice job dude

Test #41:

score: 0
Accepted
time: 2ms
memory: 3408kb

input:

4 3

output:

YES
4
1 2
1 3
1 4
2 3

result:

ok n = 4, k = 3: nice job dude

Test #42:

score: 0
Accepted
time: 2ms
memory: 3444kb

input:

4 4

output:

NO

result:

ok n = 4, k = 4: nice job dude

Test #43:

score: 0
Accepted
time: 2ms
memory: 3288kb

input:

5 1

output:

YES
5
1 2
2 3
3 4
4 5
5 1

result:

ok n = 5, k = 1: nice job dude

Test #44:

score: 0
Accepted
time: 2ms
memory: 3472kb

input:

5 2

output:

YES
4
1 5
1 4
1 2
1 3

result:

ok n = 5, k = 2: nice job dude

Test #45:

score: 0
Accepted
time: 2ms
memory: 3412kb

input:

5 3

output:

YES
5
1 5
1 2
1 3
1 4
2 3

result:

ok n = 5, k = 3: nice job dude

Test #46:

score: 0
Accepted
time: 2ms
memory: 3376kb

input:

5 4

output:

YES
6
1 2
1 3
1 4
1 5
2 3
2 4

result:

ok n = 5, k = 4: nice job dude

Test #47:

score: 0
Accepted
time: 2ms
memory: 3356kb

input:

5 5

output:

NO

result:

ok n = 5, k = 5: nice job dude

Test #48:

score: 0
Accepted
time: 1ms
memory: 3472kb

input:

6 1

output:

YES
6
1 2
2 3
3 4
4 5
5 6
6 1

result:

ok n = 6, k = 1: nice job dude

Test #49:

score: 0
Accepted
time: 2ms
memory: 3436kb

input:

6 2

output:

YES
5
1 6
1 5
1 4
1 2
1 3

result:

ok n = 6, k = 2: nice job dude

Test #50:

score: 0
Accepted
time: 2ms
memory: 3520kb

input:

6 3

output:

YES
6
1 6
1 5
1 2
1 3
1 4
2 3

result:

ok n = 6, k = 3: nice job dude

Test #51:

score: 0
Accepted
time: 2ms
memory: 3440kb

input:

6 4

output:

YES
7
1 6
1 2
1 3
1 4
1 5
2 3
2 4

result:

ok n = 6, k = 4: nice job dude

Test #52:

score: 0
Accepted
time: 2ms
memory: 3452kb

input:

6 5

output:

YES
9
1 2
1 3
1 4
1 5
1 6
2 3
2 4
2 5
3 4

result:

ok n = 6, k = 5: nice job dude

Test #53:

score: 0
Accepted
time: 2ms
memory: 3400kb

input:

6 6

output:

NO

result:

ok n = 6, k = 6: nice job dude

Test #54:

score: 0
Accepted
time: 2ms
memory: 3508kb

input:

103 85

output:

YES
1866
1 103
1 102
1 101
1 100
1 99
1 98
1 97
1 96
1 95
1 94
1 93
1 92
1 91
1 90
1 89
1 88
1 87
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
...

result:

ok n = 103, k = 85: nice job dude

Test #55:

score: 0
Accepted
time: 4ms
memory: 3612kb

input:

373 203

output:

YES
10573
1 373
1 372
1 371
1 370
1 369
1 368
1 367
1 366
1 365
1 364
1 363
1 362
1 361
1 360
1 359
1 358
1 357
1 356
1 355
1 354
1 353
1 352
1 351
1 350
1 349
1 348
1 347
1 346
1 345
1 344
1 343
1 342
1 341
1 340
1 339
1 338
1 337
1 336
1 335
1 334
1 333
1 332
1 331
1 330
1 329
1 328
1 327
1 326
1 ...

result:

ok n = 373, k = 203: nice job dude

Test #56:

score: 0
Accepted
time: 3ms
memory: 3428kb

input:

443 143

output:

YES
5483
1 443
1 442
1 441
1 440
1 439
1 438
1 437
1 436
1 435
1 434
1 433
1 432
1 431
1 430
1 429
1 428
1 427
1 426
1 425
1 424
1 423
1 422
1 421
1 420
1 419
1 418
1 417
1 416
1 415
1 414
1 413
1 412
1 411
1 410
1 409
1 408
1 407
1 406
1 405
1 404
1 403
1 402
1 401
1 400
1 399
1 398
1 397
1 396
1 3...

result:

ok n = 443, k = 143: nice job dude

Test #57:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

124 30

output:

YES
333
1 124
1 123
1 122
1 121
1 120
1 119
1 118
1 117
1 116
1 115
1 114
1 113
1 112
1 111
1 110
1 109
1 108
1 107
1 106
1 105
1 104
1 103
1 102
1 101
1 100
1 99
1 98
1 97
1 96
1 95
1 94
1 93
1 92
1 91
1 90
1 89
1 88
1 87
1 86
1 85
1 84
1 83
1 82
1 81
1 80
1 79
1 78
1 77
1 76
1 75
1 74
1 73
1 72
1 ...

result:

ok n = 124, k = 30: nice job dude

Test #58:

score: 0
Accepted
time: 1ms
memory: 3352kb

input:

194 6

output:

YES
199
1 194
1 193
1 192
1 191
1 190
1 189
1 188
1 187
1 186
1 185
1 184
1 183
1 182
1 181
1 180
1 179
1 178
1 177
1 176
1 175
1 174
1 173
1 172
1 171
1 170
1 169
1 168
1 167
1 166
1 165
1 164
1 163
1 162
1 161
1 160
1 159
1 158
1 157
1 156
1 155
1 154
1 153
1 152
1 151
1 150
1 149
1 148
1 147
1 14...

result:

ok n = 194, k = 6: nice job dude

Test #59:

score: 0
Accepted
time: 7ms
memory: 3604kb

input:

464 369

output:

YES
34319
1 464
1 463
1 462
1 461
1 460
1 459
1 458
1 457
1 456
1 455
1 454
1 453
1 452
1 451
1 450
1 449
1 448
1 447
1 446
1 445
1 444
1 443
1 442
1 441
1 440
1 439
1 438
1 437
1 436
1 435
1 434
1 433
1 432
1 431
1 430
1 429
1 428
1 427
1 426
1 425
1 424
1 423
1 422
1 421
1 420
1 419
1 418
1 417
1 ...

result:

ok n = 464, k = 369: nice job dude

Test #60:

score: 0
Accepted
time: 0ms
memory: 3392kb

input:

45 42

output:

YES
464
1 45
1 44
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
2 3
2 4
2 5
2 6
2 7
2 8
2 9
2 10
2 11
2 12
2 13
2 14
2 15
2 16
2 17
2 18
2 19
2 ...

result:

ok n = 45, k = 42: nice job dude

Test #61:

score: 0
Accepted
time: 1ms
memory: 3544kb

input:

115 106

output:

YES
2870
1 115
1 114
1 113
1 112
1 111
1 110
1 109
1 108
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1...

result:

ok n = 115, k = 106: nice job dude

Test #62:

score: 0
Accepted
time: 4ms
memory: 3420kb

input:

285 220

output:

YES
12274
1 285
1 284
1 283
1 282
1 281
1 280
1 279
1 278
1 277
1 276
1 275
1 274
1 273
1 272
1 271
1 270
1 269
1 268
1 267
1 266
1 265
1 264
1 263
1 262
1 261
1 260
1 259
1 258
1 257
1 256
1 255
1 254
1 253
1 252
1 251
1 250
1 249
1 248
1 247
1 246
1 245
1 244
1 243
1 242
1 241
1 240
1 239
1 238
1 ...

result:

ok n = 285, k = 220: nice job dude

Test #63:

score: 0
Accepted
time: 0ms
memory: 3500kb

input:

143 106

output:

YES
2898
1 143
1 142
1 141
1 140
1 139
1 138
1 137
1 136
1 135
1 134
1 133
1 132
1 131
1 130
1 129
1 128
1 127
1 126
1 125
1 124
1 123
1 122
1 121
1 120
1 119
1 118
1 117
1 116
1 115
1 114
1 113
1 112
1 111
1 110
1 109
1 108
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 1...

result:

ok n = 143, k = 106: nice job dude