QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#182457#2276. Newspapers867#75 1ms3856kbC++173.0kb2023-09-18 02:15:062024-07-04 02:01:25

詳細信息

Subtask #1:

score: 9
Acceptable Answer

Test #1:

score: 12
Accepted
time: 0ms
memory: 3648kb

input:

1 0

output:

YES
1
1

result:

ok correct token and optimal solution!

Test #2:

score: 12
Accepted
time: 0ms
memory: 3712kb

input:

2 1
1 2

output:

YES
2
1 1

result:

ok correct token and optimal solution!

Test #3:

score: 9
Acceptable Answer
time: 0ms
memory: 3592kb

input:

5 4
1 2
2 3
3 4
4 5

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #4:

score: 9
Acceptable Answer
time: 0ms
memory: 3644kb

input:

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

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #5:

score: 12
Accepted
time: 0ms
memory: 3616kb

input:

4 3
1 2
1 3
1 4

output:

YES
2
1 1

result:

ok correct token and optimal solution!

Test #6:

score: 9
Acceptable Answer
time: 0ms
memory: 3656kb

input:

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

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #7:

score: 12
Accepted
time: 0ms
memory: 3648kb

input:

3 3
1 2
2 3
3 1

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #8:

score: 9
Acceptable Answer
time: 0ms
memory: 3648kb

input:

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

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #9:

score: 12
Accepted
time: 0ms
memory: 3584kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #10:

score: 9
Acceptable Answer
time: 0ms
memory: 3740kb

input:

9 8
1 2
2 3
3 4
1 5
5 6
6 7
1 8
8 9

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #11:

score: 9
Acceptable Answer
time: 0ms
memory: 3676kb

input:

8 7
1 2
2 3
3 4
1 5
5 6
6 7
1 8

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #12:

score: 9
Acceptable Answer
time: 0ms
memory: 3612kb

input:

8 7
1 2
2 3
3 4
1 5
5 6
1 7
7 8

output:

YES
14
6 5 1 7 1 2 3 3 2 1 7 1 5 6 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #13:

score: 9
Acceptable Answer
time: 0ms
memory: 3664kb

input:

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

output:

YES
10
6 5 1 2 3 3 2 1 5 6 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #14:

score: 9
Acceptable Answer
time: 0ms
memory: 3744kb

input:

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

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #15:

score: 9
Acceptable Answer
time: 0ms
memory: 3660kb

input:

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

output:

YES
18
6 5 1 2 3 2 10 2 7 7 2 10 2 3 2 1 5 6 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #16:

score: 9
Acceptable Answer
time: 0ms
memory: 3692kb

input:

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

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #17:

score: 9
Acceptable Answer
time: 0ms
memory: 3724kb

input:

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

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #18:

score: 9
Acceptable Answer
time: 0ms
memory: 3668kb

input:

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

output:

YES
20
9 8 2 1 10 1 4 6 7 6 6 7 6 4 1 10 1 2 8 9 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #19:

score: 9
Acceptable Answer
time: 0ms
memory: 3584kb

input:

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

output:

YES
22
7 1 2 3 4 3 5 6 11 6 8 8 6 11 6 5 3 4 3 2 1 7 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #20:

score: 9
Acceptable Answer
time: 0ms
memory: 3588kb

input:

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

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #21:

score: 9
Acceptable Answer
time: 1ms
memory: 3612kb

input:

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

output:

YES
22
1 2 3 4 11 4 5 6 10 6 7 7 6 10 6 5 4 11 4 3 2 1 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #22:

score: 9
Acceptable Answer
time: 0ms
memory: 3716kb

input:

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

output:

YES
20
11 10 1 2 3 2 4 6 8 6 6 8 6 4 2 3 2 1 10 11 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #23:

score: 9
Acceptable Answer
time: 0ms
memory: 3592kb

input:

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

output:

YES
20
10 7 2 5 2 1 3 6 9 6 6 9 6 3 1 2 5 2 7 10 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #24:

score: 9
Acceptable Answer
time: 0ms
memory: 3592kb

input:

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

output:

YES
24
11 1 2 3 6 3 4 5 8 10 12 10 10 12 10 8 5 4 3 6 3 2 1 11 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #25:

score: 9
Acceptable Answer
time: 0ms
memory: 3668kb

input:

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

output:

YES
24
9 3 2 4 2 1 11 1 5 6 8 6 6 8 6 5 1 11 1 2 4 2 3 9 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #26:

score: 9
Acceptable Answer
time: 0ms
memory: 3612kb

input:

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

output:

YES
24
6 4 1 2 8 2 11 2 3 5 9 5 5 9 5 3 2 11 2 8 2 1 4 6 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #27:

score: 9
Acceptable Answer
time: 0ms
memory: 3648kb

input:

13 12
1 2
1 3
4 1
1 5
5 6
2 7
4 8
3 9
2 10
11 6
12 2
13 6

output:

YES
26
7 2 10 2 12 2 1 3 1 4 1 5 6 6 5 1 4 1 3 1 2 12 2 10 2 7 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #28:

score: 9
Acceptable Answer
time: 0ms
memory: 3664kb

input:

13 12
2 1
2 3
2 4
1 5
6 2
1 7
8 6
9 8
10 7
11 1
10 12
13 6

output:

YES
26
12 10 7 1 5 1 11 1 2 6 13 6 8 8 6 13 6 2 1 11 1 5 1 7 10 12 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #29:

score: 12
Accepted
time: 0ms
memory: 3592kb

input:

13 12
1 2
1 3
4 2
5 1
6 4
6 7
8 5
9 2
10 8
3 11
12 7
11 13

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #30:

score: 9
Acceptable Answer
time: 0ms
memory: 3664kb

input:

13 12
2 1
2 3
1 4
5 1
6 3
3 7
8 3
6 9
8 10
11 7
4 12
11 13

output:

YES
22
12 4 1 2 3 6 3 8 3 7 11 11 7 3 8 3 6 3 2 1 4 12 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #31:

score: 9
Acceptable Answer
time: 0ms
memory: 3596kb

input:

14 13
1 2
2 3
4 3
5 4
6 5
7 4
8 5
9 8
8 10
3 11
9 12
13 2
14 9

output:

YES
26
1 2 13 2 3 4 7 4 5 8 10 8 9 9 8 10 8 5 4 7 4 3 2 13 2 1 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #32:

score: 9
Acceptable Answer
time: 0ms
memory: 3680kb

input:

14 13
1 2
1 3
3 4
2 5
5 6
2 7
8 4
8 9
10 1
5 11
2 12
11 13
14 12

output:

YES
28
13 11 5 2 7 2 12 2 1 3 4 8 9 8 8 9 8 4 3 1 2 12 2 7 2 5 11 13 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #33:

score: 9
Acceptable Answer
time: 0ms
memory: 3588kb

input:

14 13
2 1
3 1
4 2
5 2
2 6
5 7
4 8
4 9
5 10
8 11
6 12
13 7
13 14

output:

YES
22
11 8 4 2 1 2 6 2 5 7 13 13 7 5 2 6 2 1 2 4 8 11 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #34:

score: 12
Accepted
time: 0ms
memory: 3676kb

input:

14 13
2 1
3 2
4 3
5 3
6 1
3 7
1 8
9 5
9 10
9 11
12 1
7 13
14 13

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #35:

score: 9
Acceptable Answer
time: 0ms
memory: 3592kb

input:

15 14
2 1
3 2
2 4
1 5
6 4
7 6
8 3
9 6
9 10
2 11
1 12
6 13
14 4
15 9

output:

YES
32
5 1 12 1 2 3 2 4 14 4 6 9 10 9 15 9 9 15 9 10 9 6 4 14 4 2 3 2 1 12 1 5 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #36:

score: 9
Acceptable Answer
time: 0ms
memory: 3584kb

input:

15 14
2 1
2 3
4 1
5 2
3 6
7 4
8 4
6 9
2 10
11 6
12 9
13 5
14 12
10 15

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #37:

score: 9
Acceptable Answer
time: 0ms
memory: 3652kb

input:

15 14
2 1
1 3
1 4
3 5
6 4
2 7
8 3
2 9
9 10
11 10
7 12
2 13
14 1
15 3

output:

YES
36
5 3 8 3 15 3 1 4 1 2 7 2 13 2 9 10 11 10 10 11 10 9 2 13 2 7 2 1 4 1 3 15 3 8 3 5 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #38:

score: 9
Acceptable Answer
time: 0ms
memory: 3540kb

input:

15 14
2 1
1 3
4 1
5 1
5 6
7 4
5 8
2 9
8 10
11 5
9 12
11 13
12 14
3 15

output:

YES
26
10 8 5 11 5 1 3 1 4 1 2 9 12 12 9 2 1 4 1 3 1 5 11 5 8 10 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #39:

score: 9
Acceptable Answer
time: 0ms
memory: 3720kb

input:

16 15
1 2
3 2
1 4
3 5
6 3
6 7
2 8
6 9
7 10
7 11
12 11
13 3
1 14
15 14
16 8

output:

YES
28
15 14 1 2 8 2 3 6 9 6 7 11 12 11 11 12 11 7 6 9 6 3 2 8 2 1 14 15 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #40:

score: 9
Acceptable Answer
time: 0ms
memory: 3612kb

input:

16 15
1 2
3 2
4 2
2 5
2 6
7 3
3 8
8 9
10 6
11 6
12 10
5 13
14 3
4 15
7 16

output:

YES
32
12 10 6 2 1 2 4 2 5 2 3 7 3 8 9 8 8 9 8 3 7 3 2 5 2 4 2 1 2 6 10 12 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #41:

score: 9
Acceptable Answer
time: 0ms
memory: 3584kb

input:

16 15
2 1
2 3
4 2
3 5
6 3
1 7
4 8
9 4
10 3
3 11
2 12
13 2
6 14
15 8
6 16

output:

YES
32
15 8 4 2 1 2 12 2 13 2 3 6 14 6 16 6 6 16 6 14 6 3 2 13 2 12 2 1 2 4 8 15 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #42:

score: 9
Acceptable Answer
time: 0ms
memory: 3680kb

input:

16 15
1 2
3 2
4 1
4 5
1 6
7 4
4 8
1 9
10 5
9 11
12 2
6 13
10 14
15 14
10 16

output:

YES
38
3 2 12 2 1 6 1 9 1 4 7 4 8 4 5 10 16 10 14 14 10 16 10 5 4 8 4 7 4 1 9 1 6 1 2 12 2 3 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #43:

score: 9
Acceptable Answer
time: 0ms
memory: 3612kb

input:

17 16
2 1
2 3
1 4
5 4
6 3
7 6
5 8
7 9
10 4
11 1
12 4
13 5
11 14
15 3
4 16
17 2

output:

YES
32
8 5 13 5 4 1 11 1 2 3 15 3 6 7 9 7 7 9 7 6 3 15 3 2 1 11 1 4 5 13 5 8 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #44:

score: 9
Acceptable Answer
time: 0ms
memory: 3612kb

input:

17 16
2 1
3 1
2 4
4 5
6 1
7 4
8 1
9 7
10 7
8 11
12 1
3 13
14 6
15 13
16 13
17 1

output:

YES
38
15 13 16 13 3 1 6 1 8 1 12 1 17 1 2 4 5 4 7 7 4 5 4 2 1 17 1 12 1 8 1 6 1 3 13 16 13 15 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #45:

score: 12
Accepted
time: 0ms
memory: 3592kb

input:

17 16
1 2
2 3
2 4
1 5
4 6
1 7
7 8
9 1
2 10
11 8
7 12
13 6
9 14
15 14
9 16
12 17

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #46:

score: 12
Accepted
time: 0ms
memory: 3672kb

input:

17 16
2 1
2 3
4 3
4 5
6 4
7 1
4 8
8 9
10 3
11 3
12 6
13 11
5 14
7 15
16 5
13 17

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #47:

score: 12
Accepted
time: 0ms
memory: 3584kb

input:

18 17
1 2
3 1
4 1
2 5
3 6
7 6
8 5
1 9
10 1
11 2
12 3
10 13
14 9
14 15
1 16
1 17
17 18

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #48:

score: 9
Acceptable Answer
time: 0ms
memory: 3740kb

input:

18 17
1 2
2 3
3 4
5 2
5 6
3 7
7 8
9 4
7 10
11 9
12 4
5 13
14 12
15 2
14 16
17 6
12 18

output:

YES
36
17 6 5 2 1 2 15 2 3 7 3 4 9 4 12 14 16 14 14 16 14 12 4 9 4 3 7 3 2 15 2 1 2 5 6 17 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #49:

score: 12
Accepted
time: 0ms
memory: 3704kb

input:

18 17
1 2
1 3
4 2
5 1
6 3
2 7
8 7
5 9
9 10
4 11
12 11
13 11
8 14
15 11
15 16
17 5
18 2

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #50:

score: 12
Accepted
time: 0ms
memory: 3684kb

input:

18 17
2 1
1 3
4 2
2 5
6 4
7 5
6 8
1 9
2 10
11 10
12 9
13 2
2 14
1 15
3 16
12 17
18 11

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #51:

score: 9
Acceptable Answer
time: 0ms
memory: 3664kb

input:

19 18
2 1
1 3
3 4
1 5
2 6
6 7
7 8
9 6
10 5
11 6
9 12
13 1
14 8
15 3
16 6
17 8
17 18
19 6

output:

YES
32
4 3 15 3 1 5 1 2 6 9 6 7 8 17 18 17 17 18 17 8 7 6 9 6 2 1 5 1 3 15 3 4 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #52:

score: 12
Accepted
time: 0ms
memory: 3588kb

input:

19 18
1 2
2 3
2 4
2 5
2 6
7 1
5 8
9 7
10 3
4 11
1 12
13 2
10 14
7 15
10 16
13 17
17 18
17 19

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #53:

score: 12
Accepted
time: 0ms
memory: 3716kb

input:

19 18
1 2
3 2
2 4
1 5
6 2
7 6
8 4
9 1
9 10
11 7
12 10
11 13
2 14
8 15
16 2
15 17
11 18
19 3

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #54:

score: 9
Acceptable Answer
time: 0ms
memory: 3720kb

input:

19 18
1 2
2 3
2 4
1 5
6 4
7 5
2 8
7 9
10 6
1 11
3 12
3 13
14 7
1 15
16 7
17 2
10 18
19 4

output:

YES
44
9 7 14 7 16 7 5 1 11 1 15 1 2 3 2 4 19 4 6 10 18 10 10 18 10 6 4 19 4 2 3 2 1 15 1 11 1 5 7 16 7 14 7 9 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #55:

score: 12
Accepted
time: 0ms
memory: 3608kb

input:

20 19
1 2
3 2
3 4
5 2
1 6
5 7
3 8
1 9
10 9
8 11
6 12
13 7
14 12
10 15
12 16
17 3
18 11
19 12
20 16

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #56:

score: 12
Accepted
time: 0ms
memory: 3644kb

input:

20 19
1 2
3 1
4 3
2 5
6 1
5 7
8 5
6 9
1 10
11 6
4 12
13 1
14 4
1 15
16 5
17 3
4 18
19 3
9 20

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #57:

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

input:

20 19
1 2
3 2
2 4
3 5
6 3
3 7
4 8
9 7
10 6
11 1
8 12
13 9
14 4
3 15
5 16
17 13
15 18
19 10
20 12

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #58:

score: 12
Accepted
time: 0ms
memory: 3656kb

input:

20 19
2 1
3 1
2 4
5 2
4 6
1 7
5 8
8 9
4 10
11 2
5 12
2 13
14 3
13 15
5 16
17 3
18 6
7 19
20 4

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #59:

score: 12
Accepted
time: 0ms
memory: 3736kb

input:

20 140
7 3
6 9
17 7
16 9
18 4
18 19
2 5
8 5
10 8
4 19
16 3
17 2
7 19
13 7
13 20
18 20
9 14
5 11
4 5
9 3
1 17
7 5
14 15
12 11
16 19
14 11
19 10
18 10
3 12
1 12
4 15
5 14
3 18
15 16
6 16
20 16
19 8
20 3
18 15
2 1
12 19
9 4
7 2
12 2
11 10
17 6
7 15
18 5
17 11
13 16
6 11
8 6
4 1
9 7
15 12
19 17
10 4
9 2...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #60:

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

input:

20 108
16 6
6 9
12 1
10 17
7 12
13 4
1 17
1 11
5 8
10 8
4 19
7 6
14 18
5 18
20 9
19 3
18 9
3 2
9 16
7 5
14 15
17 13
13 10
18 10
11 15
15 16
20 16
19 8
20 3
2 18
18 15
3 11
8 9
2 12
10 3
7 2
17 6
7 15
14 5
12 13
18 16
10 9
9 7
10 4
7 1
6 11
5 17
10 19
14 6
13 6
1 19
4 11
9 13
9 2
16 1
5 20
18 6
17 12...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #61:

score: 12
Accepted
time: 0ms
memory: 3608kb

input:

20 55
16 6
14 17
10 11
10 1
17 7
16 9
2 11
19 4
17 20
10 15
17 3
7 16
11 14
7 11
5 1
15 5
3 8
11 5
18 5
10 12
4 13
15 16
9 11
9 17
20 4
12 3
13 11
20 13
6 4
17 19
9 14
10 4
8 14
5 17
9 3
20 1
17 1
7 5
20 19
14 2
3 5
13 1
1 12
8 12
7 8
14 7
12 19
16 1
5 20
11 20
10 9
4 3
15 9
9 5
5 2

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #62:

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

input:

20 57
5 9
17 8
7 12
10 6
5 16
10 5
2 1
6 2
15 8
12 16
8 5
11 19
18 1
15 12
17 1
12 20
4 9
14 18
8 20
18 16
13 7
19 3
3 16
12 10
4 1
2 16
9 11
13 2
8 2
14 19
4 14
4 7
4 16
9 10
3 9
17 20
8 7
4 2
14 6
5 3
2 7
8 3
9 19
1 12
15 2
5 7
20 11
14 12
18 6
8 18
1 9
19 1
14 3
12 8
14 8
4 20
8 4

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #63:

score: 12
Accepted
time: 0ms
memory: 3672kb

input:

20 158
14 17
17 7
13 4
6 9
13 17
20 7
18 19
3 7
2 5
5 8
6 7
1 5
16 3
6 10
5 18
19 14
17 2
7 19
13 7
12 17
19 3
15 4
18 20
9 14
5 11
9 16
14 15
12 11
16 19
14 2
13 10
20 14
18 10
17 18
1 12
8 12
2 11
14 18
3 18
10 14
6 13
7 8
6 16
11 16
17 8
15 13
18 15
2 1
1 15
3 17
10 3
6 14
7 15
14 5
1 16
18 16
1 ...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #64:

score: 12
Accepted
time: 0ms
memory: 3644kb

input:

20 190
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
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 20
3 4
3 5
3 6
3 7
3 8
3 9
3 10
3 11
3 12
3 13
3 14
3 15
3 16
3 17
3 18
3 19
3 20
4 5
4 6
4 7
4 8
4 9
4 10
4 11
4 12
4 13
4 14...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Subtask #2:

score: 6
Acceptable Answer

Test #65:

score: 8
Accepted
time: 0ms
memory: 3652kb

input:

1 0

output:

YES
1
1

result:

ok correct token and optimal solution!

Test #66:

score: 8
Accepted
time: 0ms
memory: 3676kb

input:

2 1
1 2

output:

YES
2
1 1

result:

ok correct token and optimal solution!

Test #67:

score: 8
Accepted
time: 0ms
memory: 3656kb

input:

3 2
1 2
2 3

output:

YES
2
2 2

result:

ok correct token and optimal solution!

Test #68:

score: 6
Acceptable Answer
time: 0ms
memory: 3680kb

input:

4 3
1 2
2 3
3 4

output:

YES
6
1 2 3 3 2 1 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #69:

score: 6
Acceptable Answer
time: 0ms
memory: 3612kb

input:

5 4
1 2
2 3
3 4
4 5

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #70:

score: 6
Acceptable Answer
time: 0ms
memory: 3724kb

input:

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

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #71:

score: 6
Acceptable Answer
time: 0ms
memory: 3740kb

input:

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

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #72:

score: 6
Acceptable Answer
time: 0ms
memory: 3664kb

input:

8 7
1 2
2 3
3 4
4 5
5 6
6 7
7 8

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #73:

score: 6
Acceptable Answer
time: 0ms
memory: 3588kb

input:

9 8
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9

output:

YES
20
1 2 3 4 5 6 7 8 9 8 8 9 8 7 6 5 4 3 2 1 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #74:

score: 6
Acceptable Answer
time: 0ms
memory: 3592kb

input:

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

output:

YES
18
1 2 3 4 5 6 7 8 9 9 8 7 6 5 4 3 2 1 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #75:

score: 6
Acceptable Answer
time: 0ms
memory: 3752kb

input:

944 943
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 ...

output:

YES
1886
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #76:

score: 6
Acceptable Answer
time: 1ms
memory: 3784kb

input:

515 514
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 ...

output:

YES
1032
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #77:

score: 6
Acceptable Answer
time: 1ms
memory: 3664kb

input:

608 607
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 ...

output:

YES
1214
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #78:

score: 6
Acceptable Answer
time: 0ms
memory: 3684kb

input:

642 641
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 ...

output:

YES
1282
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #79:

score: 6
Acceptable Answer
time: 1ms
memory: 3672kb

input:

681 680
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 ...

output:

YES
1364
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #80:

score: 6
Acceptable Answer
time: 1ms
memory: 3784kb

input:

996 995
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 ...

output:

YES
1990
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #81:

score: 6
Acceptable Answer
time: 0ms
memory: 3728kb

input:

997 996
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 ...

output:

YES
1996
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #82:

score: 6
Acceptable Answer
time: 1ms
memory: 3704kb

input:

998 997
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 ...

output:

YES
1994
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #83:

score: 6
Acceptable Answer
time: 0ms
memory: 3768kb

input:

999 998
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 ...

output:

YES
2000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #84:

score: 6
Acceptable Answer
time: 1ms
memory: 3852kb

input:

1000 999
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...

output:

YES
1998
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

result:

points 0.750 correct token and valid (but not optimal) solution!

Subtask #3:

score: 60
Acceptable Answer

Test #85:

score: 80
Accepted
time: 0ms
memory: 3664kb

input:

1 0

output:

YES
1
1

result:

ok correct token and optimal solution!

Test #86:

score: 80
Accepted
time: 0ms
memory: 3736kb

input:

2 1
1 2

output:

YES
2
1 1

result:

ok correct token and optimal solution!

Test #87:

score: 60
Acceptable Answer
time: 0ms
memory: 3612kb

input:

5 4
1 2
2 3
3 4
4 5

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #88:

score: 60
Acceptable Answer
time: 0ms
memory: 3720kb

input:

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

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #89:

score: 80
Accepted
time: 0ms
memory: 3648kb

input:

4 3
1 2
1 3
1 4

output:

YES
2
1 1

result:

ok correct token and optimal solution!

Test #90:

score: 60
Acceptable Answer
time: 0ms
memory: 3596kb

input:

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

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #91:

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

input:

3 3
1 2
2 3
3 1

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #92:

score: 60
Acceptable Answer
time: 0ms
memory: 3740kb

input:

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

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #93:

score: 80
Accepted
time: 0ms
memory: 3660kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #94:

score: 60
Acceptable Answer
time: 0ms
memory: 3740kb

input:

9 8
1 2
2 3
3 4
1 5
5 6
6 7
1 8
8 9

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #95:

score: 60
Acceptable Answer
time: 0ms
memory: 3584kb

input:

8 7
1 2
2 3
3 4
1 5
5 6
6 7
1 8

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #96:

score: 60
Acceptable Answer
time: 0ms
memory: 3720kb

input:

8 7
1 2
2 3
3 4
1 5
5 6
1 7
7 8

output:

YES
14
6 5 1 7 1 2 3 3 2 1 7 1 5 6 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #97:

score: 60
Acceptable Answer
time: 0ms
memory: 3588kb

input:

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

output:

YES
10
6 5 1 2 3 3 2 1 5 6 

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #98:

score: 60
Acceptable Answer
time: 0ms
memory: 3580kb

input:

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

output:

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

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #99:

score: 80
Accepted
time: 1ms
memory: 3688kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #100:

score: 80
Accepted
time: 1ms
memory: 3624kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #101:

score: 80
Accepted
time: 1ms
memory: 3752kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #102:

score: 80
Accepted
time: 1ms
memory: 3680kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #103:

score: 80
Accepted
time: 1ms
memory: 3624kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #104:

score: 80
Accepted
time: 0ms
memory: 3776kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #105:

score: 80
Accepted
time: 1ms
memory: 3756kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #106:

score: 80
Accepted
time: 1ms
memory: 3776kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #107:

score: 80
Accepted
time: 1ms
memory: 3776kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #108:

score: 80
Accepted
time: 1ms
memory: 3612kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #109:

score: 60
Acceptable Answer
time: 0ms
memory: 3796kb

input:

985 984
251 255
95 98
532 533
756 252
317 513
217 219
69 73
107 110
666 667
447 453
366 9
138 141
94 351
359 662
316 86
137 342
268 270
944 946
565 258
210 319
958 890
109 80
270 271
256 752
180 183
6 8
18 19
918 47
519 525
544 714
492 495
531 532
898 589
543 548
757 220
671 673
740 741
680 681
327 ...

output:

YES
1732
1 4 5 6 8 11 14 17 799 17 18 19 676 19 20 907 20 23 24 27 29 30 830 30 313 30 813 30 31 32 33 34 36 37 38 39 40 42 43 78 43 44 46 49 51 54 166 54 463 54 55 280 55 57 58 136 58 59 231 59 61 63 64 561 64 65 66 67 68 650 68 69 105 69 436 69 324 69 73 662 73 80 73 74 77 79 659 79 81 82 83 85 86...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #110:

score: 60
Acceptable Answer
time: 1ms
memory: 3740kb

input:

869 868
140 860
159 162
780 19
396 345
496 573
250 486
242 360
232 737
120 124
751 756
273 274
730 38
75 606
321 324
94 96
212 215
256 257
762 512
540 541
381 386
334 638
826 632
481 292
291 292
603 81
359 229
532 490
255 30
403 583
20 591
100 640
73 329
634 570
307 605
124 128
591 495
670 671
197 1...

output:

YES
1572
1 6 9 11 744 11 14 16 18 19 780 19 22 23 26 529 26 322 26 28 8 28 32 784 32 653 32 34 750 34 37 38 730 38 39 43 44 318 44 47 48 49 50 52 53 59 60 62 214 62 63 68 619 68 71 72 74 76 238 76 77 78 573 78 79 82 326 82 674 82 638 82 84 86 87 88 94 783 94 96 97 61 97 98 99 106 560 106 110 112 817...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #111:

score: 60
Acceptable Answer
time: 1ms
memory: 3716kb

input:

837 836
641 391
239 832
613 614
336 284
775 777
574 762
690 691
652 534
486 488
145 147
663 667
116 339
493 495
566 464
427 811
813 66
592 787
833 835
385 829
731 733
544 548
199 201
684 703
671 672
114 270
679 682
71 252
481 482
269 133
76 675
590 591
37 491
105 824
505 7
643 122
542 543
325 326
31...

output:

YES
1544
506 2 442 2 1 2 13 14 15 822 15 18 19 22 23 24 26 452 26 28 31 376 31 32 35 36 583 36 38 339 38 42 43 46 47 710 47 51 549 51 52 54 312 54 521 54 57 692 57 98 57 58 266 58 60 62 63 64 138 64 65 69 70 625 70 75 698 75 82 86 88 90 91 225 91 701 91 92 93 96 510 96 99 100 444 100 101 104 491 104...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #112:

score: 60
Acceptable Answer
time: 1ms
memory: 3672kb

input:

776 775
497 498
134 352
632 633
296 348
412 383
78 697
272 273
109 111
447 448
462 464
685 361
214 217
596 597
513 514
374 255
292 294
250 90
481 482
636 405
136 138
534 537
126 383
616 617
450 520
111 113
382 383
686 687
604 610
38 41
606 410
258 261
457 697
171 376
764 765
555 556
533 534
661 663
...

output:

YES
1372
1 2 4 86 4 5 223 5 6 729 6 7 9 108 9 10 11 13 526 13 535 13 15 470 15 18 710 18 707 18 19 21 115 21 22 24 25 60 25 30 12 30 466 30 38 41 200 41 42 44 46 47 48 50 268 50 760 50 97 50 52 54 202 54 613 54 55 255 55 58 61 64 66 70 655 70 71 427 71 80 85 88 89 346 89 92 95 431 95 96 622 96 624 9...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #113:

score: 60
Acceptable Answer
time: 1ms
memory: 3724kb

input:

967 966
255 257
894 455
468 235
930 920
608 49
929 319
196 44
646 782
473 474
710 100
6 408
928 931
612 616
89 135
661 894
259 19
709 714
727 729
610 612
954 956
349 88
665 642
338 617
489 491
944 945
634 128
935 938
311 312
963 964
717 553
421 13
462 72
504 116
735 736
97 3
68 841
884 885
865 199
2...

output:

YES
1808
907 575 2 3 97 3 4 5 10 11 490 11 12 105 12 16 565 16 18 20 293 20 22 863 22 25 28 31 33 37 38 124 38 39 41 920 41 43 44 196 44 643 44 523 44 47 595 47 48 49 608 49 50 58 50 52 59 62 63 64 69 71 72 462 72 73 74 76 77 78 80 84 85 87 942 87 88 349 88 91 92 94 95 98 101 712 101 103 278 103 107...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #114:

score: 60
Acceptable Answer
time: 1ms
memory: 3712kb

input:

813 812
688 422
142 144
217 31
95 98
429 511
193 199
655 656
326 768
764 765
625 74
137 138
317 174
677 679
255 257
311 124
300 68
666 163
315 224
31 37
427 432
210 103
108 109
483 484
377 399
372 258
101 106
384 570
712 125
785 357
35 598
743 670
710 639
588 738
341 661
452 172
699 3
202 358
556 55...

output:

YES
1508
697 812 811 810 500 810 809 808 806 420 806 804 49 804 803 802 800 129 800 798 792 791 786 784 783 779 775 773 227 773 124 773 772 767 765 764 763 762 235 762 759 751 746 744 742 740 739 738 588 738 663 738 734 733 732 731 730 511 730 724 726 724 723 721 719 717 716 713 708 813 708 635 708 ...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #115:

score: 60
Acceptable Answer
time: 1ms
memory: 3740kb

input:

1000 999
347 349
771 310
924 925
677 42
67 68
52 668
687 689
117 119
139 140
458 459
118 172
983 985
474 115
921 922
363 147
462 464
897 839
673 674
1 2
930 931
717 719
248 249
65 67
755 491
233 235
429 997
551 554
974 619
302 305
339 476
681 683
491 492
976 491
662 663
645 28
844 390
544 609
367 80...

output:

YES
1768
917 637 1 2 5 6 968 6 7 397 7 11 12 16 17 20 872 20 24 32 33 35 478 35 37 40 355 40 41 42 677 42 76 42 45 46 48 297 48 51 935 51 54 55 58 60 289 60 61 63 64 391 64 65 753 65 67 68 358 68 70 518 70 71 146 71 72 75 85 86 89 90 778 90 95 97 562 97 98 99 102 104 105 107 110 111 601 111 366 111 ...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #116:

score: 60
Acceptable Answer
time: 1ms
memory: 3672kb

input:

983 982
511 351
771 777
336 337
944 762
804 808
276 278
203 716
646 115
545 134
51 210
57 730
549 550
537 538
748 921
381 917
245 247
482 702
490 866
638 639
402 403
49 50
602 372
326 328
489 493
321 921
373 459
653 184
290 295
842 843
132 578
866 867
211 410
399 802
198 199
394 338
40 41
910 356
32...

output:

YES
1826
57 730 397 730 167 730 535 730 1 911 1 2 822 2 3 4 927 4 6 46 6 7 9 10 13 16 18 19 58 19 21 22 23 26 28 30 31 33 35 38 931 38 42 38 39 40 455 40 41 658 41 43 48 49 941 49 50 53 877 53 277 53 54 70 54 59 116 59 61 62 65 68 72 73 74 78 79 80 81 82 450 82 88 89 90 92 93 94 358 94 95 868 95 100...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #117:

score: 60
Acceptable Answer
time: 1ms
memory: 3672kb

input:

760 759
92 713
719 722
717 719
242 243
164 165
333 37
549 550
509 513
217 380
648 650
317 177
543 544
26 2
470 473
401 403
51 477
149 150
608 613
520 62
409 410
540 542
295 682
456 136
404 354
749 718
90 417
682 683
573 616
252 78
248 250
265 267
230 231
267 271
113 227
72 288
165 167
699 119
700 43...

output:

YES
1392
26 2 6 350 6 8 10 12 13 14 17 351 17 18 20 21 22 718 22 24 27 31 32 33 166 33 34 176 34 201 34 35 517 35 36 37 333 37 59 37 39 506 39 40 41 43 44 45 649 45 50 52 56 61 275 61 63 430 63 66 68 114 68 70 73 587 73 74 76 575 76 77 78 252 78 262 78 82 383 82 489 82 83 46 83 85 86 85 87 711 87 69...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #118:

score: 60
Acceptable Answer
time: 1ms
memory: 3688kb

input:

975 974
843 781
600 601
493 871
254 825
809 492
814 815
819 731
47 49
295 297
645 329
498 499
652 653
523 367
936 939
335 336
272 304
446 447
753 754
924 337
799 86
286 367
535 537
248 249
235 242
704 142
320 321
230 231
808 151
735 738
623 628
395 298
872 10
629 946
36 757
108 283
833 836
15 16
640...

output:

YES
1784
161 962 2 3 5 134 5 6 8 9 11 13 46 13 14 15 831 15 16 18 19 20 483 20 542 20 21 22 469 22 781 22 23 24 30 33 37 39 41 42 44 378 44 45 47 49 151 49 277 49 50 51 52 53 873 53 56 57 59 588 59 60 825 60 62 64 65 66 75 76 436 76 79 914 79 81 83 84 916 84 85 253 85 87 89 90 95 90 803 90 91 96 97 ...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #119:

score: 60
Acceptable Answer
time: 1ms
memory: 3744kb

input:

848 847
182 183
203 658
328 329
525 528
240 139
268 269
127 128
761 762
38 39
491 492
678 629
728 659
314 315
132 171
1 726
250 251
335 336
765 767
417 419
649 650
481 171
646 647
510 727
746 95
296 298
651 655
753 606
43 45
390 391
793 794
246 247
566 567
320 714
375 259
640 709
562 564
333 797
434...

output:

YES
1488
195 162 3 5 6 7 615 7 8 57 8 11 12 13 14 17 19 20 22 25 670 25 31 123 31 32 34 164 34 38 829 38 39 40 43 45 46 617 46 47 72 47 48 50 51 54 55 58 737 58 61 652 61 62 64 67 68 409 68 70 71 73 538 73 75 78 81 305 81 82 83 84 85 89 90 91 92 93 658 93 98 237 98 777 98 27 98 101 107 108 109 110 1...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #120:

score: 60
Acceptable Answer
time: 0ms
memory: 3664kb

input:

874 873
851 584
625 627
442 444
596 599
367 368
336 337
634 68
468 469
590 593
228 229
742 414
690 691
296 692
17 18
559 561
423 556
422 424
46 47
210 211
213 214
808 813
428 429
317 318
610 125
186 360
575 577
805 113
768 769
611 612
51 464
376 852
735 440
281 283
522 360
35 295
225 228
592 833
502...

output:

YES
1588
873 872 871 869 868 867 866 865 864 862 860 859 858 138 858 856 854 853 684 853 849 848 847 844 839 76 839 838 840 838 837 139 837 836 834 833 592 833 832 831 827 826 650 826 823 820 819 816 815 813 808 804 803 800 799 609 799 445 799 793 792 136 792 791 789 809 789 788 606 788 786 785 783 ...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #121:

score: 60
Acceptable Answer
time: 1ms
memory: 3664kb

input:

836 835
232 296
452 453
395 398
300 688
399 404
647 648
226 290
416 419
134 135
524 525
236 240
493 77
588 5
210 214
471 473
34 35
542 51
522 230
629 407
149 152
624 790
700 702
562 563
197 744
461 462
580 583
685 785
206 833
33 34
528 529
169 369
216 217
720 722
24 25
259 628
590 616
739 685
446 14...

output:

YES
1530
1 2 3 4 6 7 8 346 8 11 553 11 12 14 788 14 15 16 514 16 17 18 19 20 21 22 24 688 24 25 27 33 34 35 605 35 448 35 36 37 41 414 41 119 41 42 642 42 44 172 44 45 302 45 84 45 46 47 221 47 48 50 106 50 55 56 58 340 58 62 63 64 97 64 417 64 65 68 70 71 49 71 274 71 72 75 76 77 493 77 736 77 79 3...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #122:

score: 60
Acceptable Answer
time: 1ms
memory: 3808kb

input:

845 844
115 716
497 499
831 483
709 155
595 524
489 390
773 545
495 496
283 284
322 324
766 160
205 7
193 194
584 88
729 731
403 404
392 394
69 475
445 448
706 707
564 318
238 702
597 488
388 296
126 127
557 558
288 428
454 462
311 50
674 273
138 139
599 417
187 349
48 51
132 304
106 108
490 492
240...

output:

YES
1564
1 3 4 7 205 7 8 9 10 11 45 11 390 11 680 11 12 487 12 118 12 13 15 47 15 16 17 541 17 18 20 286 20 24 25 26 27 19 27 29 30 31 190 31 32 420 32 36 37 74 37 2 37 39 40 586 40 42 44 46 48 51 417 51 52 526 52 53 54 55 253 55 58 60 61 63 594 63 64 65 66 68 71 75 76 77 78 6 78 79 84 752 84 86 88 ...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #123:

score: 60
Acceptable Answer
time: 0ms
memory: 3816kb

input:

886 885
837 838
767 768
178 182
295 135
614 617
192 195
763 766
171 172
854 151
497 532
586 550
302 515
729 733
158 160
253 254
850 852
724 408
859 860
346 347
335 338
288 59
97 226
672 673
266 267
128 130
25 237
754 755
39 364
662 34
228 532
247 248
720 496
239 243
764 480
162 127
546 653
424 327
7...

output:

YES
1648
330 463 1 4 503 4 5 508 5 6 605 6 7 8 9 10 63 10 13 14 15 434 15 532 15 17 387 17 18 19 2 19 874 19 131 19 21 194 21 483 21 23 26 574 26 27 177 27 28 34 662 34 35 490 35 36 41 645 41 42 43 44 45 364 45 47 48 49 50 51 53 54 55 56 170 56 58 293 58 60 808 60 65 73 76 214 76 78 216 78 79 80 81 ...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #124:

score: 60
Acceptable Answer
time: 1ms
memory: 3704kb

input:

754 753
530 495
370 112
710 711
448 449
492 496
386 629
724 708
351 172
615 617
101 36
381 425
167 23
189 449
518 523
736 630
414 404
15 16
154 95
648 649
551 753
133 134
497 77
401 402
261 264
514 341
183 184
546 25
597 183
245 209
250 97
730 732
126 133
231 232
220 104
704 706
385 387
428 163
132 ...

output:

YES
1406
1 6 7 8 9 14 107 14 15 16 322 16 17 19 20 21 22 24 410 24 423 24 474 24 26 166 26 27 30 31 456 31 34 645 34 36 101 36 37 114 37 480 37 39 441 39 43 273 43 44 47 564 47 574 47 48 521 48 54 55 573 55 57 353 57 58 335 58 61 62 68 70 71 233 71 50 71 72 316 72 73 75 76 77 497 77 79 80 82 85 338 ...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #125:

score: 60
Acceptable Answer
time: 1ms
memory: 3680kb

input:

795 794
392 487
585 371
450 452
162 163
200 202
529 571
503 504
695 696
216 5
500 309
466 469
765 766
281 282
236 342
521 539
402 403
405 552
658 660
583 327
101 102
135 138
645 567
166 167
79 82
593 594
59 60
232 233
4 5
173 174
352 337
355 356
319 624
790 794
348 775
226 73
551 765
345 573
207 209...

output:

YES
1440
1 3 4 5 216 5 7 9 10 11 562 11 396 11 13 16 17 18 24 25 26 65 26 27 35 41 43 44 45 46 780 46 47 48 50 51 52 54 55 56 58 736 58 59 60 61 62 63 64 66 67 68 69 72 296 72 75 448 75 77 79 82 264 82 86 87 554 87 89 98 775 98 99 100 101 102 221 102 104 107 108 109 746 109 110 116 118 119 15 119 12...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #126:

score: 60
Acceptable Answer
time: 1ms
memory: 3744kb

input:

910 909
469 470
313 315
640 641
605 608
710 711
491 492
804 805
354 358
359 362
650 652
326 845
565 182
574 576
573 574
237 199
96 97
734 737
834 436
269 271
532 534
238 245
665 667
598 599
123 872
490 485
618 498
603 605
616 619
547 852
270 593
133 561
50 52
601 603
264 265
307 308
884 885
622 263
...

output:

YES
1708
3 4 6 9 64 9 10 13 173 13 18 20 780 20 25 32 21 32 34 35 36 37 38 40 42 43 558 43 47 48 191 48 50 52 291 52 53 54 55 56 476 56 57 62 63 593 63 67 68 793 68 70 268 70 71 75 367 75 76 77 99 77 78 280 78 79 80 220 80 81 82 83 790 83 799 83 85 87 89 625 89 90 181 90 95 96 365 96 97 84 97 98 100...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #127:

score: 60
Acceptable Answer
time: 1ms
memory: 3716kb

input:

805 804
287 416
54 470
752 467
256 257
269 270
682 683
231 232
161 745
135 137
106 108
30 408
222 678
777 778
684 692
549 694
749 370
343 434
31 494
685 42
168 776
449 329
603 50
283 591
320 622
618 408
74 75
691 528
528 333
321 288
332 333
762 763
458 459
466 467
475 476
344 44
363 365
101 753
505 ...

output:

YES
1488
384 251 37 251 2 3 4 7 8 393 8 9 567 9 17 9 693 9 12 13 14 15 751 15 18 24 347 24 766 24 28 29 32 35 226 35 70 35 39 40 43 45 48 49 53 55 116 55 56 57 11 57 60 61 63 64 69 71 74 75 80 380 80 81 84 86 738 86 88 89 92 93 94 95 96 97 484 97 98 99 102 388 102 104 197 104 105 106 108 109 110 113...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #128:

score: 60
Acceptable Answer
time: 1ms
memory: 3752kb

input:

979 978
234 236
224 225
373 725
276 545
969 465
291 293
565 150
127 128
220 224
131 661
339 747
16 139
641 642
414 582
193 767
871 875
937 938
706 406
965 966
637 327
823 415
688 476
125 438
499 504
334 226
534 255
862 159
667 674
381 409
213 214
808 159
836 839
631 633
840 841
537 806
602 605
444 4...

output:

YES
1768
1 3 4 5 90 5 6 9 15 18 24 26 861 26 27 30 31 34 824 34 873 34 37 41 43 46 395 46 48 50 51 54 55 56 57 59 61 294 61 64 65 66 70 71 72 952 72 73 300 73 75 76 77 79 81 83 85 786 85 87 88 159 88 91 343 91 554 91 92 93 95 96 97 98 99 100 101 429 101 103 644 103 905 103 654 103 105 108 502 108 10...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #129:

score: 60
Acceptable Answer
time: 1ms
memory: 3660kb

input:

876 875
543 694
199 52
213 215
696 440
763 13
30 57
641 743
78 80
689 107
101 104
633 634
374 377
739 301
593 594
5 149
387 136
547 720
301 281
345 549
871 872
870 871
305 814
589 749
80 84
685 692
463 176
261 543
63 65
49 52
7 10
117 277
407 857
502 505
462 464
158 388
709 101
585 586
425 83
332 33...

output:

YES
1632
240 873 874 873 872 871 870 582 870 869 867 863 862 861 858 857 407 857 555 857 854 853 852 850 848 844 337 844 843 842 841 838 136 838 837 835 834 833 832 831 830 829 826 825 821 820 819 817 816 815 814 808 806 339 806 804 802 799 142 799 798 796 793 792 790 789 260 789 788 296 788 787 785...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #130:

score: 60
Acceptable Answer
time: 1ms
memory: 3812kb

input:

873 872
187 373
650 664
223 570
838 840
501 567
249 250
277 278
110 334
244 535
147 667
677 255
826 827
757 691
153 643
92 309
487 489
84 766
664 667
804 806
416 419
283 456
430 437
83 85
378 330
794 797
675 680
549 552
817 821
48 49
236 615
570 572
688 259
548 582
631 871
702 389
796 769
586 47
811...

output:

YES
1618
632 534 333 534 771 534 5 6 7 50 7 10 414 10 11 556 11 13 14 118 14 594 14 15 16 18 863 18 21 22 786 22 33 269 33 34 35 36 105 36 313 36 41 42 43 776 43 44 48 49 52 297 52 526 52 54 538 54 60 61 64 327 64 65 66 67 194 67 69 329 69 70 71 72 74 79 437 79 80 82 83 85 86 90 91 619 91 94 812 94 ...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #131:

score: 60
Acceptable Answer
time: 1ms
memory: 3652kb

input:

791 790
495 497
33 691
70 71
109 112
361 648
337 338
663 664
87 117
69 96
764 765
525 194
493 494
270 271
585 170
548 549
200 575
251 252
239 485
675 70
686 180
747 748
305 235
237 238
473 474
172 173
62 64
542 543
460 463
707 708
532 533
454 455
357 362
426 316
555 560
587 588
300 302
345 59
405 43...

output:

YES
1470
785 6 3 6 8 755 8 355 8 12 96 12 13 371 13 219 13 17 146 17 18 20 480 20 21 22 27 29 364 29 30 31 32 762 32 34 37 39 489 39 41 43 620 43 44 310 44 45 46 47 48 247 48 49 50 110 50 52 385 52 55 57 61 62 64 66 67 68 11 68 70 675 70 71 72 73 343 73 75 77 398 77 78 82 217 82 85 91 596 91 93 94 6...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #132:

score: 60
Acceptable Answer
time: 1ms
memory: 3744kb

input:

812 811
786 787
346 347
86 411
398 400
300 301
67 69
729 155
277 279
734 497
543 544
281 516
718 722
695 408
450 453
710 713
232 233
157 159
516 521
528 295
513 305
390 396
12 15
739 768
330 331
474 724
303 247
18 20
597 563
395 396
148 470
26 778
717 678
216 641
358 309
478 479
578 580
31 169
473 6...

output:

YES
1490
2 4 5 6 11 13 14 15 12 15 18 20 22 28 29 32 33 666 33 36 37 38 39 40 158 40 41 642 41 42 628 42 44 45 283 45 50 382 50 51 89 51 55 56 57 470 57 60 61 356 61 64 67 69 119 69 638 69 475 69 71 355 71 74 75 76 80 59 80 87 90 92 93 96 112 96 97 98 461 98 99 100 101 17 101 102 106 108 109 110 227...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #133:

score: 60
Acceptable Answer
time: 0ms
memory: 3800kb

input:

986 985
24 673
878 220
564 354
131 730
224 225
589 590
333 188
711 456
871 543
467 468
653 655
631 828
150 109
858 860
538 541
909 911
501 503
762 765
104 105
296 45
339 340
376 779
575 578
470 87
134 289
742 745
450 369
372 124
122 417
14 16
931 273
916 823
821 16
891 895
300 422
877 882
944 948
91...

output:

YES
1836
1 3 7 12 13 14 16 821 16 17 658 17 18 19 35 19 20 21 28 31 235 31 32 33 316 33 36 40 41 956 41 44 47 50 51 52 389 52 54 55 59 60 65 66 68 71 72 73 74 443 74 75 77 78 456 78 79 80 750 80 82 83 84 86 87 470 87 552 87 88 58 88 90 99 90 92 94 432 94 96 330 96 97 100 211 100 102 9 102 103 25 103...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #134:

score: 60
Acceptable Answer
time: 0ms
memory: 3716kb

input:

910 909
708 904
684 688
722 815
842 594
91 397
870 62
161 266
363 906
248 250
565 615
99 100
820 821
269 272
290 291
374 376
454 592
467 51
39 41
448 144
503 504
103 105
221 855
234 16
316 319
899 800
285 87
593 598
515 75
378 380
117 118
351 353
125 488
465 466
523 886
330 820
153 154
11 12
562 447...

output:

YES
1664
321 599 542 599 1 5 9 331 9 10 11 12 469 12 13 14 16 234 16 18 20 22 335 22 23 25 27 29 30 35 36 39 41 468 41 45 605 45 47 50 63 50 52 55 762 55 56 60 488 60 62 66 265 66 69 73 76 77 79 80 81 82 361 82 84 87 285 87 88 420 88 89 90 93 96 97 643 97 99 100 436 100 101 827 101 103 105 107 111 1...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #135:

score: 60
Acceptable Answer
time: 1ms
memory: 3656kb

input:

822 821
630 614
505 345
471 472
2 410
246 247
522 523
451 452
48 82
648 649
767 768
414 756
532 533
638 724
128 563
658 661
262 264
85 738
257 262
113 115
162 168
635 636
317 318
339 341
418 304
752 486
750 572
54 505
131 409
417 8
95 248
560 307
709 235
412 413
743 507
569 571
469 507
403 404
655 3...

output:

YES
1516
1 5 6 7 10 99 10 18 19 260 19 21 22 23 279 23 24 43 24 25 27 28 31 811 31 32 33 34 35 455 35 39 517 39 40 44 114 44 46 47 51 52 53 55 56 57 58 62 67 71 715 71 72 74 77 78 80 81 83 86 477 86 87 89 681 89 611 89 93 94 96 98 610 98 101 102 105 106 107 108 111 113 651 113 115 116 421 116 117 11...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #136:

score: 60
Acceptable Answer
time: 0ms
memory: 3812kb

input:

893 892
406 700
263 23
75 76
704 812
720 77
793 413
200 391
431 7
54 548
814 224
66 382
444 445
872 639
136 139
306 309
241 243
237 238
679 680
588 22
240 241
327 328
830 832
121 424
267 268
416 884
177 178
262 370
196 640
115 117
193 194
779 772
380 386
722 725
207 651
630 632
12 14
185 186
649 352...

output:

YES
1600
1 3 4 550 4 5 7 8 9 11 726 11 12 14 16 17 21 22 588 22 141 22 244 22 24 84 24 25 580 25 26 27 29 31 32 853 32 33 35 56 35 36 40 42 43 44 45 46 50 509 50 51 52 55 57 58 67 68 63 68 70 700 70 71 72 75 325 75 76 86 89 90 96 97 100 101 102 135 102 861 102 103 104 105 108 109 110 113 114 115 117...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #137:

score: 60
Acceptable Answer
time: 1ms
memory: 3728kb

input:

996 995
441 443
924 927
687 511
311 168
133 56
36 380
510 512
111 112
391 394
267 844
574 576
622 626
635 640
895 897
193 271
511 795
889 891
705 539
677 133
580 581
586 587
535 52
48 12
952 953
538 517
607 217
83 551
85 547
401 143
501 585
981 982
96 97
597 598
951 952
986 525
372 374
867 596
767 7...

output:

YES
1814
1 2 4 10 12 599 12 14 263 14 18 19 72 19 20 21 23 26 28 29 32 34 35 39 24 39 41 43 50 608 50 52 535 52 54 55 56 133 56 59 61 63 65 66 71 73 773 73 206 73 74 78 741 78 80 82 922 82 87 745 87 95 404 95 490 95 96 97 98 448 98 99 104 105 688 105 107 108 470 108 109 110 111 869 111 371 111 649 1...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #138:

score: 60
Acceptable Answer
time: 0ms
memory: 3724kb

input:

914 913
19 21
314 319
227 485
885 886
316 439
397 400
343 565
114 115
670 450
648 651
310 312
578 580
855 856
806 41
713 714
309 310
725 726
811 424
339 340
724 29
220 541
355 358
297 300
393 394
118 119
278 279
812 813
65 66
908 911
252 88
512 39
128 356
396 174
695 685
511 71
361 798
832 836
689 6...

output:

YES
1700
627 502 615 502 2 3 416 3 7 8 9 13 728 13 16 17 19 177 19 21 372 21 526 21 778 21 22 542 22 23 25 32 702 32 33 137 33 265 33 36 37 263 37 38 39 40 591 40 41 43 82 43 880 43 830 43 44 45 299 45 46 51 544 51 568 51 52 55 57 58 535 58 59 60 63 64 65 66 75 747 75 78 79 80 186 80 81 84 85 86 87 ...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #139:

score: 60
Acceptable Answer
time: 0ms
memory: 3752kb

input:

850 849
566 226
441 442
692 695
335 336
20 24
47 491
518 519
795 796
348 351
588 477
325 327
833 834
602 603
147 818
540 253
42 43
688 486
403 140
76 78
745 747
496 44
802 566
607 230
83 289
399 491
261 345
779 596
434 435
375 686
190 191
276 279
527 637
633 264
473 288
240 776
850 76
803 217
718 72...

output:

YES
1574
2 3 4 660 4 5 6 8 9 11 12 413 12 13 484 13 714 13 14 17 18 19 20 24 249 24 25 26 135 26 31 34 342 34 35 36 38 676 38 40 125 40 42 43 349 43 44 496 44 749 44 46 378 46 49 50 51 367 51 54 56 58 295 58 61 62 63 64 39 64 69 70 451 70 76 850 76 78 80 84 53 84 86 90 138 90 91 93 97 98 193 98 374 ...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #140:

score: 60
Acceptable Answer
time: 1ms
memory: 3688kb

input:

938 937
306 893
298 198
861 862
812 813
786 183
71 547
318 548
877 647
720 454
128 73
210 213
635 636
401 402
367 863
687 545
356 880
649 236
324 326
565 566
921 193
446 447
642 198
239 397
684 688
523 526
358 360
363 368
502 92
229 356
515 516
653 654
544 545
248 490
551 458
375 652
804 249
271 845...

output:

YES
1646
318 548 301 548 800 548 1 3 4 681 4 5 6 252 6 7 8 735 8 9 739 9 10 398 10 11 316 11 639 11 193 11 383 11 12 14 930 14 17 20 24 809 24 26 27 28 495 28 32 33 34 40 42 45 46 420 46 47 48 49 50 165 50 51 53 606 53 54 608 54 55 57 58 62 763 62 63 64 396 64 66 67 164 67 70 72 73 128 73 74 169 74 ...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #141:

score: 60
Acceptable Answer
time: 1ms
memory: 3668kb

input:

937 936
187 188
495 738
690 929
786 909
281 820
78 79
713 717
201 176
901 710
869 379
546 549
744 746
607 611
698 183
391 392
881 882
579 585
728 275
781 290
126 397
734 735
344 49
521 525
650 652
402 403
80 55
608 399
434 435
11 166
492 387
846 842
575 576
166 242
330 331
596 105
246 636
474 464
67...

output:

YES
1700
420 3 7 10 13 17 19 424 19 21 22 23 18 23 195 23 26 29 818 29 32 676 32 34 935 34 36 39 40 296 40 41 43 787 43 44 362 44 45 46 766 46 49 344 49 53 55 58 60 61 639 61 841 61 63 64 600 64 67 68 69 70 138 70 72 908 72 74 77 78 79 174 79 82 86 87 919 87 88 89 337 89 98 99 102 103 682 103 104 10...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #142:

score: 60
Acceptable Answer
time: 1ms
memory: 3748kb

input:

831 830
93 94
555 556
719 677
64 551
49 50
678 679
344 346
107 116
746 751
627 628
18 754
364 149
537 262
539 176
186 190
11 100
136 529
236 741
738 223
729 801
593 533
439 440
600 601
46 47
743 744
378 379
203 676
453 454
668 70
3 675
761 136
550 398
564 227
476 481
752 63
478 37
402 398
508 510
51...

output:

YES
1498
559 2 6 7 8 825 8 12 13 466 13 14 16 17 19 20 24 25 26 27 28 31 33 35 36 37 478 37 621 37 660 37 635 37 40 41 42 43 45 46 170 46 47 48 646 48 49 50 53 54 827 54 55 56 57 58 831 58 59 61 788 61 62 65 532 65 67 30 67 69 73 74 671 74 352 74 355 74 76 235 76 77 78 10 78 80 81 83 85 86 89 319 89...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #143:

score: 60
Acceptable Answer
time: 1ms
memory: 3708kb

input:

794 793
515 516
635 637
235 388
748 753
327 527
762 764
661 664
137 126
29 30
774 324
606 106
297 302
756 757
100 181
163 645
735 132
568 295
304 306
508 510
176 177
383 15
442 445
191 192
95 96
562 565
665 710
331 747
217 221
455 139
415 418
646 647
225 30
373 515
432 434
471 12
369 372
633 635
618...

output:

YES
1488
794 788 787 786 491 786 485 786 676 786 785 684 785 784 782 529 782 781 780 19 780 253 780 777 484 777 776 773 772 771 83 771 222 771 721 771 663 771 770 769 764 666 764 762 761 12 761 759 644 759 758 757 756 754 753 578 753 748 119 748 745 744 532 744 743 493 743 742 739 738 736 424 736 73...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #144:

score: 60
Acceptable Answer
time: 1ms
memory: 3728kb

input:

981 980
957 392
53 54
673 382
868 672
403 307
684 685
312 316
3 4
759 763
396 397
605 239
607 609
435 437
400 404
248 249
978 223
196 197
840 21
953 954
517 519
780 782
210 651
82 189
606 177
875 586
152 155
142 143
532 534
326 327
393 913
770 906
438 441
910 912
558 349
678 679
567 310
408 884
593 ...

output:

YES
1764
1 3 4 8 976 8 11 783 11 13 14 458 14 17 19 20 21 840 21 27 28 30 31 33 633 33 36 471 36 38 230 38 39 549 39 42 43 863 43 47 748 47 61 47 50 161 50 681 50 52 53 54 55 56 58 63 65 32 65 66 732 66 68 74 710 74 75 86 342 86 87 90 148 90 92 906 92 171 92 96 99 100 571 100 101 478 101 103 257 103...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #145:

score: 60
Acceptable Answer
time: 1ms
memory: 3780kb

input:

758 757
412 505
590 591
533 261
215 218
262 264
652 171
722 551
140 109
81 678
536 537
604 607
747 748
237 241
7 235
376 381
570 571
67 526
472 308
257 261
369 371
63 65
160 162
639 640
487 488
292 341
266 245
490 492
145 421
68 192
172 174
173 277
393 395
483 437
400 403
448 79
289 80
554 355
433 4...

output:

YES
1384
530 227 752 757 752 749 186 749 748 747 240 747 746 744 339 744 741 673 741 740 397 740 739 219 739 738 737 735 151 735 734 733 732 330 732 731 729 727 725 724 599 724 715 713 712 709 707 706 182 706 705 703 714 703 586 703 701 700 244 700 699 697 742 697 695 693 691 690 688 685 681 679 402...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #146:

score: 60
Acceptable Answer
time: 1ms
memory: 3728kb

input:

790 789
634 635
649 650
183 631
37 770
163 290
600 5
310 753
311 172
552 368
357 359
764 765
315 420
659 664
250 14
620 514
150 152
744 746
272 664
789 243
520 521
10 11
550 593
364 772
745 141
268 271
61 62
471 628
116 273
191 189
567 42
771 774
180 682
679 680
209 329
775 285
513 514
26 28
194 197...

output:

YES
1450
165 492 4 10 11 251 11 480 11 13 15 414 15 17 19 20 239 20 21 160 21 26 440 26 28 31 35 39 41 49 51 636 51 52 708 52 53 54 18 54 56 58 60 286 60 61 22 61 62 63 65 69 71 229 71 72 73 512 73 79 81 758 81 86 87 279 87 88 90 94 99 220 99 100 102 104 105 106 768 106 702 106 109 110 113 195 113 1...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #147:

score: 60
Acceptable Answer
time: 1ms
memory: 3728kb

input:

770 769
470 508
235 240
329 32
425 427
71 72
99 101
607 609
21 27
371 373
729 731
469 473
92 93
621 622
386 704
663 168
624 625
602 664
150 85
644 645
419 421
682 470
195 197
471 308
727 560
480 349
360 365
655 519
706 707
218 219
518 631
662 665
495 615
197 198
749 173
520 50
291 292
89 173
409 410...

output:

YES
1402
3 6 9 383 9 11 12 13 282 13 269 13 259 13 15 563 15 316 15 16 21 389 21 27 46 27 28 29 30 33 34 36 37 438 37 314 37 38 40 42 44 48 49 50 520 50 95 50 700 50 53 55 56 57 377 57 58 60 61 63 64 68 70 71 72 544 72 74 75 76 79 80 82 84 85 150 85 86 88 109 88 90 92 301 92 595 92 93 94 560 94 188 ...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #148:

score: 60
Acceptable Answer
time: 1ms
memory: 3688kb

input:

975 974
902 701
585 253
813 894
693 541
316 317
739 563
329 330
482 483
104 965
673 812
21 167
841 842
306 309
753 755
518 521
288 289
584 586
543 546
707 842
802 803
811 815
924 928
954 958
142 235
156 366
963 174
277 280
481 703
200 201
717 720
810 247
975 364
440 352
244 246
971 974
563 565
152 6...

output:

YES
1784
478 429 974 971 970 969 313 969 967 49 967 966 965 104 965 964 638 964 961 635 961 960 959 958 660 958 601 958 954 953 952 102 952 668 952 950 947 946 941 940 939 937 935 934 930 929 283 929 928 924 919 766 919 918 916 912 910 907 906 905 900 899 897 896 284 896 893 892 891 889 887 235 887 ...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #149:

score: 80
Accepted
time: 1ms
memory: 3636kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #150:

score: 80
Accepted
time: 1ms
memory: 3780kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #151:

score: 80
Accepted
time: 1ms
memory: 3784kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #152:

score: 80
Accepted
time: 1ms
memory: 3700kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #153:

score: 80
Accepted
time: 1ms
memory: 3716kb

input:

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

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #154:

score: 80
Accepted
time: 1ms
memory: 3676kb

input:

833 92724
621 577
43 201
803 652
5 178
90 42
733 708
76 201
777 186
25 701
468 611
802 351
380 311
643 833
184 26
555 125
403 504
373 554
9 364
707 326
449 74
89 227
679 148
167 353
100 805
806 630
14 130
826 683
478 126
388 386
118 129
28 185
87 191
565 334
307 114
201 731
678 39
346 532
677 245
18...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #155:

score: 80
Accepted
time: 1ms
memory: 3668kb

input:

925 77241
176 465
86 820
901 809
219 510
418 370
89 769
812 326
775 338
669 203
872 450
194 237
671 397
360 157
119 354
397 520
401 94
551 235
321 431
60 710
385 660
364 558
523 394
538 582
327 698
394 586
712 449
87 459
659 186
364 716
290 555
147 910
864 652
721 277
170 21
373 554
534 556
195 634
...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #156:

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

input:

796 213201
727 68
102 595
342 418
312 241
717 83
5 178
775 338
501 707
284 367
655 776
747 795
270 302
164 789
309 204
627 321
189 422
544 667
228 412
265 110
214 91
498 139
290 555
424 521
795 522
647 549
373 554
119 90
156 192
449 74
195 634
753 132
181 691
368 358
22 761
114 374
354 201
725 310
6...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #157:

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

input:

860 137983
266 351
176 465
399 242
254 622
494 217
367 853
722 452
595 558
669 203
51 524
119 354
143 36
422 421
392 152
726 375
177 842
18 334
290 555
195 402
403 504
170 21
603 49
82 841
781 755
142 687
566 415
859 387
181 691
75 400
22 761
294 114
460 334
859 782
711 263
252 744
642 719
660 583
8...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #158:

score: 80
Accepted
time: 1ms
memory: 3628kb

input:

985 243225
889 277
33 440
967 597
940 345
62 852
432 939
708 887
694 806
164 789
733 708
203 889
664 501
613 958
228 412
265 110
892 107
530 418
507 207
809 617
706 707
479 45
373 554
209 569
781 755
873 594
527 499
714 726
859 387
181 691
636 357
167 448
522 721
248 828
47 798
907 777
86 240
605 76...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #159:

score: 80
Accepted
time: 1ms
memory: 3688kb

input:

945 440279
668 732
803 652
312 241
259 938
775 338
669 203
284 367
881 365
203 889
650 136
544 667
122 635
468 611
78 439
569 56
878 50
290 555
184 26
647 549
541 34
834 44
119 90
781 755
859 387
753 132
806 142
700 901
421 228
673 213
446 265
769 327
607 43
787 207
471 846
365 327
921 833
706 389
1...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #160:

score: 80
Accepted
time: 1ms
memory: 3764kb

input:

969 57924
930 166
623 23
879 121
683 418
425 438
925 97
581 527
707 126
489 575
659 476
256 456
664 501
273 617
560 262
424 639
636 497
599 255
548 815
553 963
327 472
366 262
4 781
647 549
373 554
744 946
172 715
433 845
730 237
769 959
610 519
96 536
243 870
619 735
907 777
303 128
711 263
568 111...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #161:

score: 80
Accepted
time: 1ms
memory: 3696kb

input:

807 19564
301 694
323 130
387 449
750 287
309 112
695 490
164 640
147 176
419 695
94 766
5 178
613 45
464 34
137 458
391 581
1 322
803 541
308 101
254 761
699 604
106 48
78 523
612 315
119 165
673 121
13 760
67 223
267 712
397 665
787 497
196 599
293 344
555 125
10 109
132 218
189 279
261 199
798 65...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #162:

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

input:

922 404924
43 201
381 392
418 370
312 241
722 452
775 338
707 126
309 204
203 889
650 136
544 667
168 912
265 110
69 912
569 56
878 50
915 36
68 684
541 34
209 569
119 90
781 755
181 691
75 400
368 358
673 213
725 310
619 735
787 207
471 846
402 211
921 833
499 877
812 906
706 389
28 185
241 208
625...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #163:

score: 80
Accepted
time: 1ms
memory: 3696kb

input:

1000 499500
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...

output:

NO

result:

ok OK there's no successful strategy for Ankica

Test #164:

score: 60
Acceptable Answer
time: 1ms
memory: 3792kb

input:

999 998
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 ...

output:

YES
2000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

result:

points 0.750 correct token and valid (but not optimal) solution!

Test #165:

score: 60
Acceptable Answer
time: 1ms
memory: 3856kb

input:

1000 999
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...

output:

YES
1998
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

result:

points 0.750 correct token and valid (but not optimal) solution!