QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#35511#1812. Interesting ColoringMaMengQiWA 6ms4632kbC++173.7kb2022-06-16 15:32:242022-06-16 15:32:24

详细

Test #1:

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

input:

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

output:

1 2 1 2 1 2 1 2 1 3 4
3 1 2 4
2 1 4
3 1 2 4
3 1 2 3
3 1 2 3
3 1 2 3
3 1 2 3
3 1 2 3
3 1 2 3
2 1 2
2 1 2

result:

ok accepted

Test #2:

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

input:

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

output:

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

result:

ok accepted

Test #3:

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

input:

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

output:

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

result:

ok accepted

Test #4:

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

input:

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

output:

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

result:

ok accepted

Test #5:

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

input:

30 50
16 24
13 30
22 27
6 12
26 30
23 25
19 22
8 24
11 22
5 21
1 5
5 19
5 8
5 6
2 14
7 17
20 22
2 30
5 14
3 21
21 30
20 25
6 9
16 23
25 28
4 22
10 18
5 15
12 26
22 30
11 17
1 3
4 20
2 21
20 28
6 29
12 22
7 30
2 26
13 15
18 22
10 22
5 23
5 24
12 29
9 16
9 24
5 22
3 5
25 27

output:

2 1 1 1 2 1 2 1 6 2 1 7 8 9 2 2 3 10 11 1 3 2 3 3 12 4 1 13 3 14 1 15 16 17 1 2 18 19 1 2 5 20 21 22 23 1 24 25 26 27
4 1 2 3 22
3 2 3 13
3 2 27 3
3 9 2 3
3 17 1 3
4 1 2 3 25
4 1 2 3 7
4 1 2 3 8
4 1 2 19 3
4 1 2 3 11
3 1 2 15
3 1 2 3
3 1 2 3
3 1 2 3
4 1 2 3 11
5 1 2 19 3 6
4 1 2 3 25
2 1 2
3 1 2 3
3...

result:

ok accepted

Test #6:

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

input:

30 50
14 24
8 11
6 16
22 23
20 28
24 30
13 15
4 30
2 25
3 24
10 16
11 18
4 27
21 22
11 22
4 15
11 29
12 13
4 11
11 26
6 22
1 16
13 24
2 24
10 22
13 17
13 29
2 12
11 30
1 21
15 17
4 22
7 15
5 21
1 20
11 27
1 11
9 25
16 18
9 17
19 24
13 14
11 12
3 30
7 30
22 26
19 30
23 27
8 28
5 11

output:

4 6 2 3 2 2 2 1 1 1 7 2 2 8 9 10 3 11 12 4 1 1 13 14 2 15 16 2 17 18 3 19 1 1 20 21 22 2 23 1 3 1 1 24 25 26 27 1 1 5
2 1 13
5 1 2 3 20 4
3 1 2 7
3 1 2 19
6 1 2 3 20 4 6
2 27 3
4 1 2 4 10
4 1 2 4 10
5 1 2 3 4 14
2 24 2
2 1 2
5 1 2 3 4 23
3 1 19 3
5 1 2 3 4 5
4 1 2 3 4
3 1 2 4
4 16 1 2 3
3 1 2 3
4 1 ...

result:

ok accepted

Test #7:

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

input:

30 50
25 30
15 21
3 26
10 11
13 27
4 11
15 20
14 29
15 28
9 16
10 24
8 27
18 28
12 29
13 20
5 11
22 27
17 20
4 16
25 27
7 27
6 9
2 27
21 27
1 19
10 14
20 25
3 27
5 27
3 29
6 8
12 13
10 16
9 25
18 27
13 18
1 27
27 30
2 11
7 14
19 27
27 29
23 27
17 22
6 28
24 27
12 20
2 3
16 23
26 27

output:

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

result:

ok accepted

Test #8:

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

input:

100 180
2 53
55 72
52 58
72 88
53 70
1 89
14 94
42 67
72 85
39 77
79 96
58 75
34 40
75 77
45 88
76 85
61 80
11 28
48 68
68 94
38 47
32 45
30 72
1 99
26 83
72 98
24 31
10 27
7 80
62 72
75 87
70 96
1 82
37 41
2 88
20 35
35 90
9 19
29 69
29 30
22 83
13 18
72 94
28 80
14 27
56 79
11 88
5 94
27 68
34 81
...

output:

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

result:

ok accepted

Test #9:

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

input:

100 180
34 61
21 95
49 92
52 62
19 27
50 76
35 94
50 78
21 28
20 48
58 85
4 36
47 93
26 50
55 63
41 71
53 94
82 94
37 49
53 82
50 58
29 97
50 67
68 78
1 75
58 84
15 79
66 91
14 59
40 99
9 12
67 98
37 50
26 35
15 84
15 80
24 70
4 64
29 70
24 93
46 83
38 97
13 89
41 54
50 74
51 86
30 61
68 96
18 35
46...

output:

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

result:

ok accepted

Test #10:

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

input:

100 180
14 98
15 79
65 97
25 85
2 65
15 99
16 94
47 87
38 55
10 44
43 98
15 36
41 89
46 76
38 59
15 26
14 85
39 98
67 80
6 14
33 35
11 41
15 69
2 64
15 54
6 40
6 74
20 89
5 15
12 68
19 89
15 96
30 57
15 53
10 81
12 53
15 27
45 98
20 78
22 31
5 9
51 95
42 91
62 86
75 81
17 82
81 85
43 46
20 29
68 99
...

output:

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

result:

ok accepted

Test #11:

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

input:

100 180
43 90
40 89
36 37
37 66
5 100
37 70
23 73
28 95
37 50
1 37
26 40
47 77
18 37
15 81
23 25
20 37
32 54
67 99
94 99
28 29
5 37
28 37
29 72
35 41
71 77
39 100
48 54
21 40
69 95
15 37
11 89
71 90
17 96
37 41
1 11
24 96
81 83
31 58
52 89
27 94
14 38
27 84
57 71
55 78
59 75
29 38
57 91
37 85
66 67
...

output:

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

result:

ok accepted

Test #12:

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

input:

111 222
1 60
7 55
60 110
42 79
58 61
100 109
30 85
17 59
52 84
30 111
23 87
51 62
17 30
34 55
71 104
65 67
46 99
89 108
1 90
60 99
39 58
101 103
48 84
23 71
88 92
16 97
25 34
11 30
30 60
3 43
16 100
70 110
42 56
9 106
14 84
58 80
82 93
30 86
21 69
36 107
29 95
10 109
26 74
109 110
71 83
24 73
12 48
...

output:

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

result:

ok accepted

Test #13:

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

input:

111 222
15 50
35 76
12 37
27 30
72 96
6 79
42 77
5 6
49 92
8 26
28 107
10 65
36 52
52 80
14 110
78 96
11 96
6 80
87 96
16 89
1 90
1 74
11 63
41 85
59 81
21 35
66 86
48 49
22 79
21 34
17 103
2 31
109 110
30 98
31 76
85 108
28 39
19 69
68 81
23 70
12 25
45 88
74 110
48 66
40 72
69 96
33 44
96 100
64 8...

output:

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

result:

ok accepted

Test #14:

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

input:

111 222
1 12
1 99
6 80
20 45
11 56
14 31
3 26
13 94
14 65
42 70
12 14
20 111
14 44
46 87
14 63
88 103
40 77
48 102
24 54
58 93
55 70
68 102
46 61
2 56
27 93
63 95
50 105
45 111
42 63
15 84
17 56
1 101
34 93
25 65
13 39
4 71
39 49
12 37
14 62
9 56
29 104
52 86
45 74
14 49
43 45
14 15
19 60
31 55
37 8...

output:

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

result:

ok accepted

Test #15:

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

input:

111 222
13 110
10 58
13 68
29 101
61 96
43 76
40 55
19 43
73 106
34 89
13 79
13 16
21 56
83 88
3 70
24 94
59 88
69 86
72 88
9 11
24 51
66 93
39 99
30 103
32 91
50 66
21 100
20 48
31 45
5 36
99 101
21 97
13 72
67 76
13 37
31 83
42 81
61 87
81 99
20 66
46 95
1 22
107 111
12 77
13 74
49 65
54 73
75 96
...

output:

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

result:

ok accepted

Test #16:

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

input:

111 222
58 79
60 64
46 108
9 68
1 47
13 40
2 52
43 106
22 92
43 86
22 73
87 94
25 44
13 95
2 99
44 83
29 100
6 8
75 101
70 88
22 71
3 62
55 108
69 72
53 98
25 38
5 101
20 42
18 79
14 81
26 79
89 108
23 44
14 44
6 108
33 105
42 56
21 86
50 102
22 106
48 98
1 10
22 35
58 69
46 73
8 35
23 38
23 62
13 9...

output:

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

result:

ok accepted

Test #17:

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

input:

111 222
42 57
29 90
18 68
48 81
45 81
2 47
6 9
81 85
81 86
89 101
34 98
17 20
52 101
20 97
28 96
53 81
51 108
5 65
27 64
62 101
27 89
8 97
77 91
32 102
35 76
31 81
39 65
73 78
22 66
68 91
40 83
47 81
71 91
12 81
21 25
100 103
7 26
79 97
69 101
16 109
35 58
72 88
33 73
95 103
6 92
64 101
17 81
43 81
...

output:

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

result:

ok accepted

Test #18:

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

input:

111 222
20 33
7 107
73 76
36 96
44 104
5 28
83 85
46 72
5 109
68 98
2 38
60 73
1 13
44 57
33 49
13 39
18 29
42 73
69 76
37 45
4 51
29 111
5 84
83 111
38 62
26 31
14 73
61 70
26 103
30 73
81 85
73 110
73 102
52 73
44 105
17 81
11 29
44 95
5 100
51 60
46 74
43 53
63 107
29 100
27 65
31 92
3 64
44 109
...

output:

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

result:

ok accepted

Test #19:

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

input:

111 222
80 86
61 86
10 86
55 73
39 105
21 96
13 39
74 106
15 20
10 17
46 88
7 86
37 106
47 76
44 106
9 41
8 86
105 110
86 92
100 101
102 107
77 81
97 105
29 78
59 86
13 31
24 53
1 49
21 90
86 89
25 96
3 30
21 103
89 98
86 102
4 76
86 98
6 18
56 67
38 43
45 51
71 105
42 95
11 77
10 36
72 86
75 92
41 ...

output:

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

result:

ok accepted

Test #20:

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

input:

111 222
66 107
38 107
17 106
8 65
74 89
46 76
25 33
55 74
10 101
6 70
50 94
5 106
74 77
43 83
74 90
81 103
42 72
66 94
63 82
21 49
12 96
99 101
40 74
13 95
70 76
12 33
4 16
38 45
13 67
17 46
16 66
12 92
98 100
1 78
48 92
35 62
27 44
32 54
85 95
37 74
69 103
52 94
61 105
27 80
47 106
74 94
52 62
49 6...

output:

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

result:

ok accepted

Test #21:

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

input:

111 222
28 63
77 84
57 76
16 51
9 38
46 64
85 95
30 48
21 22
82 96
80 111
16 73
26 51
63 100
19 108
1 108
76 88
62 75
38 80
15 90
49 58
35 54
16 65
15 107
70 107
55 87
16 57
14 19
38 77
43 49
16 53
64 111
16 87
108 109
30 80
1 16
32 68
74 98
42 65
11 16
16 105
16 82
14 85
68 104
82 98
12 28
21 69
86...

output:

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

result:

ok accepted

Test #22:

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

input:

111 222
94 103
29 74
23 42
57 62
33 67
55 57
8 57
56 90
23 57
16 39
1 80
25 33
57 83
25 102
57 102
35 76
36 102
19 87
50 84
57 111
62 84
32 57
15 68
73 110
11 69
69 76
62 105
13 42
57 78
32 62
11 22
99 104
49 73
47 57
1 40
26 57
60 104
42 45
15 17
37 63
82 93
22 60
61 67
51 86
29 57
69 103
88 95
18 ...

output:

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

result:

ok accepted

Test #23:

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

input:

111 222
35 93
39 107
18 87
35 84
35 73
29 57
91 96
99 103
31 35
30 96
28 48
35 87
51 60
33 40
66 103
35 41
35 74
11 44
15 27
65 66
6 35
9 108
48 95
73 102
7 35
34 35
28 35
54 70
19 60
74 81
19 73
9 35
35 85
21 98
37 74
81 85
80 85
32 71
8 63
23 97
16 30
33 35
48 84
35 67
46 69
35 100
17 102
72 91
35...

output:

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

result:

ok accepted

Test #24:

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

input:

111 222
44 88
10 26
46 53
35 64
13 97
18 100
44 46
33 45
6 75
6 15
31 84
31 68
59 83
4 104
5 91
35 90
29 44
44 74
33 110
30 96
44 60
92 103
71 86
6 44
44 98
27 98
41 109
79 108
19 22
47 54
32 101
13 41
25 40
40 44
72 93
44 80
18 55
62 89
71 95
44 61
44 87
66 83
23 111
35 63
41 101
47 56
1 90
23 58
3...

output:

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

result:

ok accepted

Test #25:

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

input:

111 222
48 79
13 101
17 88
1 104
49 101
13 87
13 71
57 58
25 32
52 78
13 50
36 84
26 69
78 100
21 107
31 66
46 71
14 67
13 45
5 26
13 89
13 107
78 79
44 58
13 73
13 38
13 68
13 55
47 74
35 61
63 73
42 111
29 102
8 29
1 13
38 45
34 95
33 84
29 104
13 86
42 82
18 37
13 59
13 29
21 82
2 13
66 93
50 68
...

output:

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

result:

ok accepted

Test #26:

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

input:

111 222
88 100
54 108
56 76
1 89
24 100
19 52
17 57
19 86
15 64
74 85
28 68
31 108
13 83
33 34
28 100
20 65
30 100
37 60
57 71
38 97
44 100
26 72
11 58
90 109
2 37
46 100
24 109
10 100
8 70
71 100
48 50
3 31
40 102
46 80
56 82
13 80
86 100
50 95
33 79
28 96
80 100
34 100
4 26
82 100
58 96
7 81
60 10...

output:

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

result:

ok accepted

Test #27:

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

input:

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

output:

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

result:

ok accepted

Test #28:

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

input:

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

output:

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

result:

ok accepted

Test #29:

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

input:

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

output:

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

result:

ok accepted

Test #30:

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

input:

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

output:

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

result:

ok accepted

Test #31:

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

input:

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

output:

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

result:

ok accepted

Test #32:

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

input:

108 141
27 103
36 83
20 81
18 106
79 92
87 95
23 69
50 67
32 85
50 53
50 86
13 52
13 104
20 38
46 89
24 94
12 18
33 98
17 41
14 106
47 96
27 84
30 68
50 98
45 70
45 74
13 16
99 101
41 89
3 35
13 44
51 54
45 82
48 97
69 82
22 101
23 76
4 20
5 83
18 80
41 73
14 27
19 34
44 67
20 90
47 66
10 100
7 75
1...

output:

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

result:

ok accepted

Test #33:

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

input:

94 114
14 86
45 79
67 81
30 63
24 93
60 93
40 69
41 88
25 42
6 13
3 87
35 91
85 93
59 79
51 84
43 75
31 57
3 86
48 77
53 82
44 47
33 77
73 81
51 67
1 52
38 71
28 63
7 68
7 18
79 88
40 71
30 70
6 83
66 78
4 31
25 84
10 94
62 89
43 56
9 93
15 57
22 53
50 93
13 91
26 32
66 90
18 78
14 19
58 80
33 41
61...

output:

2 1 1 3 1 3 2 1 1 2 2 1 6 2 1 2 1 1 2 2 2 1 2 2 1 5 7 2 1 6 1 1 1 1 2 2 1 1 8 9 3 1 2 3 1 2 2 1 1 2 1 10 1 11 3 12 13 14 15 16 2 3 2 1 17 1 2 1 18 2 1 19 3 2 1 2 3 2 1 1 3 20 21 2 1 2 2 22 5 5 2 23 24 1 5 1 1 25 5 1 26 4 2 1 5 3 1 1 1 1 1 27 2 6
6 1 2 3 5 6 24
6 1 18 2 3 5 6
6 1 2 3 20 5 6
5 16 1 2 ...

result:

ok accepted

Test #34:

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

input:

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

output:

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

result:

ok accepted

Test #35:

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

input:

94 120
43 81
79 82
53 76
65 87
3 66
10 51
3 9
10 53
34 77
63 94
43 50
46 72
13 94
11 32
71 76
72 75
56 88
8 60
17 45
31 57
61 77
14 22
49 50
29 65
2 90
4 51
38 45
8 56
23 44
18 61
21 55
45 69
15 74
22 43
21 44
40 44
1 3
25 94
33 94
37 90
58 77
65 79
60 75
36 54
28 86
16 56
75 85
86 88
32 75
20 90
41...

output:

1 1 1 1 2 1 7 2 2 1 2 2 3 1 2 1 3 1 1 1 1 1 1 3 1 2 3 8 1 2 1 4 3 3 3 5 1 4 6 9 3 2 3 1 2 2 6 1 4 10 1 1 1 11 12 2 13 2 6 14 15 4 2 1 4 2 4 16 1 17 1 1 2 2 1 1 18 5 19 20 21 2 22 5 1 1 23 2 1 24 1 5 5 1 2 25 1 2 1 1 26 5 1 27 3 1 1 28 4 29 30 31 2 1 1 32 1 2 2 33
5 1 2 3 4 9
6 1 2 3 4 5 7
5 1 2 3 4 ...

result:

ok accepted

Test #36:

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

input:

108 135
11 99
32 68
19 22
1 108
29 54
68 91
44 75
17 57
21 50
33 50
15 33
34 97
18 36
40 78
52 73
26 104
3 102
54 103
10 100
43 88
25 63
59 69
58 61
90 106
70 92
73 107
8 57
68 80
41 58
37 64
13 108
51 102
72 85
36 53
24 71
1 54
3 62
83 98
31 38
79 102
29 41
93 97
12 101
48 59
28 33
42 53
26 105
20 ...

output:

1 2 2 1 1 1 1 1 2 1 4 1 2 2 1 1 1 5 1 2 4 4 4 1 5 2 2 8 9 1 2 4 2 1 1 10 2 1 2 2 2 5 1 1 5 2 2 5 11 1 12 2 13 1 4 1 2 14 1 5 15 6 4 1 1 16 1 17 2 1 18 19 20 1 21 1 1 4 2 2 2 4 22 2 4 23 1 1 1 1 24 2 25 26 1 1 6 1 3 2 5 1 2 5 27 1 2 28 1 2 1 1 2 2 2 29 30 31 32 6 2 33 2 1 1 1 1 4 7 34 1 1 5 35 4
6 1 ...

result:

ok accepted

Test #37:

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

input:

105 135
50 65
60 77
55 85
48 65
22 94
10 65
13 97
28 70
87 98
70 73
7 40
7 90
5 89
64 81
47 61
59 84
43 86
82 84
92 101
39 65
2 13
25 77
29 34
24 84
34 63
1 45
9 51
51 58
63 85
2 18
18 56
55 97
32 87
5 31
41 93
52 77
20 42
61 76
1 55
47 99
42 72
8 21
83 96
26 75
34 99
2 54
2 43
84 105
5 104
2 36
65 ...

output:

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

result:

ok accepted

Test #38:

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

input:

30 37
4 24
3 25
2 13
12 21
16 29
2 12
6 18
2 14
22 28
3 12
10 11
1 20
9 19
1 14
4 21
7 17
28 30
26 29
9 24
19 20
6 26
10 16
15 18
9 17
8 23
11 15
18 30
21 27
7 29
5 27
3 16
19 25
13 22
5 28
8 20
25 30
10 23

output:

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

result:

ok accepted

Test #39:

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

input:

110 137
2 35
15 99
22 82
58 64
63 70
30 55
12 97
19 80
1 40
15 56
58 99
66 84
79 83
10 87
12 37
22 42
33 62
14 72
18 109
98 102
16 24
20 79
54 64
7 96
78 92
18 93
43 110
14 57
15 27
28 56
34 61
68 84
41 109
47 101
68 83
52 54
37 78
36 101
40 69
4 20
9 35
32 87
73 80
41 53
44 67
100 110
31 44
58 66
4...

output:

2 1 3 1 2 1 2 2 1 3 4 1 2 1 1 1 2 2 2 2 2 5 2 1 1 1 1 1 2 2 2 2 3 2 1 1 6 1 2 2 1 2 1 1 3 2 1 2 2 2 2 3 2 2 1 7 2 1 1 2 1 1 1 2 2 8 1 1 9 1 10 3 11 1 1 12 1 13 1 2 14 1 1 2 15 2 2 1 2 2 16 1 1 1 17 18 19 1 1 1 2 2 1 2 1 20 2 1 1 1 3 21 1 2 2 22 3 1 2 23 2 1 1 2 1 24 25 26 2 27 28 3 29 2 3 30 31
4 1 ...

result:

ok accepted

Test #40:

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

input:

110 137
2 7
28 38
41 109
32 51
79 100
16 94
52 56
34 98
57 65
3 59
90 102
9 78
57 94
39 61
22 24
62 84
12 96
82 99
13 68
2 53
17 72
7 20
84 90
6 44
47 97
34 83
66 71
1 59
14 54
33 67
9 14
69 94
60 76
22 105
65 104
24 101
5 42
56 81
4 97
29 89
47 76
11 110
10 25
28 48
3 21
63 87
10 61
75 80
59 101
19...

output:

1 1 1 1 2 1 2 1 1 2 2 1 2 1 2 2 1 1 1 2 3 2 1 3 1 2 1 1 1 2 2 4 3 3 2 1 3 1 2 2 2 1 1 2 1 1 5 2 6 1 7 8 1 2 9 10 2 1 1 2 2 11 1 1 2 2 12 13 1 2 14 2 2 1 1 1 15 1 1 1 2 2 16 2 1 1 1 1 2 1 1 2 2 2 1 1 2 2 2 2 3 17 1 1 2 18 3 1 19 2 1 3 20 1 2 2 21 2 22 23 24 1 1 2 25 1 26 2 27 3 28 3 2 29 30 31 2
4 1 ...

result:

ok accepted

Test #41:

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

input:

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

output:

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

result:

ok accepted

Test #42:

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

input:

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

output:

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

result:

ok accepted

Test #43:

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

input:

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

output:

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

result:

ok accepted

Test #44:

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

input:

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

output:

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

result:

ok accepted

Test #45:

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

input:

68 91
33 46
33 35
6 36
38 57
40 58
2 12
15 26
21 54
2 49
12 46
26 67
9 40
1 16
1 23
27 47
29 55
2 68
15 40
37 40
39 66
34 60
14 21
63 68
27 31
32 56
17 37
2 62
9 48
29 34
19 53
21 43
32 59
21 32
7 29
5 44
18 29
10 26
10 53
24 65
13 22
45 51
33 36
18 54
16 59
32 33
7 23
51 61
2 11
56 60
3 58
15 27
11...

output:

2 1 1 1 2 3 2 1 8 1 9 10 1 11 2 2 2 3 12 1 2 2 1 3 2 1 13 1 1 1 4 1 14 3 1 15 1 2 1 1 1 3 2 2 16 1 2 1 1 1 1 2 2 1 17 3 2 2 18 19 3 1 2 20 21 22 6 7 23 3 24 25 1 1 2 26 2 1 1 27 5 3 1 28 4 1 29 30 1 2 31
4 16 1 2 3
4 1 2 3 13
4 1 2 3 27
4 1 2 3 29
4 1 2 19 3
4 16 1 2 3
4 1 2 3 26
4 1 2 3 15
3 1 2 3
...

result:

ok accepted

Test #46:

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

input:

110 149
74 88
34 77
51 71
21 79
8 98
62 64
16 108
76 96
25 37
2 17
10 65
14 68
8 70
5 14
36 78
13 61
27 58
46 98
17 57
75 76
6 22
24 101
56 99
76 82
56 90
41 97
52 98
66 91
33 49
7 86
5 23
29 69
4 99
10 102
20 49
78 109
4 21
10 101
5 72
57 103
84 97
30 53
11 105
28 98
9 63
31 38
29 50
32 89
45 70
38...

output:

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

result:

ok accepted

Test #47:

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

input:

64 94
16 39
5 35
3 44
25 45
4 30
17 29
21 54
2 25
15 28
31 48
16 42
6 63
55 57
24 25
35 40
15 62
20 25
14 19
22 44
25 58
27 52
34 40
25 52
13 63
28 43
17 28
7 28
42 63
6 27
25 46
25 50
14 42
26 36
22 28
28 53
1 49
1 37
36 40
23 44
23 47
16 50
29 43
23 57
33 34
1 60
25 38
12 30
25 56
13 49
26 62
32 4...

output:

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

result:

ok accepted

Test #48:

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

input:

104 154
31 46
86 100
81 84
51 58
17 100
28 59
6 13
21 34
43 100
82 88
23 29
13 42
36 62
87 100
52 63
22 77
46 92
32 88
88 94
76 100
3 100
70 88
24 104
3 20
20 91
37 93
61 74
31 88
11 72
21 100
27 56
47 48
34 101
25 100
25 34
9 100
70 100
59 100
98 100
65 88
55 100
12 66
88 99
13 30
12 42
73 80
35 75...

output:

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

result:

ok accepted

Test #49:

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

input:

104 154
77 93
42 47
56 71
38 91
54 88
34 66
51 102
21 88
21 62
12 29
27 58
30 104
6 104
5 104
25 101
71 104
46 103
39 40
4 21
21 83
21 69
1 14
33 54
14 53
21 93
64 104
96 104
43 52
15 21
79 104
32 47
34 70
15 19
21 31
8 21
21 98
68 75
7 13
25 89
20 99
18 26
23 30
28 73
35 66
7 61
18 65
3 72
100 103
...

output:

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

result:

ok accepted

Test #50:

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

input:

104 154
37 46
9 50
16 44
49 104
35 95
24 68
4 68
1 73
43 68
41 95
15 47
50 62
73 96
31 90
30 62
31 54
60 68
47 73
32 68
12 68
52 68
27 42
8 67
5 8
8 29
7 81
65 98
64 92
10 61
40 89
33 47
8 17
2 36
25 64
46 85
8 100
42 75
8 40
48 74
22 53
38 93
68 102
8 28
44 54
66 72
23 68
33 35
68 70
9 68
15 20
8 1...

output:

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

result:

ok accepted

Test #51:

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

input:

104 154
28 64
15 102
90 103
52 75
14 28
47 50
24 30
18 28
31 60
70 100
9 40
28 67
5 28
28 41
43 71
6 56
75 88
3 33
49 69
83 84
75 82
2 38
75 103
26 38
75 96
29 98
44 75
17 32
75 104
2 28
66 94
5 51
12 75
28 59
52 71
51 97
32 98
19 95
28 62
41 61
7 25
19 30
6 86
72 95
57 75
40 78
61 74
1 63
28 49
28 ...

output:

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

result:

ok accepted

Test #52:

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

input:

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

output:

2 4 1 2 2 2 1 2 1 1 3 7 4 8 2 9 1 3 1 2 6 1 10 2 2 3 11 2 1 12 13 14 4 15 3 2 16 2 1 4 17 18 4 19 5 1 20 1 21 5 5 22 4 23 2 1 2 6 6 24 25 6 26 27 28 29
4 1 3 20 5
3 1 4 29
5 1 2 3 5 9
4 1 4 6 7
5 1 2 3 5 23
5 1 2 4 6 13
3 1 2 14
3 8 1 4
4 1 4 6 27
3 1 2 14
3 25 1 5
4 1 2 4 6
3 1 2 21
3 1 2 4
5 1 2 4...

result:

ok accepted

Test #53:

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

input:

104 170
24 100
76 101
7 56
68 69
36 70
11 31
38 69
1 73
6 72
37 78
3 22
11 41
34 100
42 69
38 76
32 87
40 51
6 43
5 91
17 21
40 97
2 3
48 69
40 45
54 69
69 86
4 51
19 69
64 91
46 69
20 69
40 103
91 93
4 59
84 93
60 69
47 95
12 44
19 76
69 71
30 87
74 97
95 99
4 37
13 87
36 80
63 78
17 57
62 69
30 69...

output:

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

result:

ok accepted

Test #54:

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

input:

104 170
98 101
67 103
87 98
46 65
10 89
60 71
14 54
32 89
14 56
46 104
75 89
4 42
14 87
26 78
80 89
17 68
68 83
9 48
14 85
14 70
89 102
95 98
4 11
27 78
37 68
12 89
25 45
29 37
14 28
60 85
14 47
14 42
33 89
8 89
25 30
1 14
84 91
34 89
14 17
69 89
14 16
3 9
27 39
5 103
43 99
14 82
29 62
31 86
18 49
2...

output:

1 1 2 1 12 6 2 20 21 3 22 2 23 1 24 1 2 3 25 26 27 5 4 5 5 28 1 1 29 1 30 31 32 33 5 1 1 34 35 36 37 14 2 2 1 38 2 12 3 6 3 6 39 3 40 1 41 2 1 42 12 43 44 45 46 1 47 2 48 1 49 50 51 14 52 3 12 3 53 54 55 5 1 2 3 6 5 56 1 1 14 1 57 5 1 12 58 59 3 60 61 62 6 63 64 12 12 14 1 65 12 66 67 6 8 68 3 12 2 ...

result:

ok accepted

Test #55:

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

input:

104 170
19 61
6 58
85 92
70 81
45 47
31 47
28 47
29 47
47 72
60 81
42 69
81 101
16 94
22 81
37 80
68 83
17 75
47 104
42 59
77 96
47 71
25 51
14 61
47 78
38 55
13 47
32 57
36 81
70 83
81 86
11 88
5 85
7 50
81 91
35 47
32 52
34 103
1 81
7 16
24 87
20 81
55 81
47 69
72 87
8 83
23 81
33 40
42 100
47 97
...

output:

17 2 1 2 15 23 24 25 26 27 17 28 7 29 2 2 1 30 1 1 31 1 3 32 1 33 1 34 1 35 17 17 2 36 37 2 1 1 1 17 3 38 39 3 4 40 1 3 41 7 15 42 43 17 2 44 6 45 46 1 47 1 17 48 49 2 50 51 1 17 52 53 6 3 54 1 1 15 16 55 1 56 6 57 2 6 58 2 6 3 59 60 6 13 3 61 62 3 63 64 6 17 65 17 1 3 66 7 67 68 5 17 6 11 69 70 3 1...

result:

ok accepted

Test #56:

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

input:

3 3
2 3
1 2
1 3

output:

2 1 3
2 1 3
2 2 3
2 1 2

result:

ok accepted

Test #57:

score: 0
Accepted
time: 6ms
memory: 4496kb

input:

1000 1800
259 399
188 963
159 354
133 905
437 589
188 803
402 605
70 120
349 815
321 984
18 396
462 931
120 563
649 830
453 819
167 314
120 315
421 839
581 737
59 542
691 751
210 560
319 684
519 560
202 243
446 727
49 70
489 843
188 471
259 434
224 568
498 881
345 908
283 953
105 902
252 886
84 454
...

output:

6 6 2 1 1 10 3 3 2 4 2 3 1 3 1 3 2 1 3 2 3 3 2 11 2 2 1 1 12 2 2 3 2 3 1 2 2 3 2 2 2 6 1 13 7 4 1 1 1 1 14 2 1 3 1 15 1 2 1 2 6 16 1 2 1 1 6 3 17 3 1 18 3 1 1 2 19 1 4 20 3 1 3 1 2 3 1 2 2 2 4 1 21 4 2 22 2 3 23 1 2 1 1 4 3 24 25 1 1 1 26 4 2 1 3 27 2 3 1 3 3 4 2 3 2 1 1 28 29 30 31 2 2 1 3 32 3 33 ...

result:

ok accepted

Test #58:

score: -100
Wrong Answer
time: 6ms
memory: 4632kb

input:

1000 1800
520 781
370 885
613 785
224 946
588 964
348 394
269 288
71 145
6 961
89 678
415 823
109 778
10 967
561 784
610 947
663 979
212 872
281 974
440 497
104 909
377 440
169 954
926 963
439 832
479 912
380 551
466 566
508 809
649 978
553 730
180 861
268 790
161 616
184 343
397 635
88 467
367 645
...

output:

1 1 1 1 2 1 1 1 1 1 1 5 6 2 1 1 1 1 5 2 1 3 2 1 2 3 2 1 2 2 1 1 3 1 3 1 2 2 1 5 2 2 15 1 1 1 1 2 1 16 10 1 5 2 1 1 1 3 2 17 1 2 6 18 1 2 19 1 2 1 7 1 2 1 2 2 2 6 1 20 1 21 3 2 5 3 1 22 1 1 3 6 1 1 1 3 2 23 1 1 1 2 2 24 2 25 2 1 2 1 2 2 2 3 1 1 1 2 2 26 1 1 2 27 2 3 2 28 29 1 30 31 1 32 2 33 1 2 3 2 ...

result:

wrong answer Integer 9 violates the range [1, 8]