QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#677455#5195. 群星连结yellowbirdAC ✓6ms4592kbC++2019.4kb2024-10-26 12:08:472024-10-26 12:08:47

詳細信息

Test #1:

score: 100
Accepted
time: 5ms
memory: 4384kb

input:

10
58681 138 58 17
2 6 4 7 8 5 3 9 1 10
5 1109 6
4 5 1 0
54043 160 84 19
1 6 9 7 5 2 4 3 8 10
5 989 2
3 10 0 0
75942 163 83 10
9 5 1 3 6 2 8 7 4 10
4 0 0
7 28 6 615
64029 105 58 0
9 4 3 7 6 1 2 5 8 10
1 0 0
1 60 0 0
59128 160 57 8
6 4 5 7 2 9 8 3 1 10
1 0 0
2 0 0 0
93449 183 99 2
4 5 2 6 8 1 9 7 3 1...

output:

22472
Alice
0 0 0 0 0 0 0 88062 0 0 

result:

ok 3 lines

Test #2:

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

input:

10
92555 103 60 0
5 3 2 6 1 9 7 4 8 10
2 27 0
5 2 0 0
99086 191 64 0
9 2 4 1 5 6 3 8 7 10
5 1825 4
9 5 1 1231
85279 136 60 6
7 9 4 5 8 3 1 6 2 10
5 2763 1
9 32 1 1359
83925 140 71 11
2 7 3 5 8 6 4 1 9 10
2 44 0
6 36 2 0
84489 146 87 12
3 5 6 4 9 2 8 7 1 10
1 0 0
1 71 0 0
82048 107 87 5
7 5 8 1 3 2 4...

output:

18065
Alice
0 99086 85279 83925 84489 82048 56454 31891 57388 1000000 

result:

ok 3 lines

Test #3:

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

input:

10
40395 103 92 8
1 2 8 4 7 3 6 9 5 10
2 21 0
6 44 1 0
28072 111 97 8
9 5 1 6 4 3 7 2 8 10
5 2158 4
2 0 0 0
49030 182 65 14
1 4 6 8 7 9 5 2 3 10
2 36 0
8 24 1 0
31899 102 94 9
3 6 1 7 5 4 8 9 2 10
4 0 0
1 67 0 0
45757 121 74 17
6 2 5 9 7 8 4 1 3 10
1 0 0
4 32 1 0
49774 196 97 11
1 2 8 4 6 5 9 3 7 10...

output:

7733
Alice
33107 0 28141 26481 29068 0 39653 28324 29374 95576 

result:

ok 3 lines

Test #4:

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

input:

10
29085 175 73 18
5 6 3 8 9 1 4 7 2 10
2 25 0
7 29 3 1980
48307 141 69 11
7 1 9 3 2 6 5 4 8 10
2 2 0
5 2 0 0
49023 103 77 14
9 7 1 3 6 2 4 8 5 10
5 2382 8
5 1 0 0
49429 105 92 1
7 4 9 8 5 1 2 6 3 10
1 0 0
4 33 1 0
28402 154 91 5
5 2 8 9 7 3 4 1 6 10
4 0 0
3 10 0 0
27632 125 99 10
8 6 5 2 4 7 1 9 3 ...

output:

1730
Alice
22816 37910 38698 0 3728 22723 23673 23917 24227 89879 

result:

ok 3 lines

Test #5:

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

input:

10
25542 146 81 13
2 9 1 6 8 5 3 4 7 10
3 8 1
5 2 0 0
49401 134 98 10
2 8 5 4 1 9 6 7 3 10
5 1570 4
1 59 0 0
25650 179 50 20
7 6 2 3 8 4 1 5 9 10
1 0 0
5 2 0 0
44397 185 51 18
6 4 7 8 5 2 1 3 9 10
2 27 0
4 19 1 0
32070 119 61 12
8 3 5 9 2 6 7 1 4 10
3 33 1
1 64 0 0
30439 198 67 3
9 8 1 3 2 5 6 7 4 1...

output:

3123
Bob
43052 0 45457 49140 4611 18955 29789 26631 0 81546 

result:

ok 3 lines

Test #6:

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

input:

10
30890 144 76 16
6 7 1 5 4 8 3 9 2 10
3 10 1
1 91 0 0
35064 190 66 18
9 3 6 7 4 8 2 1 5 10
4 0 0
7 13 1 1347
26153 155 99 13
7 3 1 6 4 9 8 2 5 10
2 4 0
6 41 1 0
49803 145 76 16
8 7 6 9 3 2 4 1 5 10
5 2181 10
8 31 1 0
41607 171 66 6
1 5 4 2 6 8 7 3 9 10
5 1335 8
6 33 1 0
40215 149 67 0
5 9 2 6 1 3 ...

output:

6841
Alice
30890 0 0 33313 41399 0 0 42269 0 41432 

result:

ok 3 lines

Test #7:

score: 0
Accepted
time: 5ms
memory: 4392kb

input:

10
36815 116 83 18
2 6 3 4 1 9 7 8 5 10
3 12 1
1 61 0 0
45730 115 73 4
6 9 3 5 2 7 8 1 4 10
2 22 0
8 47 1 0
27780 101 72 7
5 7 8 6 4 2 9 3 1 10
2 36 0
2 0 0 0
28960 126 70 8
7 1 5 2 8 6 9 3 4 10
1 0 0
4 3 1 0
34337 109 54 11
4 1 3 8 5 6 9 2 7 10
4 0 0
7 35 1 2047
43291 153 53 14
6 7 3 8 2 4 9 1 5 10...

output:

16917
Alice
29635 29446 0 28960 34337 29575 44034 38612 0 100000 

result:

ok 3 lines

Test #8:

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

input:

10
33272 145 65 7
8 1 5 9 3 6 7 2 4 10
5 1581 10
7 13 4 135
44951 113 97 14
1 2 5 7 9 6 4 8 3 10
4 0 0
2 0 0 0
25286 199 67 18
8 7 4 3 6 1 2 5 9 10
5 2466 10
3 10 0 0
26538 185 86 12
8 5 9 4 1 7 6 3 2 10
2 47 0
2 0 0 0
44215 110 82 6
1 7 6 4 2 9 3 5 8 10
3 49 1
5 1 0 0
39066 151 58 6
6 4 8 3 9 1 5 7...

output:

7700
Bob
0 0 0 45872 0 0 0 0 0 0 

result:

ok 3 lines

Test #9:

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

input:

10
38621 186 97 3
9 8 6 4 7 1 2 3 5 10
2 14 0
5 2 0 0
25505 100 67 18
6 9 2 8 1 7 3 4 5 10
1 0 0
4 27 1 0
25233 181 88 0
4 6 3 2 1 7 8 5 9 10
3 41 1
9 47 1 867
27339 178 70 15
9 3 2 8 6 4 1 5 7 10
1 0 0
4 17 1 0
27912 181 91 16
7 6 1 3 8 9 4 5 2 10
4 0 0
8 16 1 0
45390 120 96 7
2 1 6 9 8 7 5 3 4 10
...

output:

3382
Alice
35627 25505 23530 27339 27912 38757 32890 27427 39565 99863 

result:

ok 3 lines

Test #10:

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

input:

10
27311 114 54 6
5 3 1 8 7 4 9 6 2 10
2 1 0
6 19 2 0
36612 151 67 14
5 4 8 9 3 1 6 7 2 10
2 20 0
6 40 3 0
31538 157 92 19
9 2 4 5 8 1 6 3 7 10
5 2274 5
3 10 0 0
32576 191 100 5
5 8 3 1 4 6 9 2 7 10
1 0 0
5 1 0 0
47310 162 99 12
9 2 3 7 1 8 5 4 6 10
1 0 0
5 2 0 0
44507 157 78 11
4 7 3 2 8 1 9 5 6 10...

output:

19104
Bob
0 0 0 31175 0 0 0 0 0 0 

result:

ok 3 lines

Test #11:

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

input:

10
37666 155 71 4
7 3 5 6 8 4 1 2 9 10
4 0 0
8 13 1 0
27554 110 92 12
4 9 1 2 3 8 5 6 7 10
3 17 1
3 10 0 0
43187 137 68 15
8 4 7 2 5 9 6 3 1 10
3 32 1
2 0 0 0
37324 130 83 20
4 8 6 7 2 9 3 5 1 10
1 0 0
6 47 1 0
43003 159 92 12
6 2 3 7 8 4 5 9 1 10
2 4 0
8 29 1 0
32169 193 92 7
2 7 6 9 3 5 4 1 8 10
5...

output:

6587
Alice
0 27554 28103 26492 25857 0 17530 11006 22717 89800 

result:

ok 3 lines

Test #12:

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

input:

10
91385 150 61 10
1 6 4 7 2 8 3 5 9 10
1 0 0
2 0 0 0
54083 116 80 5
4 2 6 8 3 1 9 7 5 10
2 11 0
1 57 0 0
57408 108 64 9
8 6 4 1 7 9 3 2 5 10
4 0 0
7 82 1 3569
82185 103 79 18
2 4 7 9 3 5 8 1 6 10
2 37 0
3 10 0 0
94836 199 88 20
7 9 1 6 8 3 4 5 2 10
5 2071 8
9 65 1 996
69691 123 52 4
5 4 8 2 7 3 1 9...

output:

6761
Alice
56802 54083 57408 82185 62996 69691 50852 61000 62979 100000 

result:

ok 3 lines

Test #13:

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

input:

10
78828 179 95 13
3 5 6 7 2 4 8 9 1 10
2 46 0
4 73 1 0
99054 162 73 17
3 7 9 8 6 2 4 5 1 10
2 18 0
3 10 0 0
65727 197 94 18
2 7 4 6 5 1 9 8 3 10
4 0 0
9 96 1 1983
62400 105 80 3
7 1 6 3 4 2 5 8 9 10
3 90 1
5 1 0 0
91317 108 80 9
9 4 5 3 1 7 6 2 8 10
1 0 0
6 19 2 0
79114 164 55 20
3 5 7 8 1 4 6 9 2 ...

output:

13166
Alice
0 0 0 62340 0 0 0 66441 0 0 

result:

ok 3 lines

Test #14:

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

input:

10
94223 120 76 8
1 7 4 2 9 6 3 8 5 10
2 34 0
5 2 0 0
97764 107 75 1
7 5 8 9 3 2 4 1 6 10
5 2621 3
9 11 1 199
59960 194 54 2
1 8 7 9 3 4 6 5 2 10
5 3341 8
6 85 3 0
60928 157 78 10
4 2 5 8 6 1 3 9 7 10
4 0 0
5 2 0 0
99246 180 70 14
8 6 3 5 4 7 1 9 2 10
2 41 0
7 97 6 4946
68635 102 80 8
4 7 5 2 3 6 1 ...

output:

4019
Bob
55076 61642 56547 63328 91453 53534 70235 64546 79773 99926 

result:

ok 3 lines

Test #15:

score: 0
Accepted
time: 5ms
memory: 4388kb

input:

10
97200 148 58 5
5 9 4 2 1 3 6 7 8 10
2 20 0
3 10 0 0
96894 196 77 19
8 7 3 2 9 4 1 5 6 10
5 3603 9
5 2 0 0
70957 145 70 10
4 7 2 1 5 8 3 6 9 10
5 1376 4
9 75 1 1175
88728 137 56 1
9 3 8 2 1 5 6 7 4 10
4 0 0
3 10 0 0
51254 142 100 9
7 2 6 3 4 1 9 5 8 10
1 0 0
3 10 0 0
98096 151 61 12
7 8 9 3 5 4 2 ...

output:

19713
Bob
0 0 0 0 0 58759 0 0 0 0 

result:

ok 3 lines

Test #16:

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

input:

10
67409 163 78 0
3 2 8 5 6 1 7 9 4 10
2 18 0
4 36 1 0
86995 198 93 19
7 1 2 9 4 3 8 5 6 10
1 0 0
8 26 1 0
52310 162 70 18
9 7 2 1 3 6 8 4 5 10
5 3626 2
4 30 1 0
78539 157 67 18
7 6 9 3 8 2 5 4 1 10
1 0 0
8 3 1 0
82686 194 84 12
4 6 9 8 5 7 2 1 3 10
5 4721 3
4 69 1 0
67136 179 72 9
3 6 2 7 8 5 9 4 1...

output:

16712
Alice
0 0 52310 0 82686 0 0 96920 0 0 

result:

ok 3 lines

Test #17:

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

input:

10
70386 118 60 3
3 6 4 8 9 7 2 5 1 10
5 2880 6
6 33 2 0
84451 127 52 17
4 5 3 8 6 1 9 2 7 10
3 29 1
2 0 0 0
56127 173 51 18
1 6 7 9 4 8 3 5 2 10
1 0 0
6 88 1 0
76731 171 57 18
7 8 6 1 2 9 3 4 5 10
1 0 0
7 5 3 3692
52004 119 83 20
8 7 5 1 3 2 9 6 4 10
5 3211 5
4 54 1 0
69779 158 58 2
9 6 1 7 2 3 5 8...

output:

19339
Alice
70268 75944 56039 75868 51953 69659 97544 52327 81217 99898 

result:

ok 3 lines

Test #18:

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

input:

10
90036 156 183 46
7 5 1 2 3 4 8 6 9 10
2 133 0
1 175 0 0
85603 138 287 5
8 4 3 9 5 7 2 6 1 10
3 24 1
8 73 1 0
72986 157 280 1
1 2 8 3 4 5 7 6 9 10
3 76 1
4 47 1 0
97125 186 187 37
6 8 3 4 2 9 7 1 5 10
3 35 1
1 152 0 0
56885 185 241 1
6 2 1 5 9 3 4 8 7 10
1 0 0
3 10 0 0
84416 144 162 37
7 1 2 3 6 5...

output:

9119
Bob
95179 0 0 0 0 0 0 0 0 0 

result:

ok 3 lines

Test #19:

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

input:

10
93013 185 162 5
8 1 3 6 5 2 9 7 4 10
2 81 0
9 69 3 1421
77017 121 256 47
7 1 5 2 8 3 9 6 4 10
2 112 0
7 73 4 2501
67482 188 168 19
4 7 1 5 2 8 6 3 9 10
1 0 0
9 86 2 184
75540 147 153 8
3 7 4 9 1 5 8 6 2 10
4 0 0
2 0 0 0
70406 113 268 4
1 2 9 5 4 6 8 7 3 10
1 0 0
4 58 1 0
98356 124 203 8
1 3 7 4 2...

output:

2912
Alice
23436 23507 22974 23589 22904 98356 75057 21578 78787 22041 

result:

ok 3 lines

Test #20:

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

input:

10
95990 126 293 15
4 8 5 9 2 7 1 6 3 10
2 17 0
9 17 1 30
53776 148 210 14
3 7 1 2 5 8 6 9 4 10
1 0 0
6 49 7 0
78827 152 290 46
2 4 9 1 6 8 5 7 3 10
3 55 1
3 10 0 0
63250 167 256 7
9 7 8 6 2 1 3 5 4 10
4 0 0
4 11 1 0
55533 126 202 39
5 9 3 6 2 4 7 1 8 10
5 3048 3
5 4 0 0
99877 104 243 4
9 8 4 2 7 1 ...

output:

11719
Alice
0 0 0 0 0 99259 0 0 0 0 

result:

ok 3 lines

Test #21:

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

input:

10
83433 155 272 25
9 1 8 5 7 2 3 6 4 10
2 105 0
1 231 0 0
69073 176 294 26
3 2 4 6 8 1 7 9 5 10
5 154 5
8 66 1 0
66921 155 219 35
2 8 3 4 9 7 5 1 6 10
2 118 0
7 52 17 3453
62045 133 268 6
9 6 3 2 4 8 5 7 1 10
1 0 0
9 75 3 116
51744 114 161 39
7 9 1 5 8 6 4 2 3 10
2 123 0
9 24 3 1325
78850 130 199 3...

output:

1884
Bob
73436 56830 91921 57158 52410 66535 66913 84429 81671 100000 

result:

ok 3 lines

Test #22:

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

input:

10
98828 127 252 23
5 3 1 7 8 6 2 9 4 10
5 1696 5
3 10 0 0
60463 159 196 47
1 5 2 6 9 8 7 4 3 10
5 1692 8
6 26 3 0
84668 131 299 0
7 6 3 1 8 2 4 5 9 10
4 0 0
2 0 0 0
51245 137 271 35
5 8 1 6 7 9 4 3 2 10
3 87 1
7 84 6 3004
73546 192 164 32
2 6 3 5 7 8 4 1 9 10
4 0 0
5 2 0 0
73764 170 275 23
7 3 5 9 ...

output:

1757
Bob
8123 36660 0 6744 37394 69463 54507 80795 64679 21149 

result:

ok 3 lines

Test #23:

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

input:

10
51804 124 231 34
4 5 7 6 9 8 1 2 3 10
5 3397 9
3 10 0 0
69086 115 249 41
5 9 4 3 6 1 2 8 7 10
4 0 0
8 19 1 0
70651 149 242 30
2 6 4 9 3 8 1 5 7 10
3 89 1
7 19 4 3361
95131 143 261 4
2 4 8 1 9 3 7 5 6 10
4 0 0
3 10 0 0
51705 132 197 45
3 5 2 1 4 9 8 7 6 10
4 0 0
9 82 1 409
86001 198 264 25
9 8 2 4...

output:

6674
Alice
0 0 70651 0 0 0 0 19435 26067 0 

result:

ok 3 lines

Test #24:

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

input:

10
72015 197 211 19
4 9 2 3 6 5 8 1 7 10
5 99 7
7 86 19 3411
55187 138 157 42
5 3 6 9 4 7 8 1 2 10
1 0 0
1 261 0 0
90509 110 157 44
3 1 8 6 2 4 7 9 5 10
3 68 1
2 0 0 0
79795 161 283 45
2 1 6 4 7 5 8 3 9 10
1 0 0
3 10 0 0
68040 191 226 44
7 9 8 6 4 3 2 5 1 10
5 1075 9
9 49 1 1838
60449 127 250 1
9 5 ...

output:

2263
Bob
66612 72450 95871 58894 83701 57397 58324 75399 66452 100000 

result:

ok 3 lines

Test #25:

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

input:

10
87410 168 190 3
8 6 2 3 5 1 7 4 9 10
5 2744 7
5 3 0 0
89032 100 247 7
2 9 8 7 5 6 3 4 1 10
5 64 1
5 4 0 0
58255 187 237 8
1 6 8 4 3 7 5 2 9 10
4 0 0
4 98 1 0
95310 160 175 22
8 5 6 7 2 3 9 1 4 10
2 40 0
3 10 0 0
69187 177 189 14
5 1 9 7 6 8 3 4 2 10
3 98 1
4 9 1 0
61970 107 290 36
7 5 6 2 4 8 1 3...

output:

464
Alice
67796 85095 52352 67302 69187 58071 59550 58465 70337 96140 

result:

ok 3 lines

Test #26:

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

input:

10
57620 167 170 39
4 8 5 6 1 2 9 3 7 10
1 0 0
9 38 1 446
70517 142 182 48
9 1 2 5 3 6 8 4 7 10
2 30 0
5 4 0 0
87468 168 261 22
1 2 5 9 6 3 4 7 8 10
2 133 0
6 86 7 0
56008 187 220 12
3 5 6 7 1 8 9 2 4 10
3 92 1
6 23 9 0
92380 188 157 0
4 7 9 1 2 6 3 5 8 10
1 0 0
8 2 1 0
58959 177 272 42
7 6 1 4 3 2 ...

output:

3051
Bob
25546 59740 0 26613 60995 0 89345 0 34684 87948 

result:

ok 3 lines

Test #27:

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

input:

10
77830 195 300 11
6 1 8 9 7 5 4 3 2 10
3 48 1
2 0 0 0
76713 136 158 32
4 7 5 8 3 1 9 2 6 10
5 349 6
5 1 0 0
98405 106 161 11
1 6 8 2 4 3 7 5 9 10
2 58 0
8 82 1 0
83941 128 264 41
6 1 5 2 8 9 4 7 3 10
4 0 0
1 287 0 0
99086 120 181 47
2 7 6 4 5 9 1 3 8 10
2 143 0
4 74 1 0
84945 154 218 10
4 3 9 7 2 ...

output:

695
Bob
80585 84282 63588 68887 68364 80015 89795 95979 58250 100000 

result:

ok 3 lines

Test #28:

score: 0
Accepted
time: 5ms
memory: 4508kb

input:

10
78170 127 206 28
2 7 8 4 5 9 3 6 1 10
3 14 1
7 35 13 4892
96103 105 160 37
6 4 5 3 7 1 9 8 2 10
1 0 0
8 65 1 0
61703 187 140 15
9 1 2 7 4 6 8 5 3 10
5 1868 7
9 79 2 1003
67135 127 148 50
2 3 9 7 6 8 1 5 4 10
3 98 1
8 84 1 0
68176 106 203 49
8 9 1 6 3 5 7 4 2 10
5 4769 1
7 100 6 3845
73910 141 190...

output:

21691
Alice
62765 0 60521 67135 67730 64923 0 0 0 60927 

result:

ok 3 lines

Test #29:

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

input:

10
60797 142 194 38
6 3 9 8 1 5 7 4 2 10
1 0 0
6 4 4 0
77315 108 211 39
6 9 3 8 7 5 1 2 4 10
4 0 0
9 86 2 1129
67924 195 207 19
6 1 9 2 4 8 7 3 5 10
1 0 0
8 39 1 0
97032 106 160 19
4 3 5 2 6 7 1 9 8 10
3 17 1
2 0 0 0
62216 125 177 37
8 6 7 5 2 3 9 1 4 10
1 0 0
6 24 1 0
76364 192 224 21
6 3 9 2 8 7 5...

output:

1085
Bob
56281 50926 93990 50941 75742 49572 37507 49700 73413 95907 

result:

ok 3 lines

Test #30:

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

input:

10
63774 171 182 23
9 6 3 5 8 2 7 4 1 10
1 0 0
4 56 1 0
85938 192 135 7
9 4 8 1 3 6 7 2 5 10
1 0 0
6 81 3 0
82660 105 175 29
7 4 9 3 2 6 1 8 5 10
2 84 0
9 18 3 1315
87117 177 126 5
7 8 6 1 9 4 5 3 2 10
4 0 0
6 25 7 0
75753 169 194 6
4 6 9 1 8 2 3 5 7 10
5 2872 5
3 10 0 0
62051 138 144 6
3 2 1 8 7 9 ...

output:

2771
Alice
21619 0 17512 51174 75753 21697 45697 50433 80112 68478 

result:

ok 3 lines

Test #31:

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

input:

10
66751 169 162 33
3 2 1 4 7 8 9 5 6 10
1 0 0
4 77 1 0
94561 191 185 40
2 9 5 8 7 1 3 4 6 10
5 1190 3
6 36 4 0
53698 114 190 35
1 6 9 4 3 2 7 5 8 10
4 0 0
6 50 6 0
52631 176 235 34
5 2 9 3 4 6 8 7 1 10
2 47 0
9 97 3 1893
69431 161 205 37
4 5 6 7 9 8 1 2 3 10
2 103 0
9 84 1 48
70369 122 242 42
3 2 1...

output:

3805
Bob
65530 60843 49877 57494 61058 82264 64090 89151 34707 89242 

result:

ok 3 lines

Test #32:

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

input:

10
65316 139 139 42
9 7 3 4 6 1 2 8 5 10
4 0 0
3 10 0 0
53858 199 244 21
9 1 2 7 8 4 6 5 3 10
2 10 0
1 200 0 0
53881 167 158 30
1 5 2 7 9 8 6 3 4 10
2 6 0
7 96 8 4733
91624 122 221 1
2 3 1 4 6 9 7 5 8 10
4 0 0
7 28 12 1618
74436 170 199 22
7 6 1 4 8 2 3 9 5 10
4 0 0
3 10 0 0
52600 104 207 48
7 3 5 4...

output:

1923
Bob
0 0 65970 2679 89648 60885 0 69978 0 94110 

result:

ok 3 lines

Test #33:

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

input:

10
68293 181 126 27
8 5 6 4 2 1 9 7 3 10
5 2163 8
9 48 2 1887
55441 115 169 6
4 3 2 5 8 6 1 7 9 10
1 0 0
3 10 0 0
85330 161 138 13
4 1 5 2 9 6 8 3 7 10
5 2760 5
7 46 1 4822
77480 128 143 16
3 2 7 9 5 8 1 6 4 10
1 0 0
5 5 0 0
90783 145 153 35
9 7 8 5 3 4 1 6 2 10
5 2267 1
2 0 0 0
88360 111 188 23
9 4...

output:

2273
Alice
68293 55441 85330 77480 90461 88360 67682 90302 50449 100000 

result:

ok 3 lines

Test #34:

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

input:

10
88504 109 233 37
3 2 8 9 5 4 7 1 6 10
2 99 0
5 2 0 0
80968 141 227 7
2 3 1 5 7 8 9 6 4 10
4 0 0
8 59 1 0
65546 154 216 49
5 7 3 6 8 1 4 9 2 10
1 0 0
3 10 0 0
52541 107 133 21
1 8 4 2 5 9 7 6 3 10
4 0 0
1 199 0 0
92207 112 130 29
6 2 9 1 7 3 8 4 5 10
3 73 1
8 46 1 0
80704 124 169 49
7 3 8 1 6 9 4 ...

output:

1092
Alice
74328 66402 51526 38157 39675 26630 72755 50102 9363 85707 

result:

ok 3 lines

Test #35:

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

input:

10
58713 181 221 47
9 2 5 8 3 7 1 4 6 10
2 106 0
3 10 0 0
91973 100 231 33
5 6 2 3 4 7 9 8 1 10
5 18 8
7 35 16 27
55666 105 233 28
7 8 9 3 2 5 4 6 1 10
2 116 0
5 3 0 0
90029 154 175 39
7 4 3 2 8 9 5 6 1 10
3 28 1
7 34 8 1415
66381 193 158 11
3 9 4 6 5 8 1 2 7 10
2 24 0
7 36 8 4079
67146 139 233 29
6...

output:

16163
Bob
0 0 0 90120 0 0 62782 0 0 0 

result:

ok 3 lines

Test #36:

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

input:

10
74108 179 209 19
2 1 5 4 8 3 6 9 7 10
2 42 0
4 84 1 0
59083 155 246 28
9 6 4 5 2 8 3 7 1 10
2 4 0
3 10 0 0
70777 176 207 6
4 6 2 7 9 3 5 8 1 10
2 113 0
8 9 1 0
69713 103 137 33
2 5 9 4 6 3 8 1 7 10
1 0 0
5 3 0 0
60765 172 132 33
9 1 3 6 8 2 7 5 4 10
2 24 0
5 3 0 0
79609 194 199 0
4 3 2 6 1 5 9 8 ...

output:

3077
Bob
77071 64558 71949 65602 61057 67707 92096 88540 23781 100000 

result:

ok 3 lines

Test #37:

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

input:

10
77085 151 197 4
5 1 2 7 3 9 4 6 8 10
3 14 1
1 129 0 0
73336 137 142 18
7 2 9 1 5 4 8 3 6 10
5 4172 6
2 0 0 0
60425 198 172 42
6 1 7 5 8 9 4 2 3 10
5 1261 7
3 10 0 0
51636 161 210 49
9 1 8 7 6 4 5 2 3 10
2 2 0
7 18 7 806
88076 132 242 1
7 1 6 8 9 4 3 2 5 10
5 3459 7
5 4 0 0
84255 172 163 34
9 4 6 ...

output:

4200
Alice
0 0 0 0 88076 0 0 0 28719 0 

result:

ok 3 lines

Test #38:

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

input:

10
51836 103 128 11
6 7 1 9 8 5 4 2 3 10
2 46 0
9 13 1 1144
46601 113 97 0
9 1 2 8 4 3 6 7 5 10
2 51 0
6 58 1 0
52216 197 86 15
6 1 7 3 9 5 8 4 2 10
3 40 1
4 45 1 0
76526 130 82 0
1 9 8 6 7 4 5 3 2 10
4 0 0
1 114 0 0
64155 187 83 4
4 7 1 9 2 3 6 8 5 10
3 75 1
7 87 2 517
61857 148 108 37
8 5 1 4 9 6 ...

output:

15840
Bob
38467 38523 77491 38633 63298 38403 38485 38674 38417 100000 

result:

ok 3 lines

Test #39:

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

input:

10
50969 132 88 21
3 9 2 5 6 8 4 1 7 10
3 37 1
2 0 0 0
54448 189 110 49
9 1 2 6 5 7 4 3 8 10
1 0 0
6 45 5 0
64944 197 89 2
8 3 1 2 5 4 9 7 6 10
3 7 1
2 0 0 0
60760 197 109 38
8 7 6 1 9 4 5 2 3 10
5 868 10
2 0 0 0
65801 172 127 44
9 6 7 8 5 2 1 3 4 10
4 0 0
9 69 2 1475
69610 156 114 36
8 9 4 6 1 3 2 ...

output:

3595
Bob
63944 32062 32888 70597 41507 79348 34218 34298 32980 89951 

result:

ok 3 lines

Test #40:

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

input:

10
52316 174 112 6
5 4 2 1 3 6 8 9 7 10
4 0 0
2 0 0 0
51696 105 95 28
6 3 7 4 2 8 5 9 1 10
4 0 0
3 10 0 0
62523 109 101 25
6 9 8 1 5 2 7 3 4 10
2 40 0
9 68 2 447
70410 110 133 30
5 2 8 4 9 6 3 7 1 10
3 64 1
7 25 5 1503
52559 197 104 48
5 2 7 3 9 1 4 6 8 10
5 157 5
7 43 10 3582
51525 107 119 12
5 6 4...

output:

8834
Alice
0 0 0 47269 0 0 46225 0 0 46317 

result:

ok 3 lines

Test #41:

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

input:

10
60896 101 148 16
8 5 6 1 9 2 7 3 4 10
4 0 0
9 24 2 1281
47135 136 124 3
5 9 7 6 1 4 2 3 8 10
2 7 0
4 76 1 0
40593 200 132 45
7 9 4 5 8 1 2 6 3 10
3 73 1
8 44 1 0
40159 182 131 4
4 3 8 2 1 9 6 7 5 10
3 79 1
4 65 1 0
55020 137 104 4
3 1 7 4 8 2 5 9 6 10
1 0 0
3 10 0 0
50559 108 109 44
6 4 5 9 1 8 2...

output:

10677
Alice
60524 46763 40593 40159 54834 50187 47772 60852 66395 99814 

result:

ok 3 lines

Test #42:

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

input:

10
67263 116 107 1
2 8 9 3 7 5 6 4 1 10
1 0 0
8 47 1 0
67574 127 82 45
2 9 3 1 8 4 6 5 7 10
3 14 1
5 1 0 0
71596 140 96 30
7 5 8 2 4 9 3 6 1 10
3 29 1
2 0 0 0
47784 151 76 13
3 4 5 2 9 7 8 1 6 10
1 0 0
4 3 1 0
64041 140 143 30
9 4 1 3 8 6 2 5 7 10
2 11 0
9 45 1 1569
41131 138 141 48
9 7 8 5 6 4 2 3 ...

output:

12979
Bob
74703 0 0 50577 0 18391 0 0 0 68274 

result:

ok 3 lines

Test #43:

score: 0
Accepted
time: 5ms
memory: 4444kb

input:

10
68610 172 132 49
5 6 8 1 7 4 2 3 9 10
1 0 0
7 84 4 3628
41078 116 79 33
5 1 9 3 7 4 8 2 6 10
3 21 1
6 77 2 0
66875 161 78 32
6 7 3 9 8 2 4 5 1 10
3 49 1
1 149 0 0
56280 175 101 38
2 1 4 9 7 6 3 5 8 10
1 0 0
2 0 0 0
71644 116 102 41
4 3 5 1 6 8 2 9 7 10
3 41 1
6 58 1 0
43606 185 90 46
4 7 8 2 1 3 ...

output:

17123
Bob
73543 38906 41653 52297 49275 47469 51008 49675 46060 100000 

result:

ok 3 lines

Test #44:

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

input:

10
77190 144 111 34
3 4 7 1 8 2 9 6 5 10
2 16 0
7 43 1 2843
46765 140 115 14
9 5 8 6 3 1 2 7 4 10
2 19 0
3 10 0 0
61707 158 84 19
1 9 8 7 3 2 4 5 6 10
4 0 0
7 28 4 3715
50138 147 129 20
7 6 2 5 1 3 8 9 4 10
4 0 0
5 1 0 0
77739 185 86 24
1 2 9 7 4 6 5 3 8 10
3 65 1
9 94 2 1541
77621 144 81 27
4 7 8 3...

output:

16066
Bob
0 0 0 0 71038 0 58852 0 0 0 

result:

ok 3 lines

Test #45:

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

input:

10
78537 115 136 45
6 7 1 9 2 8 4 3 5 10
2 28 0
5 4 0 0
40699 150 120 3
1 5 3 7 9 8 4 6 2 10
1 0 0
1 118 0 0
69402 120 86 13
6 3 9 8 4 7 1 2 5 10
1 0 0
3 10 0 0
52672 144 140 30
9 2 3 5 6 7 8 4 1 10
5 3772 7
7 23 6 3658
59458 189 99 29
2 4 6 9 8 1 3 7 5 10
3 75 1
4 31 1 0
53083 122 112 20
7 9 3 6 2 ...

output:

12200
Alice
0 0 0 52593 59407 0 53712 0 0 0 

result:

ok 3 lines

Test #46:

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

input:

10
43097 155 99 41
6 4 1 2 3 9 8 5 7 10
4 0 0
3 10 0 0
47222 124 107 6
9 4 7 3 6 1 5 2 8 10
1 0 0
9 29 2 193
75549 194 133 32
5 2 7 9 6 8 1 4 3 10
1 0 0
8 61 1 0
50092 103 115 3
4 1 9 7 5 2 6 3 8 10
3 58 1
4 42 1 0
61817 164 87 44
3 4 2 1 8 6 5 7 9 10
4 0 0
1 100 0 0
47109 124 97 20
2 8 7 1 4 3 5 6 ...

output:

13460
Bob
0 52326 52998 53106 0 49580 55270 0 0 0 

result:

ok 3 lines

Test #47:

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

input:

10
51677 184 134 38
8 5 9 6 7 3 4 1 2 10
1 0 0
3 10 0 0
42044 157 128 22
5 3 4 9 2 6 1 8 7 10
2 28 0
6 55 4 0
76615 137 95 15
7 8 1 5 6 9 4 2 3 10
2 38 0
4 93 1 0
61753 164 90 2
4 7 9 2 8 3 1 5 6 10
3 20 1
6 67 2 0
42861 192 94 19
9 4 5 1 7 2 8 6 3 10
2 6 0
3 10 0 0
65834 196 80 35
6 5 3 7 4 2 9 8 1...

output:

12586
Bob
54900 0 0 0 0 0 0 0 0 0 

result:

ok 3 lines

Test #48:

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

input:

10
77722 131 86 49
4 5 8 3 6 2 1 7 9 10
1 0 0
5 2 0 0
75931 137 67 4
2 3 5 8 1 9 4 7 6 10
2 6 0
5 5 0 0
58750 198 65 7
3 2 1 9 5 6 4 8 7 10
4 0 0
9 13 1 847
55286 176 77 23
5 4 7 3 8 2 6 9 1 10
2 47 0
8 87 1 0
61827 183 111 2
1 5 6 2 7 3 9 4 8 10
3 45 1
4 76 1 0
44787 174 118 36
4 7 8 1 5 2 9 3 6 10...

output:

9392
Alice
77722 75931 38804 55286 61827 44787 69841 62870 68697 100000 

result:

ok 3 lines

Test #49:

score: 0
Accepted
time: 5ms
memory: 4384kb

input:

10
79069 173 119 9
7 6 1 3 8 5 9 2 4 10
1 0 0
3 10 0 0
54937 112 118 38
5 2 7 6 4 9 8 1 3 10
5 2383 6
4 1 1 0
73710 169 100 26
7 2 5 8 3 1 9 4 6 10
3 11 1
5 2 0 0
65979 137 64 33
4 1 6 7 8 3 2 9 5 10
4 0 0
7 97 5 204
62577 135 85 2
8 7 2 9 3 6 5 1 4 10
4 0 0
8 66 1 0
49197 197 99 42
8 5 1 2 6 4 9 7 ...

output:

16180
Alice
50780 54937 73710 51350 38260 49197 50821 50447 49370 75010 

result:

ok 3 lines

Test #50:

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

input:

10
40415 101 81 45
4 3 6 9 5 8 7 2 1 10
3 64 1
2 0 0 0
46518 175 78 50
7 8 1 6 2 9 5 3 4 10
1 0 0
9 91 3 27
66969 105 61 8
8 9 3 5 7 6 4 1 2 10
5 1252 10
6 14 1 0
78701 169 71 25
6 5 2 1 9 7 3 8 4 10
2 44 0
9 19 3 1167
62780 122 69 9
6 3 5 1 8 2 7 4 9 10
4 0 0
7 12 1 1708
47903 194 115 21
4 6 8 5 3 ...

output:

17968
Bob
72431 65457 76702 54560 55359 73379 69938 55444 73266 100000 

result:

ok 3 lines

Test #51:

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

input:

10
46781 115 113 4
6 9 3 1 4 7 8 5 2 10
4 0 0
1 85 0 0
69244 190 75 22
8 2 4 1 3 5 7 9 6 10
1 0 0
4 85 1 0
51907 156 64 44
3 1 4 5 7 9 8 2 6 10
3 44 1
3 10 0 0
79701 151 120 11
6 2 9 7 1 8 5 4 3 10
3 38 1
2 0 0 0
40632 192 66 14
1 2 8 7 5 9 4 3 6 10
2 24 0
1 64 0 0
61497 168 107 44
5 6 9 3 4 2 7 8 1...

output:

9107
Alice
0 0 51907 68306 0 0 0 0 51906 43029 

result:

ok 3 lines

Test #52:

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

input:

10
55362 171 85 27
8 6 2 5 7 1 3 9 4 10
5 91 4
6 77 4 0
73700 122 66 45
3 9 7 5 4 2 1 6 8 10
5 74 6
8 27 1 0
51762 150 100 47
9 5 7 1 8 4 3 2 6 10
3 15 1
7 88 5 91
57115 132 79 32
8 6 1 3 5 2 9 7 4 10
2 56 0
5 1 0 0
70154 136 81 21
4 8 6 9 3 1 2 7 5 10
2 59 0
6 60 3 0
47605 191 71 14
4 2 6 1 7 8 5 3...

output:

7888
Bob
49796 48005 75731 43726 53044 72989 52166 55735 65337 86157 

result:

ok 3 lines

Test #53:

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

input:

10
54903 141 108 48
9 8 5 2 3 1 6 7 4 10
2 32 0
9 80 3 711
57895 199 88 0
3 8 6 4 7 9 1 5 2 10
5 1024 9
7 10 2 1954
55317 192 69 23
9 2 1 6 8 5 7 4 3 10
2 29 0
8 84 1 0
64136 192 103 26
4 9 3 6 5 2 1 8 7 10
1 0 0
1 117 0 0
57414 118 96 37
8 2 1 6 4 9 3 7 5 10
5 1474 4
8 99 1 0
41626 184 91 48
6 7 3 ...

output:

11420
Alice
54903 45240 44612 45890 57414 41626 45774 45079 44641 100000 

result:

ok 3 lines

Test #54:

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

input:

10
54036 139 80 7
7 1 8 2 6 4 5 9 3 10
4 0 0
7 87 8 1991
46601 199 86 31
7 1 8 2 9 4 5 3 6 10
1 0 0
1 65 0 0
53190 142 60 11
3 8 2 5 9 7 1 6 4 10
2 20 0
6 70 3 0
77146 162 113 2
5 9 7 6 1 4 3 2 8 10
1 0 0
5 2 0 0
64264 168 79 20
4 3 7 8 6 1 9 2 5 10
3 34 1
2 0 0 0
55066 142 64 13
7 6 5 1 4 8 9 3 2 1...

output:

23074
Alice
0 0 0 0 10792 0 65490 64293 65594 0 

result:

ok 3 lines

Test #55:

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

input:

10
41973 181 70 0
3 8 7 6 4 9 5 1 2 10
1 0 0
3 10 0 0
79052 200 82 19
2 4 3 8 5 6 7 9 1 10
3 46 1
7 45 1 2951
40094 140 73 10
4 6 9 5 2 7 3 8 1 10
3 40 1
9 52 3 750
61621 103 77 38
4 8 5 1 7 6 9 2 3 10
5 2132 5
4 48 1 0
61164 156 63 22
9 1 5 8 7 4 3 6 2 10
5 2754 3
3 10 0 0
60820 185 100 48
6 2 4 9 ...

output:

12014
Bob
63241 0 0 0 0 0 0 0 0 0 

result:

ok 3 lines

Test #56:

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

input:

10
50554 135 102 49
6 3 9 8 1 2 4 5 7 10
1 0 0
4 93 1 0
41509 111 113 1
9 2 1 4 5 3 8 6 7 10
3 41 1
5 3 0 0
49023 178 106 37
8 9 7 3 1 5 2 6 4 10
1 0 0
5 2 0 0
40620 105 96 31
9 6 1 8 3 7 2 4 5 10
2 18 0
1 94 0 0
42913 192 101 39
2 6 7 4 9 3 8 5 1 10
1 0 0
4 86 1 0
71433 165 117 15
6 2 5 7 9 3 1 8 4...

output:

10891
Bob
0 0 0 60658 0 0 0 0 0 0 

result:

ok 3 lines

Test #57:

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

input:

10
51901 107 64 8
9 3 4 1 8 2 5 6 7 10
2 58 0
3 10 0 0
78307 193 70 42
3 6 5 2 8 1 7 9 4 10
2 28 0
4 34 1 0
56301 179 109 22
5 7 6 2 1 8 3 9 4 10
1 0 0
6 15 4 0
72665 132 70 36
7 6 3 2 9 8 4 1 5 10
4 0 0
6 76 3 0
68253 110 80 49
8 3 1 2 5 9 4 7 6 10
2 30 0
7 77 7 3120
79001 164 93 43
2 9 3 4 8 1 7 6...

output:

1822
Alice
51901 78307 56301 72665 68253 79001 55379 58830 74328 100000 

result:

ok 3 lines

Test #58:

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

input:

10
58267 179 96 44
7 5 4 2 3 8 9 6 1 10
2 2 0
4 79 1 0
70058 138 99 7
7 4 9 2 1 8 3 6 5 10
4 0 0
7 68 6 1045
58458 172 66 30
4 9 7 1 3 5 2 8 6 10
4 0 0
4 96 1 0
55400 166 101 21
8 9 5 3 6 4 1 7 2 10
1 0 0
2 0 0 0
55806 159 69 21
8 2 7 9 3 1 6 5 4 10
3 14 1
2 0 0 0
49075 151 66 27
6 4 9 2 3 8 7 5 1 1...

output:

11277
Bob
0 0 0 55329 0 0 0 0 0 0 

result:

ok 3 lines

Test #59:

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

input:

10
59614 178 119 28
3 2 6 9 5 7 4 8 1 10
2 51 0
2 0 0 0
52545 160 74 11
7 6 9 1 2 5 8 4 3 10
4 0 0
2 0 0 0
47462 189 94 28
8 2 7 1 5 4 9 6 3 10
3 3 1
1 105 0 0
68640 190 83 13
3 7 8 2 1 6 4 9 5 10
5 1699 7
7 47 4 3402
40224 168 110 26
4 8 7 2 9 6 3 5 1 10
4 0 0
1 100 0 0
55387 130 77 46
8 7 5 3 9 4 ...

output:

12980
Bob
0 0 0 0 0 0 46649 0 0 93054 

result:

ok 3 lines

Test #60:

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

input:

10
60961 148 90 13
8 9 4 1 7 5 3 6 2 10
4 0 0
6 19 1 0
49023 176 113 42
3 9 2 7 5 4 8 1 6 10
2 22 0
1 93 0 0
62773 151 77 33
8 5 4 9 1 7 3 2 6 10
2 5 0
8 4 1 0
75950 128 81 11
9 7 1 3 5 8 2 6 4 10
4 0 0
4 69 1 0
62349 177 78 42
2 3 4 8 6 1 9 7 5 10
4 0 0
6 55 2 0
76372 151 76 6
3 7 8 1 9 6 5 4 2 10
...

output:

20158
Bob
79058 73943 60255 54111 59878 79436 57638 64326 75528 100000 

result:

ok 3 lines

Test #61:

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

input:

10
65522 189 74 48
6 8 4 9 2 3 5 7 1 10
2 31 0
7 12 7 3136
48457 181 69 36
2 6 5 4 8 7 3 1 9 10
3 27 1
9 5 2 833
68182 196 93 26
8 3 4 1 7 5 2 9 6 10
2 31 0
9 80 3 1070
79446 141 79 27
4 8 3 7 2 9 1 5 6 10
4 0 0
1 72 0 0
77451 173 82 10
3 6 7 2 5 1 4 9 8 10
5 3333 1
3 10 0 0
43092 133 104 40
9 6 8 7...

output:

11369
Bob
47859 59519 48960 68639 48273 48826 48108 49178 48341 59562 

result:

ok 3 lines

Test #62:

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

input:

10
74102 117 97 33
9 6 4 8 5 2 3 1 7 10
2 31 0
5 3 0 0
72458 142 117 28
1 6 4 8 5 7 2 3 9 10
1 0 0
3 10 0 0
48019 153 98 10
7 8 3 5 2 1 6 9 4 10
3 47 1
6 66 1 0
60330 104 62 12
3 7 4 8 6 2 9 1 5 10
5 258 4
8 91 1 0
69191 140 68 26
4 1 2 7 8 5 3 6 9 10
3 71 1
3 10 0 0
41074 159 110 18
3 8 4 1 7 5 6 9...

output:

2617
Alice
35028 37718 19733 29460 69191 9714 63627 37319 57793 70449 

result:

ok 3 lines

Test #63:

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

input:

10
75449 116 68 17
5 2 4 3 8 7 6 9 1 10
2 35 0
6 30 1 0
73237 104 69 14
1 5 3 7 2 9 4 6 8 10
5 881 6
3 10 0 0
68770 170 96 47
5 4 9 1 8 7 3 6 2 10
3 77 1
4 100 1 0
77151 103 75 10
5 9 7 2 1 6 4 8 3 10
5 1490 9
5 1 0 0
47443 122 85 2
9 4 8 3 5 1 7 2 6 10
4 0 0
8 6 1 0
68595 139 108 27
5 2 8 1 7 4 9 6...

output:

4904
Alice
75449 73237 68767 77151 47443 68595 74842 56565 64921 100000 

result:

ok 3 lines

Test #64:

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

input:

10
41816 187 101 2
6 2 5 3 9 8 1 7 4 10
4 0 0
4 54 1 0
51195 182 99 29
5 6 7 2 1 9 8 4 3 10
5 3404 3
9 72 1 1304
41578 167 82 41
2 4 1 9 5 6 7 8 3 10
1 0 0
8 11 1 0
53245 197 118 2
3 1 2 5 9 6 8 4 7 10
2 24 0
7 1 7 131
62805 172 106 41
7 3 6 9 8 4 5 1 2 10
5 2342 1
3 10 0 0
60661 119 74 27
4 7 1 6 8...

output:

16108
Bob
0 35565 34929 0 35488 0 0 0 0 0 

result:

ok 3 lines

Test #65:

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

input:

10
51813 131 67 41
8 6 9 4 7 3 1 2 5 10
4 0 0
6 77 3 0
76418 127 83 38
9 8 1 3 6 5 2 4 7 10
3 50 1
2 0 0 0
48362 114 91 50
3 5 4 7 1 6 2 8 9 10
3 28 1
5 1 0 0
57177 169 62 40
9 5 3 2 7 4 6 8 1 10
3 44 1
3 10 0 0
40625 159 117 36
9 6 4 8 3 2 7 1 5 10
2 55 0
6 6 1 0
63999 120 98 11
7 1 3 5 8 2 9 6 4 1...

output:

8323
Alice
34130 76418 48362 57177 0 0 17058 0 63371 86969 

result:

ok 3 lines

Test #66:

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

input:

10
53160 103 100 26
9 8 3 7 6 2 4 1 5 10
4 0 0
5 1 0 0
75879 142 66 9
6 9 4 1 2 7 8 5 3 10
5 1937 7
7 63 4 68
56537 170 85 39
9 6 4 8 1 2 5 7 3 10
2 40 0
1 113 0 0
78386 155 92 10
2 9 7 6 1 8 5 3 4 10
2 21 0
6 68 3 0
62471 200 76 34
4 1 9 8 7 6 2 3 5 10
1 0 0
7 11 1 728
41643 108 78 38
3 7 5 2 1 4 9...

output:

789
Bob
60686 71699 42476 52109 69851 41588 63646 46957 57047 100000 

result:

ok 3 lines

Test #67:

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

input:

10
61740 159 61 36
3 5 8 4 1 6 2 9 7 10
4 0 0
2 0 0 0
64191 165 69 33
1 9 3 8 4 2 5 6 7 10
5 1592 4
9 71 3 1415
78022 123 90 35
8 4 9 7 6 1 3 5 2 10
3 75 1
4 27 1 0
49634 101 96 2
3 7 6 4 8 1 2 5 9 10
5 3643 10
7 92 2 964
51340 149 80 12
1 7 3 2 8 9 5 6 4 10
5 1610 9
2 0 0 0
72605 157 111 18
8 7 6 2...

output:

12398
Alice
0 0 0 47414 0 0 0 0 0 0 

result:

ok 3 lines

Test #68:

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

input:

10
70321 174 94 21
3 7 2 8 9 4 1 6 5 10
5 3891 1
5 1 0 0
70605 190 84 7
3 6 7 8 4 1 2 9 5 10
1 0 0
9 40 2 780
51450 192 95 19
5 1 9 8 3 2 4 7 6 10
2 26 0
7 17 1 1475
44021 200 63 44
8 1 4 9 6 3 7 2 5 10
5 2871 10
7 18 8 1983
77123 153 106 42
3 1 7 4 2 6 5 9 8 10
3 12 1
9 60 2 1534
44478 104 111 19
1...

output:

10418
Bob
47298 77151 57761 4901 60789 66854 73820 41918 40787 100000 

result:

ok 3 lines

Test #69:

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

input:

10
69454 129 65 31
7 9 1 4 5 8 6 2 3 10
5 3592 5
2 0 0 0
76698 149 83 29
4 8 9 5 2 6 7 1 3 10
4 0 0
5 3 0 0
44068 190 66 7
3 4 2 5 9 8 6 7 1 10
1 0 0
6 91 2 0
41090 186 88 14
2 7 1 6 8 5 4 9 3 10
5 3170 7
7 89 8 2109
43848 199 108 42
2 6 1 7 5 3 4 8 9 10
5 2299 3
9 43 2 126
43871 100 109 45
1 7 3 2 ...

output:

5042
Alice
69454 68210 44068 41090 43848 43871 59029 53321 60035 100000 

result:

ok 3 lines

Test #70:

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

input:

10
78035 143 88 3
2 6 5 4 3 1 8 9 7 10
2 56 0
2 0 0 0
73801 104 62 49
5 6 7 9 2 4 3 8 1 10
1 0 0
9 25 3 792
70072 136 120 17
5 9 7 6 1 3 2 8 4 10
2 2 0
9 70 2 301
70673 105 102 48
6 2 5 7 9 1 8 4 3 10
3 19 1
6 78 2 0
49376 190 87 17
2 4 7 1 3 5 6 9 8 10
2 47 0
6 59 2 0
77826 180 108 23
1 7 6 4 2 3 5...

output:

10745
Alice
0 0 0 70673 0 60915 42330 0 0 0 

result:

ok 3 lines

Test #71:

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

input:

10
79382 172 120 13
5 2 1 4 3 9 6 8 7 10
2 53 0
1 112 0 0
60454 188 64 18
5 1 7 4 3 9 2 8 6 10
3 30 1
1 65 0 0
58244 160 93 13
6 9 3 7 5 1 2 4 8 10
4 0 0
7 89 4 1544
80000 174 98 12
6 1 9 7 5 4 3 8 2 10
1 0 0
4 56 1 0
46491 151 92 26
7 5 4 2 3 9 8 1 6 10
1 0 0
7 91 1 3339
63484 189 72 28
3 5 4 8 6 9...

output:

2808
Alice
49436 60454 54175 50140 46491 47080 49404 66787 47583 97341 

result:

ok 3 lines

Test #72:

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

input:

10
78515 171 82 49
6 8 9 4 7 3 2 5 1 10
3 41 1
3 10 0 0
57056 144 110 25
5 7 3 4 8 2 9 1 6 10
3 33 1
9 22 3 1150
61875 100 106 4
7 9 5 3 8 4 1 6 2 10
2 51 0
8 43 1 0
69029 113 120 11
6 5 7 4 8 2 3 1 9 10
5 1486 3
3 10 0 0
43598 176 98 43
8 7 4 2 1 9 5 3 6 10
1 0 0
7 49 6 1852
72967 166 95 31
4 3 2 1...

output:

2150
Alice
78515 57056 61875 42358 43598 72634 58663 67219 57670 100000 

result:

ok 3 lines

Test #73:

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

input:

10
47094 142 114 8
9 3 8 7 4 5 6 2 1 10
3 63 1
2 0 0 0
46425 170 95 20
6 9 2 1 5 4 8 3 7 10
2 24 0
6 30 4 0
41121 178 96 27
1 2 3 6 8 5 4 7 9 10
5 1439 8
8 63 1 0
77276 166 91 41
9 5 6 8 7 4 2 3 1 10
3 78 1
1 74 0 0
57092 125 62 18
1 9 7 4 8 6 3 5 2 10
1 0 0
2 0 0 0
40451 120 120 19
9 2 1 3 7 4 5 8 ...

output:

3611
Bob
45801 61588 44439 44750 57691 47164 56247 45724 45533 91848 

result:

ok 3 lines

Test #74:

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

input:

10
55675 113 86 6
1 6 7 8 5 2 9 4 3 10
4 0 0
4 27 1 0
40812 126 80 40
2 3 9 4 8 6 5 1 7 10
5 3668 7
1 98 0 0
57284 115 66 3
1 7 9 4 8 2 5 6 3 10
4 0 0
3 10 0 0
43425 156 108 8
7 8 9 3 1 4 2 6 5 10
2 18 0
2 0 0 0
57676 110 92 46
4 5 2 3 8 1 6 9 7 10
4 0 0
8 76 1 0
58184 156 61 0
7 9 8 4 5 1 6 3 2 10
...

output:

8048
Alice
0 19360 0 0 0 0 0 0 0 31998 

result:

ok 3 lines

Test #75:

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

input:

10
67479 117 62 47
1 2 6 7 3 8 4 5 9 10
4 0 0
4 31 1 0
61338 144 62 2
7 8 3 1 5 4 2 9 6 10
3 8 1
4 71 1 0
44297 193 77 24
6 4 1 9 7 8 3 5 2 10
1 0 0
7 45 1 2055
76331 136 97 13
6 4 3 1 8 5 9 2 7 10
5 3378 1
3 10 0 0
63238 188 91 22
9 3 2 4 5 7 1 6 8 10
3 71 1
3 10 0 0
41392 148 116 48
1 9 8 2 5 6 7 ...

output:

11935
Bob
0 0 0 41239 0 0 0 0 0 0 

result:

ok 3 lines

Test #76:

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

input:

10
68826 115 95 6
6 2 1 7 4 3 5 9 8 10
4 0 0
6 19 3 0
48493 127 108 22
5 6 2 8 7 9 4 1 3 10
2 4 0
4 61 1 0
59261 195 103 49
3 7 6 2 8 5 1 9 4 10
1 0 0
7 100 3 1335
47689 141 100 18
5 6 2 7 4 9 3 8 1 10
3 3 1
1 117 0 0
77517 113 115 11
3 2 6 5 8 4 9 7 1 10
4 0 0
7 99 3 161
66469 152 92 39
6 3 2 9 4 8...

output:

6685
Alice
48285 47803 48430 47611 68382 66469 47633 47639 68763 94336 

result:

ok 3 lines

Test #77:

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

input:

10
75192 187 117 42
8 7 2 1 9 3 6 5 4 10
5 3676 10
7 65 2 2306
53348 164 71 45
6 8 9 2 3 4 1 7 5 10
4 0 0
8 9 1 0
71960 116 79 4
9 1 5 2 7 3 6 4 8 10
5 1431 5
7 64 4 2618
60068 131 87 3
9 8 3 5 1 2 7 4 6 10
1 0 0
3 10 0 0
48306 105 114 18
6 9 5 1 2 4 7 8 3 10
1 0 0
4 35 1 0
74950 126 90 20
9 4 8 7 6...

output:

4086
Alice
75192 23154 24630 18998 25508 23822 61150 23622 42559 31438 

result:

ok 3 lines

Test #78:

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

input:

10
41966 184 90 50
4 8 5 2 1 7 9 6 3 10
2 21 0
6 47 4 0
67002 175 95 26
6 8 4 2 1 9 7 3 5 10
5 1180 5
6 67 4 0
61313 176 109 22
3 5 6 9 8 1 7 2 4 10
3 28 1
3 10 0 0
75303 126 91 36
4 5 9 6 7 3 2 1 8 10
2 16 0
7 45 8 3006
43947 163 92 1
8 1 7 5 2 6 3 4 9 10
2 14 0
3 10 0 0
55877 155 85 24
7 1 2 5 9 8...

output:

12980
Bob
51759 44354 49227 63853 50995 60960 44824 57399 57876 100000 

result:

ok 3 lines

Test #79:

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

input:

10
43313 199 62 35
4 3 1 9 7 6 2 5 8 10
4 0 0
2 0 0 0
51074 169 78 14
2 8 4 7 6 9 3 1 5 10
3 16 1
9 61 3 1363
73252 150 91 43
9 1 4 8 2 5 6 7 3 10
4 0 0
2 0 0 0
67352 157 104 7
7 8 2 9 6 3 1 4 5 10
2 49 0
8 91 1 0
61131 191 72 13
5 8 6 9 7 2 3 4 1 10
5 2795 5
2 0 0 0
78082 164 73 23
3 9 6 4 5 2 8 7 ...

output:

3753
Bob
71669 69319 51473 49987 51660 66006 71041 40245 71657 100000 

result:

ok 3 lines

Test #80:

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

input:

10
42446 126 84 45
6 9 1 7 8 4 2 3 5 10
5 222 6
5 4 0 0
51498 128 70 30
1 6 9 7 5 2 8 4 3 10
3 52 1
4 3 1 0
51619 104 82 44
9 6 5 7 4 2 8 1 3 10
3 35 1
2 0 0 0
62474 166 104 7
1 7 2 8 3 4 6 5 9 10
1 0 0
5 4 0 0
56559 103 114 12
4 9 5 1 6 3 7 8 2 10
5 718 5
6 1 3 0
56158 189 80 38
7 5 9 8 3 4 1 2 6 1...

output:

11569
Alice
40808 28120 51619 39427 44639 33736 39961 73665 32284 93630 

result:

ok 3 lines

Test #81:

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

input:

10
51026 125 117 31
4 5 7 6 1 8 2 9 3 10
5 3924 5
1 97 0 0
57620 110 77 20
1 9 2 3 5 8 7 6 4 10
5 904 4
2 0 0 0
56129 169 92 7
5 3 9 4 6 1 8 2 7 10
4 0 0
8 17 1 0
58925 168 111 26
1 3 2 5 8 4 7 9 6 10
5 3815 7
9 10 1 1556
41967 199 113 34
3 2 4 1 5 8 6 9 7 10
1 0 0
2 0 0 0
63660 124 111 12
4 7 6 9 1...

output:

10977
Alice
51026 0 0 57403 0 0 0 0 0 0 

result:

ok 3 lines

Test #82:

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

input:

10
52373 197 78 15
4 7 2 3 5 9 6 8 1 10
5 3625 3
1 74 0 0
78209 109 84 10
6 1 5 3 4 7 2 8 9 10
3 77 1
5 4 0 0
43295 182 108 50
4 3 5 2 9 1 8 7 6 10
2 29 0
6 83 2 0
66325 135 65 16
2 7 9 4 8 3 1 5 6 10
2 12 0
3 10 0 0
59203 156 96 47
7 4 1 5 3 9 8 2 6 10
1 0 0
8 41 1 0
55716 152 63 15
6 2 3 7 1 9 8 4...

output:

5545
Alice
50998 78209 43295 15642 59203 55716 67523 46445 44905 100000 

result:

ok 3 lines

Test #83:

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

input:

10
58740 169 111 13
8 3 9 2 4 1 5 7 6 10
1 0 0
4 92 1 0
68810 172 98 5
3 8 7 1 4 5 6 9 2 10
3 42 1
2 0 0 0
41051 158 98 32
6 9 3 8 7 1 4 5 2 10
1 0 0
3 10 0 0
46119 148 74 44
6 7 8 9 1 3 5 4 2 10
1 0 0
8 23 1 0
64875 161 78 42
5 8 9 4 6 7 1 2 3 10
4 0 0
4 79 1 0
55225 124 107 29
6 9 7 1 3 2 5 8 4 10...

output:

10840
Bob
0 0 0 0 0 0 0 0 59553 0 

result:

ok 3 lines

Test #84:

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

input:

10
67321 167 82 23
4 8 1 5 2 7 6 3 9 10
4 0 0
5 3 0 0
58861 189 77 49
3 5 7 9 2 4 1 8 6 10
2 12 0
7 84 4 3164
55169 124 65 47
5 4 1 8 3 6 2 7 9 10
2 12 0
2 0 0 0
62588 129 89 0
6 3 2 8 9 7 4 5 1 10
2 11 0
3 10 0 0
53958 112 116 4
8 7 2 5 6 4 3 9 1 10
3 28 1
3 10 0 0
78266 161 68 3
7 1 5 4 6 8 2 9 3 ...

output:

2374
Alice
12831 10873 14774 14154 53958 78266 0 20297 12685 57522 

result:

ok 3 lines

Test #85:

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

input:

10
63859 103 61 4
6 9 7 2 1 5 8 4 3 10
4 0 0
5 5 0 0
58295 124 85 21
1 3 4 5 6 9 8 7 2 10
3 16 1
6 27 4 0
68295 101 78 49
1 9 6 7 8 3 5 2 4 10
5 1856 10
1 92 0 0
56044 104 79 7
9 8 5 1 3 4 2 6 7 10
1 0 0
1 101 0 0
42298 169 91 5
6 3 9 8 1 5 4 2 7 10
4 0 0
1 82 0 0
55650 110 60 50
2 7 4 8 1 5 6 3 9 1...

output:

1077
Bob
43258 46462 45489 56920 69675 43684 58184 53001 56496 85862 

result:

ok 3 lines

Test #86:

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

input:

10
68420 200 106 25
6 2 4 9 3 5 7 8 1 10
1 0 0
4 59 1 0
60080 162 69 23
3 7 2 9 5 4 6 8 1 10
4 0 0
4 59 1 0
60731 135 104 17
1 3 6 2 7 8 5 4 9 10
4 0 0
2 0 0 0
53210 160 108 7
3 2 1 9 6 7 8 4 5 10
4 0 0
2 0 0 0
77812 128 76 38
8 6 4 7 9 5 2 3 1 10
2 54 0
7 25 3 3984
74196 165 92 33
4 2 5 6 9 7 1 8 3...

output:

12297
Bob
48556 41792 0 56714 41265 0 41689 0 21387 89192 

result:

ok 3 lines

Test #87:

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

input:

10
77000 172 78 24
8 9 4 5 6 7 1 2 3 10
3 50 1
7 68 7 3104
55305 103 113 13
9 6 3 1 2 4 5 7 8 10
4 0 0
6 10 2 0
42065 103 96 50
5 4 1 8 2 6 9 7 3 10
5 3201 9
6 90 1 0
54543 146 94 17
8 3 2 5 7 1 9 6 4 10
5 48 1
5 4 0 0
76338 139 76 48
7 6 9 5 8 2 3 1 4 10
3 66 1
9 84 3 1599
63208 152 96 3
2 3 1 4 5 ...

output:

2122
Bob
44509 44907 44924 58076 44905 60317 44919 44855 45028 100000 

result:

ok 3 lines

Test #88:

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

input:

10
78347 143 100 34
2 3 8 7 5 6 1 9 4 10
4 0 0
2 0 0 0
74985 178 67 41
5 7 8 1 2 6 9 4 3 10
3 75 1
8 71 1 0
75969 157 105 11
7 5 3 2 9 6 4 1 8 10
2 16 0
3 10 0 0
44816 133 115 23
9 3 4 7 5 6 8 1 2 10
4 0 0
2 0 0 0
79773 168 85 11
8 6 3 5 4 7 2 9 1 10
2 27 0
4 50 1 0
73951 172 96 17
7 2 4 1 3 6 9 8 5...

output:

3979
Bob
57665 45441 59478 78479 54629 46074 49605 65566 77439 100000 

result:

ok 3 lines

Test #89:

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

input:

10
77481 141 72 44
2 5 7 8 9 4 6 3 1 10
4 0 0
1 83 0 0
74067 155 83 39
6 7 3 2 5 9 1 8 4 10
4 0 0
9 71 3 521
67204 125 70 28
7 1 8 9 5 2 3 6 4 10
1 0 0
3 10 0 0
63603 135 84 44
2 7 6 4 8 3 9 1 5 10
4 0 0
9 15 1 1435
78389 101 61 33
2 3 6 5 8 1 4 7 9 10
2 48 0
3 10 0 0
61061 108 64 48
2 9 1 5 4 8 7 6...

output:

8897
Alice
77481 74067 67148 63603 67134 61061 62285 79538 76444 100000 

result:

ok 3 lines

Test #90:

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

input:

10
46060 112 94 3
6 7 9 2 8 3 1 5 4 10
4 0 0
9 68 1 1539
66847 100 84 8
1 4 7 6 5 8 3 2 9 10
2 53 0
8 46 1 0
43537 141 107 39
2 3 5 7 6 9 1 4 8 10
4 0 0
3 10 0 0
78346 192 84 46
5 8 4 6 7 2 9 3 1 10
2 60 0
6 1 3 0
59985 100 105 10
2 7 5 1 8 4 3 6 9 10
5 2099 1
2 0 0 0
51942 190 92 37
9 2 6 8 4 1 3 5...

output:

13948
Bob
44308 51161 4639 42433 69236 42378 43883 37260 52318 59639 

result:

ok 3 lines

Test #91:

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

input:

10
54641 185 66 39
7 6 4 2 3 1 8 5 9 10
1 0 0
8 39 1 0
49728 139 66 8
4 2 1 3 7 8 5 6 9 10
5 1511 9
8 95 1 0
45718 116 86 4
2 9 6 7 8 1 3 5 4 10
3 5 1
2 0 0 0
67876 194 76 44
1 7 8 5 3 2 6 4 9 10
3 36 1
2 0 0 0
58584 118 67 47
8 4 2 7 5 3 6 1 9 10
1 0 0
7 99 3 793
43309 127 101 29
7 2 1 8 6 3 9 5 4 ...

output:

8317
Bob
76830 69894 34182 42081 41042 42195 42900 41052 42120 74894 

result:

ok 3 lines

Test #92:

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

input:

10
53774 140 98 11
2 1 4 5 6 3 9 8 7 10
1 0 0
6 26 2 0
46330 122 112 3
9 4 1 2 5 7 6 8 3 10
5 2281 2
9 63 2 303
63957 168 76 16
4 1 8 5 2 6 3 7 9 10
5 1611 1
7 35 3 726
73417 149 116 37
8 3 1 9 7 6 4 2 5 10
4 0 0
6 84 3 0
71319 199 75 45
9 7 3 2 5 8 4 1 6 10
3 9 1
3 10 0 0
67604 129 103 19
5 6 1 4 2...

output:

3986
Alice
53774 46330 63957 63014 65323 63045 51112 43592 54925 100000 

result:

ok 3 lines

Test #93:

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

input:

10
62354 154 60 47
8 1 4 9 3 7 2 6 5 10
3 68 1
8 98 1 0
40099 106 93 17
8 5 3 2 7 1 4 6 9 10
1 0 0
9 98 2 382
52984 147 114 14
2 3 4 5 6 7 9 8 1 10
3 38 1
5 5 0 0
43459 179 78 25
1 5 4 3 6 9 7 8 2 10
3 36 1
9 20 3 405
68862 177 96 29
2 9 5 8 3 7 4 1 6 10
3 78 1
6 63 4 0
49942 185 113 31
4 7 2 6 5 9 ...

output:

8643
Alice
62354 40099 52984 43459 68862 49942 41449 66686 29376 100000 

result:

ok 3 lines

Test #94:

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

input:

10
63701 109 92 31
3 9 4 6 7 2 1 5 8 10
3 9 1
7 95 6 1924
78592 103 95 32
2 4 7 3 6 8 5 9 1 10
2 46 0
1 70 0 0
47030 197 88 39
7 6 2 4 1 5 9 3 8 10
4 0 0
8 14 1 0
75275 146 110 41
4 8 1 6 2 7 3 5 9 10
3 15 1
8 69 1 0
70023 115 94 33
1 9 6 8 2 7 5 4 3 10
3 79 1
6 51 4 0
45995 187 74 28
5 9 6 7 1 8 2 ...

output:

7990
Alice
46457 78592 47030 75275 70023 45995 60465 56817 70342 100000 

result:

ok 3 lines

Test #95:

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

input:

10
64682 146 90 12
6 1 7 2 4 3 8 5 9 10
5 1903 6
9 43 1 1289
67209 190 79 18
8 6 4 2 5 3 9 7 1 10
3 7 1
7 48 2 234
60297 198 77 3
5 6 8 9 1 7 2 3 4 10
2 21 0
1 93 0 0
77576 129 86 1
2 4 3 6 1 9 8 5 7 10
5 1742 8
5 2 0 0
70337 191 80 3
4 3 1 6 8 5 2 9 7 10
5 1190 1
3 10 0 0
48545 176 81 11
5 9 6 4 2 ...

output:

4251
Alice
64682 67209 60297 76776 70337 48545 78659 55852 50377 80000 

result:

ok 3 lines

Test #96:

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

input:

10
63815 160 97 7
7 1 4 5 6 9 3 8 2 10
1 0 0
9 69 1 805
53177 161 55 3
6 3 1 9 2 5 7 4 8 10
3 73 1
7 52 6 2807
70853 141 74 6
6 4 7 2 8 3 1 5 9 10
5 2420 8
3 10 0 0
41777 136 99 16
7 4 1 2 3 9 6 8 5 10
5 3441 5
7 50 2 962
43686 158 83 10
3 5 6 9 8 7 4 1 2 10
1 0 0
5 1 0 0
59900 151 57 0
2 4 5 1 8 9 ...

output:

9069
Alice
0 0 65953 40785 0 0 0 0 0 0 

result:

ok 3 lines

Test #97:

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

input:

10
77823 114 76 12
8 2 4 1 7 3 6 5 9 10
4 0 0
2 0 0 0
47938 153 65 16
9 5 8 3 6 2 4 1 7 10
1 0 0
8 16 1 0
44102 106 83 11
7 3 1 9 4 8 5 2 6 10
1 0 0
9 32 1 405
65500 184 83 19
1 5 3 2 8 7 4 6 9 10
4 0 0
3 10 0 0
60476 185 56 11
9 2 8 1 5 4 6 7 3 10
4 0 0
5 1 0 0
77107 195 76 12
7 8 4 2 3 1 6 9 5 10
...

output:

8485
Alice
77823 47938 44102 65500 60476 77107 42154 48604 74690 80000 

result:

ok 3 lines

Test #98:

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

input:

10
79170 129 58 15
5 2 8 1 7 9 3 4 6 10
1 0 0
9 56 1 305
58505 191 67 9
5 9 4 1 2 6 7 8 3 10
5 1816 10
1 89 0 0
42133 169 89 12
7 6 9 1 4 2 3 5 8 10
5 3643 8
8 46 1 0
67374 139 69 15
1 5 3 7 4 8 2 9 6 10
3 49 1
9 12 1 522
52371 162 52 4
8 6 1 9 7 3 2 4 5 10
1 0 0
5 1 0 0
51137 135 90 18
4 1 8 3 6 9 ...

output:

11789
Bob
0 0 0 75378 0 0 0 0 0 18428 

result:

ok 3 lines

Test #99:

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

input:

10
78303 184 65 18
1 2 9 8 3 4 6 5 7 10
1 0 0
6 24 2 0
51340 102 92 0
8 4 1 7 3 6 9 2 5 10
1 0 0
7 28 2 3870
59788 184 66 7
9 5 3 7 4 6 2 8 1 10
2 7 0
1 67 0 0
58049 189 86 12
5 3 4 6 8 7 1 2 9 10
5 1185 8
5 1 0 0
44159 150 92 12
8 6 3 2 5 9 4 1 7 10
3 5 1
8 22 1 0
59953 156 60 13
3 8 2 5 4 7 1 6 9 ...

output:

9731
Alice
0 0 0 0 0 0 1444 1608 0 0 

result:

ok 3 lines

Test #100:

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

input:

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

output:

15
Alice
2 0 96 

result:

ok 3 lines