QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#274710#7596. The One Polynomial ManZ_301AC ✓457ms61240kbC++179.1kb2023-12-03 20:24:522023-12-03 20:24:53

詳細信息

Test #1:

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

input:

7
4
0 4 5 6
2
2 3

output:

8

result:

ok 1 number(s): "8"

Test #2:

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

input:

19
10
0 3 4 5 8 9 13 14 15 18
10
2 3 5 9 10 11 12 13 14 15

output:

42

result:

ok 1 number(s): "42"

Test #3:

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

input:

7
1
6
2
1 3

output:

0

result:

ok 1 number(s): "0"

Test #4:

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

input:

5
4
0 2 3 4
1
2

output:

5

result:

ok 1 number(s): "5"

Test #5:

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

input:

7
3
1 3 4
4
1 3 4 6

output:

3

result:

ok 1 number(s): "3"

Test #6:

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

input:

53
28
0 2 6 7 8 10 13 17 18 19 21 23 24 27 28 29 30 32 33 34 37 38 39 40 42 43 45 52
23
3 7 12 13 15 16 20 22 23 29 31 33 34 35 37 38 39 40 41 46 48 49 50

output:

265

result:

ok 1 number(s): "265"

Test #7:

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

input:

71
24
1 2 9 12 13 16 18 20 24 29 30 46 49 51 52 53 55 57 58 59 61 62 63 68
35
0 8 9 10 11 13 14 15 16 17 18 19 22 23 24 26 28 31 33 34 36 40 43 45 46 49 50 52 57 59 60 62 65 67 69

output:

334

result:

ok 1 number(s): "334"

Test #8:

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

input:

41
17
0 2 6 9 13 15 18 19 20 21 27 28 30 31 33 34 38
21
0 2 5 6 7 8 15 17 18 19 23 24 27 28 31 32 34 35 37 39 40

output:

112

result:

ok 1 number(s): "112"

Test #9:

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

input:

859
406
0 3 4 8 9 12 15 16 17 19 23 28 29 35 36 39 41 42 43 52 53 61 65 68 70 72 74 75 77 78 79 80 85 86 87 90 91 92 94 99 100 104 106 110 111 115 119 120 121 122 124 134 135 136 143 145 146 147 148 150 151 152 153 154 156 157 158 161 162 166 169 171 177 180 181 182 184 186 193 196 198 201 202 203 2...

output:

83194

result:

ok 1 number(s): "83194"

Test #10:

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

input:

971
450
0 3 4 6 7 11 12 15 16 17 21 22 23 24 26 27 31 33 34 36 37 38 39 40 43 44 45 46 47 48 49 50 51 54 56 58 61 63 64 65 69 70 72 74 76 79 87 88 90 91 92 94 98 99 100 101 104 106 107 110 111 112 117 118 121 122 123 124 128 129 131 132 133 135 136 138 139 141 142 143 144 145 150 154 155 159 163 164...

output:

102834

result:

ok 1 number(s): "102834"

Test #11:

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

input:

4969
2537
0 3 7 8 11 13 15 16 17 20 22 27 28 29 33 35 37 38 39 42 43 45 46 49 52 53 54 55 57 59 63 64 66 69 72 73 74 81 83 86 87 89 90 91 93 95 98 100 101 102 108 109 110 111 112 114 115 120 124 127 129 131 134 135 141 143 144 145 149 151 152 155 158 159 160 161 162 163 166 167 169 171 172 173 175 1...

output:

3302307

result:

ok 1 number(s): "3302307"

Test #12:

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

input:

4973
2470
0 4 6 7 8 9 13 16 18 21 24 26 28 29 30 32 34 35 37 40 43 45 47 48 52 53 55 57 58 59 62 64 68 70 71 78 80 83 84 85 86 87 89 91 92 95 96 98 99 101 105 108 110 111 114 115 116 117 120 124 126 130 131 132 135 140 141 142 143 146 148 151 153 154 162 165 166 168 170 171 172 178 179 184 189 190 1...

output:

2969751

result:

ok 1 number(s): "2969751"

Test #13:

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

input:

9949
4991
3 9 10 11 17 20 23 24 26 27 29 30 31 35 36 37 39 40 43 45 46 47 50 51 52 54 60 64 66 67 69 70 73 74 77 78 82 85 86 88 89 90 91 92 93 95 97 99 103 105 109 110 112 113 114 117 120 121 122 123 124 129 134 135 136 139 144 145 146 148 151 153 154 155 156 157 158 161 162 163 168 169 171 173 174 ...

output:

12373400

result:

ok 1 number(s): "12373400"

Test #14:

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

input:

9829
4924
0 6 7 10 11 12 13 16 18 19 20 22 23 25 33 36 37 38 39 40 42 43 44 46 49 50 52 53 56 57 58 62 63 69 71 72 73 76 78 79 82 83 85 86 90 95 96 97 101 105 106 109 110 111 112 113 114 115 117 119 121 122 123 124 128 133 135 136 137 140 141 143 144 145 146 149 150 156 157 158 159 160 161 162 163 1...

output:

11782201

result:

ok 1 number(s): "11782201"

Test #15:

score: 0
Accepted
time: 15ms
memory: 17372kb

input:

49843
24989
0 1 2 3 5 9 11 14 15 16 17 18 25 27 30 31 32 33 34 38 39 40 44 45 46 48 49 52 54 57 58 59 66 68 69 70 71 72 75 76 78 79 80 83 84 87 88 91 92 93 96 97 100 102 105 107 109 110 112 113 118 119 123 124 126 127 129 130 131 133 136 142 149 150 152 153 155 156 157 158 159 160 162 164 165 166 16...

output:

312532889

result:

ok 1 number(s): "312532889"

Test #16:

score: 0
Accepted
time: 17ms
memory: 17356kb

input:

49999
25170
2 4 5 10 13 14 15 17 21 22 27 28 29 33 34 35 37 39 40 43 45 49 51 54 55 56 59 60 63 64 67 70 72 74 78 80 82 84 85 88 90 91 95 97 98 99 101 105 106 109 110 111 113 118 121 123 124 126 127 128 129 130 131 133 139 140 144 145 146 148 149 150 153 154 155 158 159 160 161 164 167 170 172 175 1...

output:

316155125

result:

ok 1 number(s): "316155125"

Test #17:

score: 0
Accepted
time: 27ms
memory: 16940kb

input:

99923
50029
0 1 3 4 5 7 8 9 10 11 13 14 15 17 19 20 21 22 23 27 31 32 34 36 37 39 40 41 42 44 46 47 48 49 50 52 55 59 60 62 63 64 67 68 70 74 76 79 82 83 87 89 90 93 94 95 96 103 104 107 108 109 113 114 115 116 118 122 125 126 132 133 134 136 137 141 144 145 148 149 150 151 153 156 159 160 163 168 1...

output:

1256128754

result:

ok 1 number(s): "1256128754"

Test #18:

score: 0
Accepted
time: 34ms
memory: 21092kb

input:

99971
49842
2 5 7 8 11 12 13 14 15 16 17 21 22 24 26 27 31 34 35 37 39 49 50 55 57 58 63 65 66 68 69 71 76 78 79 80 81 82 83 86 87 88 92 93 94 96 99 100 101 102 104 108 109 110 113 115 116 117 118 121 123 133 134 136 138 141 143 145 146 148 149 151 154 156 157 160 162 164 165 166 167 172 173 175 176...

output:

1241597127

result:

ok 1 number(s): "1241597127"

Test #19:

score: 0
Accepted
time: 71ms
memory: 24508kb

input:

199811
99732
1 2 3 4 5 6 8 9 11 13 14 17 20 21 22 23 26 27 28 34 35 37 39 40 41 43 46 47 50 54 56 58 60 61 63 65 68 69 73 74 78 80 82 83 84 86 91 92 93 94 95 96 97 98 101 102 104 105 108 112 118 121 122 124 128 134 142 144 147 148 152 153 154 156 157 160 163 164 165 168 169 170 173 175 176 177 180 1...

output:

4979468658

result:

ok 1 number(s): "4979468658"

Test #20:

score: 0
Accepted
time: 75ms
memory: 23048kb

input:

199933
99787
2 3 4 5 6 7 8 9 10 11 13 15 17 19 23 26 28 31 33 35 36 39 40 41 42 48 50 51 52 53 54 55 58 60 62 64 75 76 78 81 82 83 84 85 86 87 90 92 97 98 101 104 106 110 111 112 113 114 115 116 119 123 124 128 129 133 137 140 147 148 150 151 152 154 157 159 161 162 163 164 165 166 167 170 171 175 1...

output:

4981605402

result:

ok 1 number(s): "4981605402"

Test #21:

score: 0
Accepted
time: 77ms
memory: 29688kb

input:

249989
124901
2 9 13 14 15 16 18 20 21 23 26 27 28 30 32 33 34 38 40 46 47 48 50 52 55 56 57 58 59 60 61 62 63 64 66 68 69 70 71 72 76 77 78 80 81 82 83 85 86 87 88 90 91 93 95 96 97 103 108 109 111 113 115 116 118 126 127 130 132 133 135 136 138 139 142 143 145 146 148 150 152 153 154 156 157 159 1...

output:

7791216814

result:

ok 1 number(s): "7791216814"

Test #22:

score: 0
Accepted
time: 76ms
memory: 25584kb

input:

249881
124875
0 4 5 6 8 10 15 16 18 20 21 24 25 26 29 34 38 41 45 48 50 51 53 55 60 63 67 69 71 72 74 76 77 81 82 84 88 89 90 91 92 94 98 99 100 101 102 103 104 105 106 107 112 114 116 117 119 121 123 124 125 128 129 130 134 137 138 139 140 141 142 146 147 148 149 150 152 153 154 157 158 159 160 161...

output:

7829721519

result:

ok 1 number(s): "7829721519"

Test #23:

score: 0
Accepted
time: 170ms
memory: 32092kb

input:

299933
150004
0 2 3 4 5 6 9 10 11 12 14 17 19 21 22 23 24 28 29 33 37 39 40 42 43 45 46 47 50 53 54 57 60 62 63 65 66 69 71 72 73 77 78 80 81 83 85 87 88 89 90 93 95 98 100 102 103 104 106 107 111 113 117 118 119 120 122 123 124 125 127 128 129 135 136 137 140 144 145 148 155 156 157 159 162 163 166...

output:

11224161800

result:

ok 1 number(s): "11224161800"

Test #24:

score: 0
Accepted
time: 164ms
memory: 38216kb

input:

299909
149818
0 3 4 6 8 16 17 19 20 21 22 24 26 28 29 31 32 34 35 36 38 44 46 50 51 52 53 54 55 58 60 61 62 63 64 66 68 70 72 73 76 77 78 79 80 85 87 88 90 91 92 93 94 95 97 102 103 104 105 107 108 109 114 115 117 118 120 124 125 126 130 131 136 137 142 146 147 149 150 154 159 163 167 170 171 175 17...

output:

11226909297

result:

ok 1 number(s): "11226909297"

Test #25:

score: 0
Accepted
time: 167ms
memory: 36956kb

input:

399953
199665
1 2 4 6 12 16 17 18 24 29 34 35 36 37 39 40 41 45 49 50 53 54 55 56 57 60 61 64 65 66 67 70 71 72 74 75 77 79 81 82 83 84 86 87 89 90 92 93 94 96 99 100 104 105 106 107 109 110 111 114 120 122 125 126 127 129 140 141 144 148 149 151 152 153 154 156 157 159 160 161 162 163 165 171 175 1...

output:

19919663720

result:

ok 1 number(s): "19919663720"

Test #26:

score: 0
Accepted
time: 177ms
memory: 38996kb

input:

399941
199546
2 3 4 8 10 11 12 13 15 16 19 21 23 24 25 26 27 31 33 35 38 39 42 44 45 47 48 51 55 57 58 62 65 68 69 72 73 75 76 77 78 79 80 81 82 83 84 87 88 90 91 94 99 100 102 103 105 109 111 115 116 117 119 120 127 130 132 134 136 138 139 140 141 142 144 145 146 148 149 151 152 156 157 161 162 164...

output:

19959584457

result:

ok 1 number(s): "19959584457"

Test #27:

score: 0
Accepted
time: 189ms
memory: 39780kb

input:

499927
250055
0 1 6 7 8 14 15 17 19 21 25 26 28 29 30 31 32 34 35 36 37 38 40 41 42 44 45 46 47 49 51 55 57 58 59 63 69 71 73 74 75 77 79 81 82 84 89 90 92 93 94 95 97 98 102 104 105 111 113 114 117 122 125 126 127 128 129 130 134 135 136 139 141 142 144 147 148 149 150 151 152 153 154 161 162 164 1...

output:

31119189420

result:

ok 1 number(s): "31119189420"

Test #28:

score: 0
Accepted
time: 186ms
memory: 37724kb

input:

499879
250040
0 3 4 6 10 11 12 14 15 16 20 24 25 26 27 28 30 33 38 39 40 41 42 44 45 46 52 54 55 56 57 58 59 63 64 66 67 69 72 74 76 79 80 84 87 90 91 92 93 94 97 100 103 104 105 106 108 111 112 116 117 119 120 121 122 124 130 132 133 135 136 138 139 142 143 147 152 153 156 157 160 163 165 166 168 1...

output:

31239374178

result:

ok 1 number(s): "31239374178"

Test #29:

score: 0
Accepted
time: 393ms
memory: 55132kb

input:

599941
300090
0 2 6 7 8 10 13 15 17 20 21 23 24 25 27 29 31 33 38 40 41 42 47 50 51 53 54 57 61 64 70 71 72 74 75 77 81 83 84 87 88 89 94 104 105 106 109 111 112 113 116 117 118 119 121 123 124 125 127 128 133 134 136 137 138 141 144 145 149 151 153 159 160 161 162 165 167 172 173 174 177 180 181 18...

output:

45044252072

result:

ok 1 number(s): "45044252072"

Test #30:

score: 0
Accepted
time: 378ms
memory: 56984kb

input:

599927
300054
1 2 4 6 9 10 15 16 17 19 22 24 25 26 30 33 34 35 37 38 39 43 46 47 48 50 51 52 55 58 59 61 65 66 67 68 70 71 77 79 80 81 82 83 84 87 88 91 92 93 94 95 96 97 98 99 103 106 108 109 111 116 117 121 125 126 127 130 131 132 139 140 142 143 146 147 148 149 150 151 153 157 159 160 161 162 164...

output:

44898160525

result:

ok 1 number(s): "44898160525"

Test #31:

score: 0
Accepted
time: 413ms
memory: 57700kb

input:

699817
349799
0 1 2 8 10 21 28 29 31 34 35 36 37 38 39 42 43 44 46 49 50 52 54 55 56 57 59 60 61 62 63 66 68 69 71 73 77 81 82 84 85 86 89 91 97 99 101 103 105 106 108 111 114 116 118 119 120 122 123 125 126 127 128 131 132 136 137 138 141 144 146 148 155 156 157 158 159 160 162 163 165 166 172 176 ...

output:

61262880627

result:

ok 1 number(s): "61262880627"

Test #32:

score: 0
Accepted
time: 434ms
memory: 56300kb

input:

699943
349170
0 2 3 9 11 12 13 14 15 16 20 22 24 25 27 29 30 33 34 35 39 40 43 45 46 48 49 53 55 56 61 62 64 65 66 68 72 73 76 83 85 86 87 88 92 94 95 96 98 99 100 101 106 107 108 111 113 119 122 124 125 126 129 132 133 135 139 142 145 147 149 151 154 156 158 159 160 162 166 167 170 172 173 175 176 ...

output:

60956744195

result:

ok 1 number(s): "60956744195"

Test #33:

score: 0
Accepted
time: 417ms
memory: 58964kb

input:

799853
400390
0 2 4 5 7 9 17 23 24 25 26 27 30 32 33 34 37 39 41 42 43 44 45 47 49 51 52 54 55 56 58 64 65 66 67 68 70 71 75 76 77 78 82 83 87 88 89 90 92 93 94 97 98 99 101 103 108 110 112 114 115 116 117 120 122 124 128 129 132 133 136 137 139 140 141 142 143 145 146 148 150 151 152 153 155 156 15...

output:

80246155990

result:

ok 1 number(s): "80246155990"

Test #34:

score: 0
Accepted
time: 411ms
memory: 58484kb

input:

799859
399965
0 1 2 3 8 9 16 18 21 23 25 27 35 36 37 41 45 48 51 55 57 59 60 62 65 66 67 68 74 75 76 83 87 88 91 93 100 101 105 106 108 109 110 111 115 118 119 120 123 124 125 127 129 132 134 136 137 138 142 143 146 150 152 153 154 156 157 158 159 161 162 163 166 168 171 172 173 175 176 187 189 190 ...

output:

80008919954

result:

ok 1 number(s): "80008919954"

Test #35:

score: 0
Accepted
time: 406ms
memory: 58540kb

input:

899971
449631
0 1 2 3 7 8 9 10 15 20 23 24 28 30 36 47 49 51 53 54 56 59 60 61 62 63 67 69 72 73 75 78 81 83 84 85 89 91 94 95 96 97 100 102 103 104 106 107 111 112 113 115 119 121 125 126 133 135 138 143 144 147 148 149 150 151 153 157 158 159 160 161 163 165 169 170 171 173 179 180 181 186 188 189...

output:

100941924788

result:

ok 1 number(s): "100941924788"

Test #36:

score: 0
Accepted
time: 421ms
memory: 59632kb

input:

899981
449080
0 1 2 3 4 5 8 9 11 15 16 17 18 20 21 22 25 26 28 31 34 35 38 40 42 43 46 47 48 51 53 57 59 70 71 72 74 76 78 79 80 81 82 87 88 90 94 97 98 101 102 103 104 106 107 111 112 113 115 116 117 119 120 121 123 124 126 127 128 130 133 135 137 138 139 141 143 144 148 149 151 155 156 157 159 160...

output:

100679139285

result:

ok 1 number(s): "100679139285"

Test #37:

score: 0
Accepted
time: 432ms
memory: 60308kb

input:

999979
500306
2 4 5 7 8 12 13 14 16 20 21 24 26 32 33 34 37 38 40 45 46 51 53 54 55 57 58 59 62 67 69 70 71 73 74 77 78 79 80 83 84 85 87 88 89 91 92 93 95 98 99 100 101 106 108 109 114 119 120 121 129 131 134 136 139 140 142 148 149 150 151 152 153 154 155 157 164 166 168 169 171 172 173 180 182 18...

output:

125164981393

result:

ok 1 number(s): "125164981393"

Test #38:

score: 0
Accepted
time: 422ms
memory: 60056kb

input:

999953
498644
1 2 6 7 8 10 11 14 15 16 17 20 21 22 23 25 26 27 28 33 34 35 38 40 41 44 45 46 47 49 51 53 56 58 63 64 65 66 67 70 71 72 74 75 76 77 79 80 81 82 83 84 85 86 89 92 93 94 96 98 100 102 103 105 106 111 112 113 114 115 116 118 121 122 124 127 130 132 134 137 138 139 140 143 144 145 146 147...

output:

124087123229

result:

ok 1 number(s): "124087123229"

Test #39:

score: 0
Accepted
time: 457ms
memory: 61240kb

input:

999983
999983
0 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...

output:

999964000324

result:

ok 1 number(s): "999964000324"