QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#106730 | #1173. Knowledge Is... | gs22059test | AC ✓ | 294ms | 14108kb | C++14 | 662b | 2023-05-18 22:47:21 | 2023-05-18 22:47:25 |
Judging History
answer
#include <bits/stdc++.h>
#define v vector
#define f2(i,n) for(i=0;i<n;i++)
using namespace std;struct s{int l,r,x;};v<s>a;int n,m;v<int>w;bool c(s a,s b){return a.l<b.l;}struct d{bool operator()(s a,s b){return a.r>b.r;}};priority_queue<s,v<s>,d>f,t;int main(){cin>>n>>m;int h=0;a.resize(n);w.resize(n);int i;f2(i,n){cin>>a[i].l>>a[i].r;a[i].x=i;}sort(a.begin(),a.end(),c);f2(i,n){if(!f.empty()&&f.top().r<a[i].l){w[f.top().x]=w[a[i].x]=++h;f.pop();t.push(a[i]);}else if(!t.empty()&&t.top().r<a[i].r){w[a[i].x]=w[t.top().x];w[t.top().x]=0;f.push(t.top());t.pop();t.push(a[i]);}else f.push(a[i]);}f2(i,n)if(w[i]==0)w[i]=++h;f2(i,n)cout<<(w[i]<=m?w[i]:0)<<" ";}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3328kb
input:
7 5 9 10 7 9 3 4 9 10 2 6 8 9 5 8
output:
3 4 1 2 2 1 3
result:
ok answer = 7
Test #2:
score: 0
Accepted
time: 1ms
memory: 3384kb
input:
2 2 1 2 3 4
output:
1 1
result:
ok answer = 2
Test #3:
score: 0
Accepted
time: 0ms
memory: 3328kb
input:
2 1 1 2 2 3
output:
1 0
result:
ok answer = 1
Test #4:
score: 0
Accepted
time: 4ms
memory: 3504kb
input:
1 1 4 26
output:
1
result:
ok answer = 1
Test #5:
score: 0
Accepted
time: 2ms
memory: 3284kb
input:
500 258 1 3 3 5 2 4 3 5 4 5 4 5 1 4 1 2 3 5 2 5 2 5 4 5 4 5 4 5 2 3 1 4 1 4 1 4 4 5 4 5 2 3 4 5 3 5 3 5 1 5 1 4 2 5 1 5 3 5 3 4 4 5 2 3 3 5 3 5 4 5 2 3 1 5 1 5 2 3 2 3 3 4 3 5 3 4 1 3 1 2 1 5 4 5 2 3 2 4 1 3 4 5 4 5 4 5 1 3 3 5 4 5 3 5 1 5 1 2 1 2 3 5 3 5 4 5 3 4 3 5 2 3 2 5 2 4 2 5 3 5 2 3 1 5 4 5 ...
output:
104 12 119 26 68 67 120 13 38 121 122 54 61 60 41 123 124 125 56 89 44 87 28 3 126 127 128 129 29 130 74 117 35 32 49 62 131 132 60 61 133 1 134 83 21 135 52 58 136 76 40 39 137 68 34 138 19 139 14 35 18 8 140 141 15 113 142 143 144 23 50 145 146 147 148 43 149 150 151 152 153 154 37 34 9 155 20 156...
result:
ok answer = 376
Test #6:
score: 0
Accepted
time: 1ms
memory: 3476kb
input:
500 242 8 9 9 10 2 9 8 10 9 10 6 10 4 8 4 5 2 6 7 10 3 8 1 8 1 6 5 9 7 8 8 10 8 9 8 10 2 9 2 3 6 8 3 10 5 9 1 3 6 8 4 10 9 10 8 9 8 10 1 9 3 9 3 7 2 3 6 10 3 6 6 10 3 4 3 6 9 10 5 7 8 10 6 10 5 6 5 7 7 8 1 3 4 7 9 10 4 9 2 4 8 9 1 3 8 10 3 4 9 10 4 9 5 10 8 9 1 3 1 5 8 10 3 4 8 9 3 9 3 6 3 10 6 7 7 ...
output:
146 170 230 132 172 48 194 64 82 96 215 214 87 26 207 136 141 74 231 13 232 233 41 9 222 16 207 125 135 234 235 133 10 65 109 59 38 97 210 143 117 66 74 132 178 15 149 214 19 31 86 14 134 34 203 8 23 236 18 65 58 33 166 237 93 1 155 184 238 222 70 107 10 72 161 226 213 210 136 239 212 202 229 192 17...
result:
ok answer = 471
Test #7:
score: 0
Accepted
time: 1ms
memory: 3336kb
input:
500 250 50 84 36 68 94 98 13 88 4 62 45 74 80 89 56 87 65 89 44 52 69 78 29 76 61 90 91 99 16 98 69 92 50 77 86 95 73 79 83 90 78 89 1 79 81 86 14 37 91 94 27 48 11 73 94 97 49 80 15 60 26 39 34 76 69 77 22 72 6 78 92 96 46 83 83 94 62 95 77 80 32 72 46 90 41 88 47 91 68 75 14 36 26 43 14 87 49 74 2...
output:
65 152 63 222 122 178 194 95 130 82 144 180 109 133 2 145 249 149 162 139 186 193 195 35 227 63 173 236 64 109 41 181 248 170 189 98 39 200 115 181 171 50 38 56 238 33 53 218 233 40 61 193 126 151 93 83 234 116 245 190 38 161 134 5 164 67 216 141 221 16 168 55 234 236 27 159 11 159 189 89 151 30 199...
result:
ok answer = 500
Test #8:
score: 0
Accepted
time: 2ms
memory: 3468kb
input:
500 250 614 964 380 709 272 969 626 788 156 927 270 842 448 984 184 224 602 953 249 887 665 904 212 300 715 787 557 948 906 977 117 824 504 567 848 884 817 824 462 930 768 816 890 940 193 784 653 897 973 974 21 64 515 700 361 595 670 1000 854 943 530 739 816 828 918 979 270 354 288 369 56 697 622 92...
output:
132 219 24 246 4 19 67 16 54 8 81 36 244 110 225 206 117 52 202 74 189 221 196 149 244 1 212 127 155 91 225 50 228 40 43 160 135 69 17 123 21 239 57 184 169 84 210 204 247 76 27 121 125 83 172 156 194 46 37 135 119 158 4 104 29 192 94 15 159 134 133 11 80 113 111 51 217 37 47 52 107 109 179 24 150 1...
result:
ok answer = 500
Test #9:
score: 0
Accepted
time: 2ms
memory: 3272kb
input:
500 250 7369 7544 7194 8983 8758 9759 1077 5486 8604 9375 9468 9854 9259 9276 6147 7585 2527 2818 1034 2634 1382 3694 1863 8040 5952 6207 685 3506 3618 9242 1204 3382 569 8063 6515 6861 6025 7856 2053 7457 961 3813 87 9321 2787 9389 4754 8473 6781 7817 7113 9489 6831 9207 5210 9788 7003 8417 9361 99...
output:
217 158 54 79 141 232 137 218 13 9 30 185 112 26 27 23 186 159 239 168 32 228 11 59 234 154 82 72 150 101 142 47 162 52 161 44 38 99 1 203 40 225 82 130 113 182 95 25 227 213 121 69 229 74 123 17 200 23 54 7 166 96 201 64 131 183 45 217 8 193 207 150 48 169 22 56 39 16 75 107 173 223 67 118 134 125 ...
result:
ok answer = 500
Test #10:
score: 0
Accepted
time: 1ms
memory: 3532kb
input:
500 250 94664 97792 42412 79567 78199 93246 1309 6050 21787 62661 32852 47312 72165 96025 22335 87724 98737 98949 32333 45109 98197 98696 66004 84303 64971 93765 48220 78217 75132 77121 3250 99214 76296 83179 18937 19783 24224 29268 76617 77302 64571 88215 56891 67172 32945 97861 75 35393 74113 9254...
output:
239 46 190 4 122 66 157 13 185 54 246 132 130 250 244 1 181 12 25 247 118 146 27 34 127 121 85 206 240 82 10 228 58 206 67 62 132 141 166 17 137 98 152 53 243 26 111 33 231 4 102 214 192 55 14 21 213 91 176 108 65 212 232 103 90 43 215 250 97 99 170 100 194 234 109 236 69 221 70 223 44 196 22 169 18...
result:
ok answer = 500
Test #11:
score: 0
Accepted
time: 3ms
memory: 3528kb
input:
500 250 249258 633953 692064 923461 236526 494453 63236 665418 813697 915066 231324 853677 850867 946695 354813 439441 555846 920488 978644 998640 280905 357712 300337 869138 111591 375301 754196 825433 681966 906746 566646 913535 958025 996696 122927 989918 162477 948024 464228 474279 735561 874801...
output:
130 150 81 139 187 205 141 63 86 88 38 24 42 124 143 98 242 4 8 75 167 52 59 177 198 213 173 194 248 88 44 146 109 156 93 13 30 56 172 108 238 82 172 206 109 188 87 213 112 215 106 182 106 65 122 206 238 135 131 55 175 57 180 80 46 53 151 84 229 166 113 111 95 118 174 136 133 27 177 10 77 83 158 16 ...
result:
ok answer = 500
Test #12:
score: 0
Accepted
time: 0ms
memory: 3524kb
input:
500 250 6592945 8873042 9610368 9920200 3224618 6472104 7312354 9075859 366928 6614625 7107690 8990826 4712035 4850963 8634845 9127832 7054047 9358572 9187658 9589004 6621468 7586829 7375455 9328669 2076424 5016969 8848028 9107864 6625184 7368290 801465 9195989 3228163 3972918 3386844 9342995 366556...
output:
118 238 123 73 130 93 51 108 140 221 220 90 56 151 198 223 35 13 129 33 102 52 174 172 18 242 160 20 17 152 184 43 199 125 209 157 175 128 211 131 138 246 229 30 247 174 83 220 143 222 163 156 127 136 134 77 107 57 212 49 48 6 156 51 98 18 249 173 183 77 153 96 228 110 2 169 29 146 201 61 86 168 115...
result:
ok answer = 500
Test #13:
score: 0
Accepted
time: 0ms
memory: 3272kb
input:
500 250 80571694 85803063 51768736 93848632 66413497 76615996 83050382 99992350 8073944 91324998 18047715 58689728 8708611 51201572 29489394 73271018 24239602 65348190 64220050 71579063 50414980 65877100 86190696 92867069 34515283 94334986 8551872 68258618 18296336 36436754 94799273 95174013 8666001...
output:
186 86 241 192 221 119 85 206 138 193 152 200 27 147 35 153 203 101 48 61 77 82 116 69 120 243 67 57 248 171 91 155 195 219 6 59 191 233 145 13 60 50 68 239 81 168 170 68 228 88 183 8 102 112 113 111 12 156 144 124 193 21 38 203 104 150 2 108 39 121 229 90 41 246 196 232 149 88 29 172 179 8 85 40 24...
result:
ok answer = 500
Test #14:
score: 0
Accepted
time: 2ms
memory: 3340kb
input:
500 250 966174904 986708402 946554500 952001265 914838165 993300555 89795526 975540133 235762788 364735276 340662053 547524158 330027012 366955963 633114013 756706517 868314624 992777729 843328851 965147665 943958099 956095329 243336632 710281553 576757478 948905845 778782824 978759308 370097409 470...
output:
26 120 39 245 38 96 39 220 59 21 234 155 104 177 69 248 232 46 176 221 212 69 4 61 64 141 13 99 204 88 48 153 129 51 18 249 72 246 73 52 190 13 136 86 78 149 98 106 146 169 185 129 245 42 200 173 113 105 137 122 107 240 236 232 165 170 218 5 223 62 187 162 123 1 216 75 97 240 119 92 125 37 126 237 1...
result:
ok answer = 500
Test #15:
score: 0
Accepted
time: 2ms
memory: 3348kb
input:
500 67 1 2 1 2 2 3 1 2 2 3 1 3 1 3 2 3 2 3 1 2 1 3 2 3 1 2 1 2 2 3 2 3 2 3 1 3 2 3 1 2 1 3 2 3 2 3 2 3 2 3 1 2 2 3 2 3 1 3 2 3 1 3 2 3 1 2 1 2 1 2 2 3 1 2 2 3 2 3 2 3 1 2 2 3 1 3 2 3 1 2 1 2 2 3 1 2 1 3 1 2 2 3 2 3 1 3 1 3 1 2 1 2 1 2 1 2 2 3 2 3 1 2 2 3 1 2 1 3 1 3 2 3 1 3 1 3 2 3 1 3 1 3 2 3 1 3 1...
output:
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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok answer = 67
Test #16:
score: 0
Accepted
time: 1ms
memory: 3320kb
input:
500 379 2 5 2 4 4 5 4 5 4 5 1 4 2 5 4 5 4 5 4 5 1 5 4 5 3 5 3 5 3 5 1 3 1 5 3 5 1 2 4 5 4 5 4 5 3 4 4 5 4 5 4 5 3 5 3 5 1 3 2 4 1 2 4 5 2 3 1 5 2 5 2 5 1 3 1 4 4 5 1 2 3 5 4 5 1 3 1 5 1 5 3 5 4 5 3 4 4 5 4 5 3 5 3 4 2 4 4 5 1 4 1 3 1 4 4 5 1 4 4 5 1 4 4 5 4 5 4 5 2 3 1 2 3 4 1 3 3 4 2 5 1 3 3 4 1 5 ...
output:
105 106 69 68 63 107 108 60 58 57 109 56 6 7 9 69 110 10 13 84 79 77 111 76 75 74 112 113 59 114 12 47 33 115 116 117 50 118 51 16 25 36 81 119 120 18 42 121 45 44 11 122 123 124 125 76 126 127 128 129 130 131 132 133 46 9 134 44 135 136 36 137 138 49 139 140 141 142 52 143 51 26 144 145 53 146 147 ...
result:
ok answer = 483
Test #17:
score: 0
Accepted
time: 2ms
memory: 3532kb
input:
500 273 1 9 7 10 1 2 2 9 5 6 9 10 8 10 5 6 2 3 3 10 4 8 4 7 9 10 8 9 1 9 1 4 3 5 9 10 9 10 1 6 2 10 7 9 8 9 9 10 5 8 7 10 4 8 5 6 8 9 1 2 1 5 6 8 7 10 9 10 3 7 7 9 3 8 1 9 2 9 3 6 5 10 4 5 5 9 3 9 5 8 1 8 5 8 7 10 7 8 9 10 1 8 7 9 5 9 7 9 7 10 9 10 1 8 2 4 7 8 1 8 3 6 4 7 6 8 7 10 2 7 9 10 2 3 6 8 1...
output:
222 75 4 223 95 192 116 89 25 2 220 158 191 117 224 32 62 190 189 73 225 76 122 188 226 77 227 90 118 7 48 179 79 187 113 81 177 228 229 101 36 61 230 231 180 167 211 83 182 186 219 74 232 88 89 185 183 34 181 233 103 156 178 91 118 184 17 193 9 99 40 4 62 183 44 75 71 128 143 129 42 92 59 56 151 27...
result:
ok answer = 494
Test #18:
score: 0
Accepted
time: 2ms
memory: 3348kb
input:
500 250 47 82 75 84 56 61 27 57 32 48 28 85 15 38 36 39 56 65 88 94 87 97 64 79 15 51 50 93 83 100 74 77 59 74 66 99 57 78 51 90 47 76 64 68 89 97 15 71 38 54 57 83 26 91 90 94 98 100 70 73 40 75 52 82 67 100 14 85 57 62 47 53 40 63 79 97 3 33 16 61 4 94 94 99 68 80 23 30 41 81 54 81 51 52 36 45 54 ...
output:
50 171 120 102 59 19 34 38 140 225 126 123 75 63 209 243 234 137 71 70 185 207 132 169 87 80 16 135 158 233 180 62 142 217 124 84 135 195 28 121 241 237 147 22 43 81 77 52 85 178 245 41 48 86 174 201 233 31 207 91 143 223 146 108 227 82 65 239 193 67 206 94 178 230 181 84 27 87 188 137 61 203 108 20...
result:
ok answer = 500
Test #19:
score: 0
Accepted
time: 2ms
memory: 3324kb
input:
500 250 151 592 747 974 832 938 56 960 567 882 851 900 338 901 168 265 916 964 581 880 177 284 456 921 298 540 378 651 190 785 908 992 180 371 271 823 245 983 328 603 211 425 561 996 61 134 820 934 934 975 595 945 896 982 245 443 208 487 567 945 999 1000 483 748 882 887 383 459 607 910 57 797 12 771...
output:
121 177 206 241 108 212 37 28 172 115 32 65 99 143 192 230 44 20 21 125 52 106 4 203 82 121 226 60 83 78 250 228 221 66 125 197 187 27 72 222 84 130 59 37 25 79 137 70 7 132 156 81 19 114 140 6 184 116 207 48 98 126 120 245 76 129 62 208 248 170 173 214 218 170 65 239 69 194 15 12 237 41 100 15 38 1...
result:
ok answer = 500
Test #20:
score: 0
Accepted
time: 3ms
memory: 3520kb
input:
500 250 8878 9054 7943 8545 9886 9945 6698 8053 3466 6453 8106 8870 7114 9642 4807 4824 2334 4079 2778 3817 5111 7104 1252 4542 3555 6851 3663 5645 5567 7655 324 2086 4056 8603 1406 7470 9064 9448 1484 5836 7466 7945 2607 3711 5253 6112 3192 4008 9549 9852 9198 9709 4169 8558 2268 7806 5575 6209 826...
output:
221 191 248 146 140 197 160 92 49 43 203 66 152 109 229 13 46 177 227 114 173 39 130 47 238 230 48 186 133 73 24 175 227 22 206 44 63 155 15 37 54 245 32 228 246 203 5 118 190 81 174 136 132 216 173 11 85 142 118 98 51 202 83 91 66 223 27 150 32 240 198 195 104 99 181 93 116 60 242 86 75 190 167 96 ...
result:
ok answer = 500
Test #21:
score: 0
Accepted
time: 2ms
memory: 3340kb
input:
500 251 46165 49590 70151 85269 27899 40324 62135 64549 79159 94410 75003 79189 50178 81874 56192 88209 21577 95025 84261 96039 18414 90970 81196 83290 83331 83488 14574 39965 4268 32434 88164 89600 12144 29112 870 72365 9975 51580 92179 98369 28511 57700 33237 75390 24902 28700 94544 95300 65682 97...
output:
76 148 51 159 187 171 77 90 11 204 10 35 73 50 30 220 20 161 85 234 105 237 19 240 135 212 194 143 140 153 99 43 58 241 197 168 142 139 171 194 247 149 9 4 89 72 111 72 154 165 235 61 57 89 154 105 40 197 207 14 22 54 107 204 24 23 206 164 208 216 67 81 92 159 15 176 245 101 79 248 42 157 99 199 8 1...
result:
ok answer = 500
Test #22:
score: 0
Accepted
time: 3ms
memory: 3472kb
input:
500 250 997100 999305 50160 723310 530874 700434 482814 725372 898138 942005 227563 606578 465297 983061 288595 865469 971584 983736 84196 662089 716660 851207 874207 995804 742642 760966 412491 418432 721831 897885 453604 941851 404413 589262 363242 694198 71736 189776 340057 706243 591745 899767 9...
output:
250 176 214 223 74 119 63 29 244 151 161 79 245 52 163 62 107 165 16 167 106 242 121 247 155 154 242 188 8 96 146 210 12 123 181 154 245 7 92 134 225 200 94 165 28 44 212 235 213 172 78 201 189 212 115 4 122 43 28 45 124 237 126 36 236 144 3 157 38 117 157 240 219 19 243 119 215 233 103 93 185 230 9...
result:
ok answer = 500
Test #23:
score: 0
Accepted
time: 2ms
memory: 3268kb
input:
500 250 816808 8979893 577273 5159166 6890110 9974354 7539249 9013575 7780990 9685125 284302 8308896 2859745 8347237 5896988 9556377 4465806 5463028 8279297 8819929 1361353 5720171 2467636 8115256 5879674 7044297 661648 5198202 4725290 5204346 2612798 8161805 9812485 9996590 2285372 4614496 1962475 ...
output:
224 84 152 80 181 202 20 105 97 82 107 244 199 85 86 249 245 65 9 183 28 145 58 164 231 117 32 112 8 170 191 14 9 227 120 190 82 2 30 31 156 196 143 167 134 48 126 99 178 63 115 172 180 248 176 55 123 86 25 250 219 180 36 200 60 146 185 222 88 13 91 35 51 144 16 226 217 236 124 69 220 55 21 160 155 ...
result:
ok answer = 500
Test #24:
score: 0
Accepted
time: 2ms
memory: 3336kb
input:
500 250 81661382 94717306 89850268 94839225 72615579 73753927 19190949 39608724 129611 33966748 36897319 96344937 77381982 94746565 49637131 94881993 71774738 87773217 5955861 68864001 55863683 69339123 25998069 29895468 85528105 96959461 12833512 31610705 4726009 31932075 18119656 87239085 31722731...
output:
61 126 225 59 44 52 74 85 179 167 188 34 215 38 39 220 38 101 192 56 95 10 211 204 236 22 171 185 58 73 43 97 68 219 213 145 224 98 1 65 81 118 17 143 22 168 119 146 122 71 115 206 212 15 72 99 97 174 161 116 231 205 16 229 87 137 7 82 60 180 144 125 18 140 238 78 15 28 235 26 217 49 168 206 39 141 ...
result:
ok answer = 500
Test #25:
score: 0
Accepted
time: 1ms
memory: 3300kb
input:
500 250 159147753 849387872 678679305 958626578 736410066 762171088 51820203 846735349 483826312 744440062 76859389 682174032 127183476 195547079 339099076 948562984 46616987 234754210 871306758 893541852 261351936 390635591 441516403 995769500 522385081 715755202 729932064 859205804 998688267 99968...
output:
213 138 231 212 224 155 9 29 11 217 38 53 185 168 249 158 135 176 164 49 99 242 35 55 184 116 194 172 79 243 215 106 72 26 234 157 207 106 137 241 122 222 119 176 43 186 18 192 130 123 104 145 22 186 206 112 7 2 114 91 208 223 73 245 26 138 51 197 32 237 155 160 189 78 30 109 56 21 213 70 52 1 117 1...
result:
ok answer = 500
Test #26:
score: 0
Accepted
time: 2ms
memory: 3344kb
input:
500 236 1 3 1 3 1 2 2 3 2 3 1 3 1 3 2 3 2 3 1 3 2 3 1 2 1 2 2 3 2 3 1 2 1 2 2 3 2 3 2 3 2 3 1 3 2 3 1 2 2 3 1 2 1 2 1 3 1 3 2 3 2 3 1 3 2 3 2 3 2 3 2 3 1 2 1 2 1 3 2 3 2 3 2 3 1 2 1 3 1 2 1 2 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 1 3 2 3 1 2 2 3 1 3 1 2 1 3 1 2 2 3 2 3 2 3 1 3 2 3 2 3 1 2 2 3 2 3 2 3 2 3 ...
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...
result:
ok answer = 236
Test #27:
score: 0
Accepted
time: 1ms
memory: 3328kb
input:
500 450 1 5 4 5 4 5 3 5 2 5 3 4 4 5 4 5 1 3 1 4 4 5 3 4 3 4 3 4 3 4 2 3 4 5 4 5 1 5 3 4 2 3 3 4 1 3 2 5 2 4 4 5 1 3 1 2 2 4 3 5 4 5 2 5 4 5 4 5 2 3 1 5 1 4 2 5 2 3 4 5 2 4 1 3 2 4 1 5 4 5 3 5 3 4 4 5 1 3 4 5 4 5 3 5 2 3 4 5 3 4 2 4 4 5 1 4 2 3 1 3 3 4 1 4 2 4 4 5 2 3 1 5 4 5 3 4 1 2 2 4 2 4 4 5 1 3 ...
output:
106 86 87 14 107 108 88 89 57 109 90 110 111 112 113 68 91 92 114 115 66 116 49 117 118 93 38 4 119 23 94 120 95 96 84 121 122 123 85 97 124 36 125 126 98 127 128 99 54 85 101 129 71 102 130 131 103 132 77 42 133 134 135 104 97 136 105 137 5 138 139 140 50 141 51 142 31 143 144 145 146 147 26 148 14...
result:
ok answer = 500
Test #28:
score: 0
Accepted
time: 0ms
memory: 3396kb
input:
500 321 6 10 3 6 4 6 5 10 5 7 5 10 3 7 3 8 3 8 4 8 7 8 6 8 3 5 5 9 8 9 4 7 4 9 3 9 9 10 1 8 3 9 5 10 8 9 6 8 4 9 8 10 9 10 2 4 1 10 4 5 5 8 1 7 7 8 7 9 8 9 6 9 4 8 8 9 5 9 1 9 9 10 7 8 1 10 5 9 7 10 7 8 5 6 4 7 9 10 5 8 4 8 3 4 7 9 5 9 2 8 5 9 2 3 3 10 9 10 9 10 6 8 9 10 7 10 1 5 5 10 3 9 2 5 4 6 5 ...
output:
51 73 89 32 132 29 119 195 204 173 168 186 63 205 129 137 14 206 194 187 207 18 106 181 208 112 181 28 209 64 201 147 191 95 41 46 210 211 212 213 191 214 215 216 81 196 79 144 201 217 200 32 75 218 219 220 15 221 153 193 171 178 99 48 26 222 42 98 84 190 136 101 199 151 223 8 80 161 138 167 224 110...
result:
ok answer = 500
Test #29:
score: 0
Accepted
time: 0ms
memory: 3348kb
input:
500 282 8 65 78 90 26 99 97 99 94 95 1 56 62 73 41 87 46 51 70 78 81 99 15 52 98 100 39 54 31 53 20 34 9 77 75 84 2 29 4 79 92 96 6 34 23 28 4 7 11 65 3 90 63 69 48 72 82 95 41 93 47 53 65 92 46 76 39 87 25 60 87 97 18 53 10 18 68 100 31 69 38 74 15 57 40 54 16 33 46 68 77 78 42 88 45 72 14 47 2 10 ...
output:
154 196 23 160 152 111 219 54 84 250 202 90 191 101 95 39 195 106 29 199 234 40 28 1 152 231 208 214 208 53 94 136 237 49 129 124 92 11 155 173 228 118 102 38 167 248 58 218 73 2 56 66 135 202 48 249 19 151 38 155 124 68 222 114 81 168 105 217 119 180 28 164 87 154 138 10 103 168 223 224 197 177 35 ...
result:
ok answer = 500
Test #30:
score: 0
Accepted
time: 3ms
memory: 3344kb
input:
500 300 510 553 741 866 603 700 36 128 503 944 356 533 43 466 917 960 375 678 38 84 603 748 900 954 951 972 25 548 965 980 204 928 541 594 362 453 904 939 4 547 322 583 870 911 359 470 397 896 772 953 95 483 527 853 631 748 886 955 178 468 127 202 249 912 869 887 154 386 688 948 847 853 783 908 881 ...
output:
160 171 203 6 80 95 66 145 151 1 236 159 26 104 242 13 162 62 224 103 119 46 70 49 62 74 55 232 220 67 13 22 212 49 152 205 184 218 207 245 117 114 174 50 164 52 73 149 194 130 204 79 25 41 121 129 214 182 148 68 82 98 14 64 113 95 94 201 77 121 206 170 141 27 43 219 58 44 112 8 83 213 5 223 158 242...
result:
ok answer = 500
Test #31:
score: 0
Accepted
time: 1ms
memory: 3280kb
input:
500 324 9666 9764 5 7711 5764 6747 2737 5398 4206 7020 351 4635 4073 5399 3611 9328 1945 8418 7455 9537 4107 8882 1584 6200 3868 4517 9853 9898 2506 4277 4014 7539 3274 7131 4991 9996 9163 9430 3958 6082 4305 9426 1905 6005 545 3515 7652 9689 1027 1438 1658 2555 3483 3669 3645 9546 3339 6780 368 978...
output:
129 180 189 89 161 65 90 30 202 159 47 122 57 54 51 218 165 58 39 116 51 111 32 168 6 13 36 35 149 246 123 169 123 127 55 184 94 188 133 144 27 69 83 72 135 169 41 221 147 61 234 20 114 238 78 119 101 138 118 102 203 110 171 203 139 153 122 217 132 199 6 248 187 207 190 71 12 248 125 23 212 161 223 ...
result:
ok answer = 500
Test #32:
score: 0
Accepted
time: 5ms
memory: 3404kb
input:
500 470 48935 84694 99749 99923 67360 75782 2621 28649 97920 99396 43999 62734 31792 93093 27130 95814 86217 97217 96404 98372 24819 99995 19043 61210 48522 67115 9948 85463 68373 86119 41827 44815 3885 70986 61638 63427 71822 81341 44961 51570 35696 82618 54669 54869 24868 37898 67579 83939 10309 5...
output:
84 250 233 27 247 142 32 23 64 131 20 136 183 215 154 70 177 163 128 93 41 106 49 162 92 55 195 91 110 77 66 75 19 154 214 23 204 180 232 211 199 48 2 35 209 188 1 250 109 123 236 11 52 176 191 166 116 218 30 201 149 140 237 69 76 60 77 103 36 159 90 244 40 193 75 159 132 127 230 27 201 48 214 249 1...
result:
ok answer = 500
Test #33:
score: 0
Accepted
time: 2ms
memory: 3336kb
input:
500 365 45762 693754 534202 559740 475894 692574 187566 781410 918494 925845 248194 930644 769148 995474 849975 944570 274210 388210 809281 978707 881685 943753 593867 809666 941967 942436 917009 921677 623403 694445 14648 44821 973042 987690 275841 883296 587146 857139 601250 981414 602336 913679 2...
output:
155 92 197 192 231 14 185 214 37 200 221 106 239 230 200 2 244 23 103 107 108 78 168 190 147 75 89 119 42 224 33 95 227 194 51 101 52 118 91 132 202 154 84 199 1 232 224 21 38 23 111 28 151 220 169 137 213 181 80 99 88 188 178 143 171 55 160 238 96 189 134 50 198 24 7 79 246 87 55 210 43 64 66 81 24...
result:
ok answer = 500
Test #34:
score: 0
Accepted
time: 0ms
memory: 3316kb
input:
500 435 8942882 9009137 2960339 4249642 6469497 9548984 1335505 1977271 8656424 8708138 8855830 9941526 120428 6845949 4297409 6050960 4211118 5999754 5292184 6371662 1257452 1532520 4172544 8586887 420009 9449705 9256685 9947310 6863833 8506653 5057204 7529960 4548338 8379192 3876868 8854349 331804...
output:
139 63 148 18 220 87 170 130 128 143 12 57 1 233 132 224 69 52 48 50 17 192 107 43 93 24 175 195 177 180 80 160 194 64 221 34 40 197 217 71 246 177 190 83 140 114 69 57 171 207 246 218 79 228 158 97 42 249 77 91 130 38 26 110 166 132 54 216 52 223 37 29 26 44 113 247 103 155 138 181 63 138 64 28 102...
result:
ok answer = 500
Test #35:
score: 0
Accepted
time: 2ms
memory: 3524kb
input:
500 331 9630011 57589654 22572747 68645689 38328399 81622066 94933642 97311408 58050148 62455346 37318915 88117879 68029610 74080275 87750454 92553676 46660595 74511474 32473872 49596859 63350036 89789394 75407776 80074289 80027461 88388093 61349773 99476335 69370190 83482845 70440345 73157341 67787...
output:
113 152 41 233 145 39 221 215 229 84 134 176 195 125 56 213 228 12 197 158 170 126 92 55 39 158 52 131 26 65 181 238 202 160 162 131 119 193 146 85 62 42 167 114 58 116 81 144 186 190 130 121 71 87 219 75 86 246 168 236 60 55 107 151 174 211 26 90 78 89 243 211 161 75 191 206 175 121 156 74 8 129 24...
result:
ok answer = 500
Test #36:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
500 477 343566419 927547482 827556406 860923139 786265094 867699424 768873550 983848460 587486802 980298997 991532621 996136199 878431940 941182908 689945290 738517801 517657626 628309437 983790110 985304593 272482247 338862765 740802646 818566102 938911500 949187177 185204729 426499829 724561978 76...
output:
37 16 193 186 82 183 225 208 131 245 38 91 236 56 232 199 94 53 203 204 158 42 234 100 19 143 52 220 111 65 129 68 203 224 242 162 180 217 101 176 8 132 99 134 229 68 239 45 26 231 212 107 132 115 189 220 28 138 196 145 93 140 58 205 160 72 95 243 104 173 246 25 249 31 143 62 161 116 6 176 205 173 1...
result:
ok answer = 500
Test #37:
score: 0
Accepted
time: 2ms
memory: 3384kb
input:
500 500 2 3 1 2 2 3 2 3 1 2 1 2 2 3 1 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 1 2 1 3 1 3 2 3 2 3 2 3 1 2 1 2 2 3 1 2 1 2 1 2 2 3 2 3 2 3 2 3 1 3 1 3 1 3 1 3 1 2 2 3 2 3 2 3 1 2 2 3 2 3 2 3 2 3 2 3 2 3 1 2 1 2 2 3 2 3 2 3 1 2 2 3 1 2 2 3 2 3 1 2 1 2 1 2 1 2 1 2 2 3 1 3 2 3 2 3 1 2 2 3 2 3 2 3 2 3 1 2 ...
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...
result:
ok answer = 500
Test #38:
score: 0
Accepted
time: 106ms
memory: 11340kb
input:
300000 167770 1 5 1 3 1 2 2 3 2 5 2 4 1 2 4 5 4 5 2 5 4 5 4 5 3 4 4 5 3 5 4 5 1 4 2 4 2 5 3 4 4 5 4 5 1 3 4 5 4 5 2 5 4 5 2 3 3 4 3 4 1 3 2 5 2 4 4 5 2 5 3 5 2 5 2 3 4 5 4 5 4 5 3 4 2 4 3 4 4 5 2 5 1 2 2 4 3 4 2 3 1 3 2 5 2 5 2 4 1 3 4 5 3 4 1 3 4 5 3 4 4 5 1 4 2 4 1 3 2 3 1 5 1 2 4 5 4 5 1 4 3 4 2 ...
output:
62462 28269 3963 48062 62463 62464 3962 33656 33658 62465 33660 33662 62466 33664 62467 33666 62468 62469 62470 62471 33667 33669 28286 33670 33671 62472 33673 59013 62473 62474 28241 62475 62476 33645 62477 62478 62479 48038 33635 33636 33638 62480 62481 62482 33640 62483 3958 62484 62485 59061 282...
result:
ok answer = 230231
Test #39:
score: 0
Accepted
time: 121ms
memory: 12188kb
input:
300000 158833 1 7 8 9 6 8 4 5 7 8 6 7 2 9 3 10 7 9 4 8 9 10 5 7 9 10 8 10 2 4 7 8 1 5 6 10 9 10 5 9 3 6 6 7 8 9 4 8 2 9 5 6 2 9 7 9 6 9 5 6 5 7 1 10 5 6 4 6 4 9 4 10 1 7 5 10 7 8 2 4 3 6 5 9 8 10 8 10 7 10 4 8 8 10 6 8 7 10 1 7 9 10 1 7 9 10 3 7 2 9 2 8 9 10 6 7 9 10 2 5 2 7 2 3 5 7 1 7 8 10 4 9 9 1...
output:
100414 76744 33479 35652 115134 85509 133729 133730 54404 130506 103464 95240 103463 76742 19100 108333 41888 33444 103455 23656 57394 85606 76741 127396 133731 53863 133732 54500 33564 53884 95220 133733 53883 60224 133734 5987 99659 23790 108334 18982 46026 23796 76740 76739 54398 126577 76738 332...
result:
ok answer = 292561
Test #40:
score: 0
Accepted
time: 162ms
memory: 11688kb
input:
300000 150009 55 66 55 72 76 99 74 95 20 64 60 85 52 62 54 100 62 73 30 62 60 96 99 100 66 76 10 23 4 20 59 76 67 76 54 95 2 93 18 56 98 100 59 64 63 100 16 29 95 97 40 83 84 93 41 84 37 92 34 51 53 100 98 99 80 88 18 34 68 76 20 74 54 55 16 78 38 55 86 89 8 47 18 81 66 75 60 69 22 66 44 89 19 71 4 ...
output:
84820 115618 39574 47036 79357 64849 72785 50376 121935 72820 64833 110315 134301 7844 5781 131270 134129 50205 140357 58532 146754 80236 73031 13547 82659 25500 124046 27228 21901 46935 48871 146805 115827 19072 134015 104444 55329 112557 56644 102637 38681 118926 129604 101478 85784 31825 97929 80...
result:
ok answer = 299930
Test #41:
score: 0
Accepted
time: 180ms
memory: 11596kb
input:
300000 150001 494 988 672 774 243 913 828 988 37 677 885 943 710 899 735 934 920 922 965 966 140 442 673 881 899 974 326 433 1 144 518 752 965 990 177 532 625 672 530 670 899 994 856 986 262 864 146 442 771 873 671 978 813 927 449 894 888 965 785 926 508 798 502 849 521 735 503 886 119 511 840 894 2...
output:
44424 140120 9560 121517 90686 34864 98071 103335 137565 144741 34829 89717 74325 33141 3299 131094 144695 53144 97649 96340 134104 94267 11181 34825 110747 89025 22822 35765 132270 36408 149787 46188 124005 46499 48283 123686 33844 144822 83904 88404 123708 59851 119760 25691 16394 78581 53186 3556...
result:
ok answer = 300000
Test #42:
score: 0
Accepted
time: 194ms
memory: 11592kb
input:
300000 150000 3973 6094 9736 9998 70 8639 5326 8325 3999 7450 3662 6854 4709 4858 9516 9896 9504 9728 1704 4105 4802 6265 5454 9534 9173 9814 1798 4071 2241 3267 6925 9683 2779 4274 2065 9713 6068 8558 1614 8165 1662 4784 7247 9243 8942 9067 8742 9131 4327 8619 4359 4989 6812 8809 5706 7074 2583 708...
output:
72866 145908 128070 53228 128595 92866 43057 142450 69804 29578 77811 56210 136918 29041 18054 94439 32400 6870 72134 119563 41550 101574 67034 129811 33272 45823 91828 113048 98154 32287 77064 74038 139258 31524 82522 81891 56809 120270 55062 120795 35543 78489 62643 72076 139802 14690 35733 37968 ...
result:
ok answer = 300000
Test #43:
score: 0
Accepted
time: 191ms
memory: 11696kb
input:
300000 150000 12903 16631 31740 87010 65263 66809 76325 96234 6447 96997 93658 98279 37116 45312 40450 92176 39259 44730 68790 89767 37526 84109 33305 42208 63474 88851 92816 93071 32193 50697 34927 62503 48938 97474 32975 63610 1315 17769 30877 52937 60916 91584 14355 34674 63709 64927 6280 33513 5...
output:
4449 16977 95694 109437 633 21678 36989 28818 35942 93255 24501 31715 79956 83117 47690 77187 43926 80356 5099 52559 72632 20547 86862 19104 55775 12581 147801 59390 148131 17074 82933 74338 19588 70613 59017 114741 200 43800 72264 106360 75811 18421 15654 22542 63416 86454 53299 59098 127038 148782...
result:
ok answer = 300000
Test #44:
score: 0
Accepted
time: 234ms
memory: 11560kb
input:
300000 150000 567775 666457 837755 984411 718168 903846 272041 566674 845286 892912 657558 706979 979998 984740 897850 920288 573988 604802 125953 702072 763586 844301 293648 334208 270686 660835 362992 482276 789500 805601 843735 845131 733248 894850 241109 377437 254656 819746 559713 638355 309262...
output:
95367 51965 100048 61261 124793 112842 146998 133822 71387 96493 109530 19086 86743 42510 32693 124513 103312 24744 10728 82337 86294 59628 34493 67070 82513 21398 79495 80635 145600 134367 31463 91002 149919 4476 90701 2689 85365 124448 15027 25585 29841 148322 29552 17981 104447 41356 122792 90398...
result:
ok answer = 300000
Test #45:
score: 0
Accepted
time: 236ms
memory: 11672kb
input:
300000 150000 7170989 7769844 956107 2663875 9166687 9506653 1888701 7639977 3302208 7630940 4857987 7312608 3733996 4738647 3006274 9521928 6370314 7064994 3306420 5033814 2310651 5271171 1032455 6819687 7079130 9908748 3293168 3641704 1367057 7494712 4640369 8126591 3301376 9160271 5655785 6679644...
output:
141201 11697 136860 109402 135430 122244 40566 15143 111433 46518 51671 91875 97680 22840 106414 38668 18469 95091 112221 82749 77799 136678 14448 18583 50569 13878 7769 46135 19471 142588 148807 140263 98858 142664 147752 48948 83568 59656 122274 115969 74055 7759 15541 38295 61346 87413 86028 8170...
result:
ok answer = 300000
Test #46:
score: 0
Accepted
time: 280ms
memory: 11584kb
input:
300000 150000 11552304 25238941 57725800 74297686 59777617 68784124 34279072 42026700 59218385 84180847 89474693 95274286 95736555 96601153 35992390 95512251 71239164 91666139 97076370 97098897 40156523 62645281 32000954 57819471 60179257 88102512 5595628 31475314 55261116 84822976 71013050 92071206...
output:
10596 126750 103437 31096 67484 133259 143472 22292 98633 19283 77160 63774 70171 16761 55402 98127 146993 23413 60403 106047 37710 23031 112474 43258 49459 62063 26495 112798 91271 98293 42541 90887 126970 109139 11665 119761 16355 7071 23787 103057 81799 103062 79509 115654 68453 91105 106171 1190...
result:
ok answer = 300000
Test #47:
score: 0
Accepted
time: 256ms
memory: 11548kb
input:
300000 150000 654384400 971241348 70913001 607674248 792436692 958757039 493420264 606937015 872887558 973264081 626376272 682239078 582160167 908877630 658835446 733627713 385361776 871189995 334846500 367802854 124802907 643036263 443283183 775149618 514358696 672677144 480809185 562611368 6290012...
output:
85538 72533 115124 72319 129708 102110 65540 123604 26184 23729 82633 140854 97759 60600 147609 31108 72595 114906 52703 55752 34570 46440 77561 129036 52945 79306 115580 44722 80921 61227 11820 117175 60021 143043 120544 145357 129353 135229 123597 140382 103538 9248 93983 46445 120431 4357 39345 1...
result:
ok answer = 300000
Test #48:
score: 0
Accepted
time: 100ms
memory: 14108kb
input:
300000 259601 2 3 1 2 2 3 1 3 1 3 1 3 2 3 2 3 1 2 1 2 2 3 2 3 1 2 1 3 1 2 1 2 2 3 1 2 2 3 2 3 1 2 2 3 2 3 1 3 1 2 2 3 2 3 2 3 1 2 1 3 2 3 2 3 1 2 1 2 2 3 2 3 2 3 1 3 2 3 1 2 2 3 1 2 1 3 2 3 2 3 2 3 1 2 2 3 2 3 2 3 2 3 1 2 1 2 2 3 1 2 2 3 1 2 2 3 2 3 2 3 2 3 1 2 2 3 1 3 2 3 2 3 2 3 2 3 1 2 2 3 1 2 1 ...
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...
result:
ok answer = 259601
Test #49:
score: 0
Accepted
time: 96ms
memory: 11420kb
input:
300000 233601 3 5 3 4 1 3 1 4 2 3 2 5 1 2 3 5 4 5 2 4 4 5 3 4 1 2 1 5 2 4 1 4 2 3 2 3 4 5 4 5 2 5 2 3 2 3 2 5 2 3 2 5 4 5 2 4 2 4 3 4 3 5 3 4 2 4 4 5 3 4 2 4 3 4 3 4 4 5 4 5 1 5 1 3 2 4 3 5 2 4 4 5 1 3 2 5 4 5 3 5 4 5 2 3 3 5 1 5 2 3 1 5 3 5 3 5 3 5 3 5 3 4 4 5 2 5 3 4 2 5 2 3 2 3 2 3 3 5 2 3 1 3 4 ...
output:
62454 62455 52802 62456 23286 62457 14543 62458 24584 62459 24586 62460 14395 62461 62462 62463 23318 23322 24593 24594 62464 23264 23266 62465 23254 62466 24595 62467 62468 62469 62470 62471 62472 24597 62473 62474 62475 62476 24601 24604 62477 55061 62478 62479 62480 24605 55864 62481 24608 62482 ...
result:
ok answer = 296054
Test #50:
score: 0
Accepted
time: 117ms
memory: 12344kb
input:
300000 156917 6 9 5 7 7 9 6 7 4 6 3 8 3 4 1 2 3 9 1 5 1 3 5 9 6 8 6 9 6 10 5 10 8 10 8 10 6 7 9 10 8 9 2 6 7 9 8 10 4 10 9 10 4 8 4 9 3 6 9 10 1 2 4 8 2 6 4 5 7 9 5 7 5 9 4 8 9 10 8 9 5 7 7 8 7 9 7 8 9 10 5 9 2 10 6 8 4 10 8 9 1 7 3 6 6 8 9 10 4 8 2 7 4 10 1 4 6 7 9 10 4 8 8 10 1 5 1 7 3 9 4 8 8 9 3...
output:
24362 74588 48058 67450 52542 133688 13108 356 133689 26414 4934 14690 101007 38078 38352 14710 90532 90503 70862 103061 90495 58518 48075 90498 8488 103048 133224 8459 42684 103002 1114 133217 67022 30631 48046 90024 14680 133690 102998 90508 90103 100595 48042 133465 102987 14765 133691 100779 845...
result:
ok answer = 290604
Test #51:
score: 0
Accepted
time: 144ms
memory: 11636kb
input:
300000 150061 40 82 23 24 73 94 66 67 66 93 17 75 27 51 54 69 84 92 39 48 14 77 9 21 45 90 44 82 41 63 92 94 63 85 11 47 73 95 86 94 17 92 35 47 45 64 35 67 93 99 65 97 38 74 56 65 23 78 3 54 27 77 79 91 70 72 88 92 17 88 19 37 87 91 99 100 11 61 26 80 73 98 91 93 11 13 89 94 43 98 90 97 70 73 9 30 ...
output:
25475 8635 101943 95076 84995 107103 47063 102287 122556 41345 111263 6483 34010 31581 77481 136936 75679 39153 101981 71915 3678 40254 80146 89241 81866 81913 125308 83547 113782 54413 111668 113176 116127 131669 3778 23230 128136 148738 70830 116875 33391 136702 2172 93531 29818 134478 120183 1458...
result:
ok answer = 299989
Test #52:
score: 0
Accepted
time: 181ms
memory: 11652kb
input:
300000 149999 556 916 419 756 924 973 632 643 477 933 942 982 3 683 349 514 19 917 706 752 94 104 394 494 21 497 73 880 45 332 629 786 56 174 741 763 433 889 726 914 262 462 623 915 168 842 254 824 103 996 356 766 948 973 429 621 833 998 625 704 990 998 812 851 225 874 808 995 691 809 206 470 438 71...
output:
57911 132171 138005 84208 40870 140807 91753 48651 136862 130603 1643 44491 45117 130683 18493 144903 4779 135135 32749 83923 38228 76021 123973 10343 1583 136574 141839 75456 122203 111020 148611 118236 7966 117451 81271 39819 116840 41275 26322 91229 89023 79077 42227 117321 18382 107342 124757 21...
result:
ok answer = 299998
Test #53:
score: 0
Accepted
time: 214ms
memory: 11556kb
input:
300000 150000 2952 4855 7982 9177 2483 6149 2332 8618 9598 9934 1792 4703 7046 9680 2410 6305 4047 4777 1499 4551 7242 7357 5766 9935 4189 4328 7115 9460 7695 9319 8328 8677 7785 9491 8174 8492 3883 5165 5277 9578 5928 9878 517 8949 2117 2724 5276 8352 6967 7641 1108 6809 6474 7064 4551 9396 6254 89...
output:
42877 116112 74129 8882 143918 39893 96965 78737 41362 36990 124425 63633 33112 47416 110528 94361 112357 119782 49371 51845 67951 133411 12244 51818 135971 91511 112206 36969 77144 33050 15889 99266 20513 21825 102422 18268 136295 95430 35736 114918 247 121046 127189 73011 102189 96310 84144 5240 2...
result:
ok answer = 299999
Test #54:
score: 0
Accepted
time: 194ms
memory: 11548kb
input:
300000 150000 90462 99554 55705 57142 94440 97633 58596 96591 75226 94006 13368 15518 98383 98654 84117 94919 40069 63073 8004 65091 4385 82911 66462 70822 34454 44857 22507 37602 4845 74109 10526 95149 16021 24471 9617 25356 49732 92684 82188 93045 52592 55281 96908 97689 23937 68454 38080 79677 47...
output:
135093 62890 15122 66622 107208 3887 147577 124146 79150 84567 122002 112886 36324 24612 104892 1767 9826 10602 45513 67527 58175 57674 92799 149151 121961 22752 35501 91852 117784 6566 148361 59613 39441 18048 7721 38567 117675 138839 144230 125126 13657 25202 45004 137911 149846 47982 141975 6045 ...
result:
ok answer = 300000
Test #55:
score: 0
Accepted
time: 214ms
memory: 11600kb
input:
300000 150000 978631 982929 101663 499756 759816 798998 803333 838120 636964 675643 641278 704471 862290 919804 49691 717850 467443 677929 21596 84237 577153 844013 916660 917560 774572 929040 515474 806479 665250 888570 521313 523790 783160 877043 712485 825311 160449 264011 9658 425587 999666 9997...
output:
79087 45811 48788 117212 99027 111494 127954 99929 100090 1077 63871 25327 111707 49180 55830 51017 113357 98762 11348 31828 149955 120448 139831 956 4339 106864 85057 136082 26172 6727 106812 137530 27384 11156 144556 68427 45459 114005 19519 113022 40438 91800 940 141550 59490 84455 88552 45665 66...
result:
ok answer = 300000
Test #56:
score: 0
Accepted
time: 255ms
memory: 11556kb
input:
300000 150000 9913013 9932632 1886090 3278627 15598 6396576 2951139 7310476 2824123 6726030 1142999 9790240 7041910 8793346 959943 9716348 3016613 8956537 2336065 9073451 1035455 9348843 3377319 7740855 4388032 8560696 3406865 6461910 8772807 9823783 1946767 8036961 5505173 8732456 8493741 8609530 8...
output:
71743 18157 80901 102436 89252 2026 96656 1460 15163 8774 1678 139814 34218 82605 46299 116999 56950 42528 76072 86052 130856 3609 290 135015 16605 86802 98896 103235 132558 115222 43971 98958 29597 101409 107433 84787 40403 8643 24629 129966 5212 145945 90114 622 147631 128887 62096 47700 100738 51...
result:
ok answer = 300000
Test #57:
score: 0
Accepted
time: 228ms
memory: 11720kb
input:
300000 150000 90841840 91559816 12499783 62748667 51355156 76943316 43673156 88083748 36949927 57673386 48735343 75253124 91558518 98845905 78717659 84832367 93306233 99008252 83511172 93934560 56671183 93733617 48444425 88876535 47109951 75003263 55556049 82291660 40401427 60213599 45748967 5257286...
output:
135594 77743 138263 33778 63741 131319 88252 66392 139599 70324 61263 42717 130231 58503 70528 51459 149734 84522 57161 125565 102390 568 96792 17884 76598 19697 142739 126569 38954 25369 77341 40762 16223 55711 32381 28005 24594 142290 137148 107379 135040 98346 26234 97174 78251 90414 60916 115929...
result:
ok answer = 300000
Test #58:
score: 0
Accepted
time: 245ms
memory: 11548kb
input:
300000 150000 957293988 962106030 736798587 808067623 782742114 966585014 742593057 923915720 679625821 902064761 877600863 924157346 873528366 936110266 677729400 918693297 577428362 992519997 350536068 564404168 538943592 889454752 438784335 746201316 501004965 684782755 185477041 538309098 524300...
output:
143480 104046 113207 105193 91527 102058 51222 85447 64335 60976 54491 128386 102404 54625 51363 6040 40182 8014 119358 43485 81861 35907 103726 74963 25979 140652 127735 30430 40858 133530 57307 138619 129541 111334 141486 23025 140096 60605 133514 74327 30789 76543 126728 2332 142180 57910 109132 ...
result:
ok answer = 300000
Test #59:
score: 0
Accepted
time: 115ms
memory: 14024kb
input:
300000 152784 2 3 1 2 1 3 2 3 2 3 1 3 2 3 2 3 1 2 2 3 1 2 1 3 2 3 2 3 1 3 1 2 2 3 2 3 2 3 1 2 1 2 1 2 1 2 2 3 1 3 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 3 1 3 2 3 2 3 2 3 1 2 1 3 2 3 2 3 1 3 1 2 1 2 2 3 2 3 2 3 2 3 2 3 1 2 2 3 2 3 1 3 1 2 1 3 1 2 2 3 2 3 1 2 2 3 1 3 1 2 1 2 2 3 1 2 2 3 1 2 1 3 2 3 2 ...
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...
result:
ok answer = 152784
Test #60:
score: 0
Accepted
time: 113ms
memory: 11344kb
input:
300000 86194 1 2 3 4 4 5 1 5 4 5 2 4 4 5 2 4 3 5 2 3 2 5 2 4 4 5 3 4 4 5 1 4 2 5 3 4 1 3 2 4 3 4 3 5 1 5 1 4 3 5 3 4 1 5 2 4 2 4 2 3 1 2 3 4 4 5 3 4 4 5 4 5 4 5 4 5 3 5 1 3 3 4 4 5 4 5 1 4 4 5 4 5 3 5 3 4 2 3 3 5 1 2 3 5 2 4 3 4 1 4 4 5 4 5 4 5 4 5 2 3 1 3 2 4 1 4 1 2 3 4 4 5 2 4 2 4 1 3 4 5 3 4 3 4...
output:
2784 62547 18956 62548 18930 62549 18946 62550 62551 38792 62552 62553 19030 62554 19331 62555 62556 62557 53764 62558 62559 62560 62561 62562 62563 62564 62565 62566 62567 38801 14275 62568 20128 62569 19939 19905 19903 20016 62570 54141 62571 20287 20305 62572 20401 20360 62573 62574 38757 62575 1...
result:
ok answer = 148740
Test #61:
score: 0
Accepted
time: 127ms
memory: 12192kb
input:
300000 141964 7 9 7 9 9 10 5 10 7 10 1 3 3 5 4 10 2 6 9 10 6 9 1 3 8 9 2 8 5 8 8 10 7 10 9 10 7 8 6 8 4 10 7 10 2 5 9 10 1 7 2 9 8 10 3 5 8 10 5 10 6 10 6 10 9 10 1 6 9 10 9 10 6 8 6 9 7 8 9 10 4 9 2 6 1 6 2 6 5 7 8 10 9 10 7 8 6 9 9 10 1 6 1 3 8 9 8 10 6 9 2 5 5 8 2 5 5 10 3 7 3 4 4 9 5 9 5 10 7 9 ...
output:
44968 44963 103953 15922 44971 11534 33538 10098 63611 103947 33212 11525 78433 133778 107309 78430 44942 103977 45033 33185 4999 45029 39581 103964 69482 133779 78426 33443 78425 15901 33169 33171 103868 66889 103880 103879 33095 33137 45042 103910 10162 63548 66846 63551 69805 78427 103971 44985 3...
result:
ok answer = 275741
Test #62:
score: 0
Accepted
time: 153ms
memory: 11648kb
input:
300000 149911 43 56 67 78 30 90 55 80 24 77 80 88 2 10 96 97 86 98 19 67 37 84 91 97 62 82 53 63 66 93 22 75 64 73 74 88 92 94 91 92 29 100 90 98 37 99 96 100 63 78 59 82 68 92 70 85 66 91 97 100 61 68 63 90 82 93 40 76 99 100 20 21 97 100 50 76 81 86 70 84 54 94 13 100 24 85 94 99 68 79 94 98 19 88...
output:
58898 142914 13189 149480 110555 115997 1218 144745 72367 88264 20972 135234 70043 76337 83323 106655 121941 88136 137447 135159 10954 134002 22013 143969 143858 64107 88504 92812 83467 63161 101255 73950 118998 133081 31478 6386 146507 134461 117195 93582 50569 2102 7807 140490 144516 140510 4539 1...
result:
ok answer = 299817
Test #63:
score: 0
Accepted
time: 194ms
memory: 11672kb
input:
300000 150000 754 812 673 775 487 552 507 917 210 819 374 736 487 994 397 873 928 980 319 571 408 853 4 496 747 810 131 486 916 956 7 834 699 862 353 697 732 822 898 934 257 595 50 643 707 785 837 931 920 951 822 958 653 780 60 226 937 987 35 519 381 534 179 883 109 813 128 364 628 678 247 491 221 3...
output:
107324 140538 57352 47172 6914 124416 43021 27303 28555 62114 28886 44986 105795 43135 136955 122824 52767 95133 53367 81884 68446 82245 144454 36256 74506 120405 142477 8278 140319 49905 53270 5025 118851 22761 100100 44007 26398 22554 122067 37684 14937 40195 55991 76312 62362 93792 120207 12525 8...
result:
ok answer = 299999
Test #64:
score: 0
Accepted
time: 210ms
memory: 11684kb
input:
300000 150001 7546 9936 1162 3146 6754 9649 857 2413 8510 9893 4716 7705 7716 8415 9164 9410 6835 7368 759 9400 9631 9856 3406 5719 3351 4571 8626 9185 3958 6558 5502 9720 8962 9031 6145 9485 5618 7486 3125 9283 5266 8779 6399 6741 4401 5218 1184 4132 7703 9952 1349 9292 3287 8449 5724 8357 2213 711...
output:
46206 16963 90285 9723 125758 138004 70150 136924 123890 916 144317 62577 37765 23729 85600 55508 133552 73991 128853 16776 51755 97738 50686 30172 47458 2892 18214 62683 98536 115197 39224 114429 54096 100689 113629 87633 13773 101165 82373 12799 2964 100799 12779 84813 29072 82563 99653 10959 6943...
result:
ok answer = 300000
Test #65:
score: 0
Accepted
time: 247ms
memory: 11704kb
input:
300000 150000 42005 98322 36515 54982 22264 95585 64174 69821 55104 97778 87368 94373 7007 8996 31762 69343 49180 53546 37354 45525 72481 91425 91172 91934 392 96117 89666 96742 78212 94400 40210 51787 79757 90604 54590 58073 81825 88959 87777 95161 45753 55341 30650 33760 41139 89968 90264 98793 89...
output:
31525 57654 8100 109520 57958 129651 1213 94881 54166 37567 101650 14128 144051 133570 113261 50127 116172 65387 87818 130345 58507 19631 30055 134589 132939 58733 19815 113068 136058 84894 105477 58035 42105 23185 10172 137932 121420 76198 12347 62767 126061 100478 131090 8866 132216 71121 102788 8...
result:
ok answer = 300000
Test #66:
score: 0
Accepted
time: 238ms
memory: 11580kb
input:
300000 150000 105608 372730 450920 939814 392570 470982 831537 960525 739274 852533 205877 847538 328947 740925 299221 476303 764013 815537 148257 288101 440116 625446 852887 985940 771596 826542 644437 892788 117118 283300 5525 130199 802505 908649 605317 714932 57259 586892 934933 944093 803203 95...
output:
24198 36605 40354 122294 104520 6909 126227 41384 109580 13931 77337 126095 111086 82795 13429 2659 116936 115486 66558 139767 117072 145420 5057 34236 46171 75890 142043 146585 106926 87963 18772 125761 2438 46154 74386 42554 107561 127825 123057 73492 54203 119577 115540 107829 116677 30621 108950...
result:
ok answer = 300000
Test #67:
score: 0
Accepted
time: 259ms
memory: 11600kb
input:
300000 150000 5452202 9947793 9940079 9977522 9867053 9970459 3301439 5116018 6793328 6959345 295436 7809391 8314322 8332834 284652 6795243 9328222 9619914 1773012 9267574 3339832 7591959 2932404 4146637 1537431 4874682 2542828 9607098 3766697 6739632 8821649 9809564 9012909 9387656 6364569 8263430 ...
output:
56169 149073 45820 48642 107719 112833 122344 91452 139567 5036 134522 30402 43617 10591 90159 131247 134458 80724 39082 73204 11210 16771 112729 132992 40559 10786 58543 130887 79151 38612 57865 30649 62690 133314 116625 97988 47478 107904 23767 13351 127858 106101 23882 49000 21496 92121 47569 115...
result:
ok answer = 300000
Test #68:
score: 0
Accepted
time: 255ms
memory: 11588kb
input:
300000 150000 29256543 66052315 81437971 88272697 30361131 48076722 16393921 38228960 5190763 66267381 87549810 93687917 77861257 84376100 29951389 73926657 30887064 87431784 98966017 99489059 19806040 55359526 881837 92289084 83937815 96494313 39963981 64355637 57275584 68809544 54889048 82463209 1...
output:
86747 119105 42196 25344 87262 129950 112297 104478 16072 148473 57955 137896 123560 82353 104225 56871 18378 7093 141423 45905 33248 10393 89443 148384 140767 97242 122972 93864 34609 112549 106455 63796 144127 40364 23628 41021 117781 121149 104817 103262 87039 41625 106171 8382 25619 63266 145317...
result:
ok answer = 300000
Test #69:
score: 0
Accepted
time: 259ms
memory: 11556kb
input:
300000 150000 97364729 815595008 542160770 603377615 577372596 773000925 493180194 604212827 148747585 765587621 781858891 841132159 825615549 958198318 853720291 982666126 443094830 832639056 265464744 612310444 430129832 962941028 720177015 997807318 606221899 916413997 266478160 776731954 4002806...
output:
119401 70943 139636 71157 109842 78115 121255 126319 35028 73513 32863 100444 71742 112014 53971 4427 68463 77708 46872 90948 80464 73498 103216 113027 83933 97565 94047 107325 45659 1723 4111 135411 28020 35113 74098 82138 53162 80165 104051 65158 49894 119093 126561 121511 143624 48248 70957 80217...
result:
ok answer = 300000
Test #70:
score: 0
Accepted
time: 94ms
memory: 13928kb
input:
300000 192988 1 2 1 2 2 3 1 3 2 3 2 3 2 3 2 3 1 2 1 3 2 3 1 3 1 3 1 2 2 3 2 3 1 3 2 3 1 3 1 3 1 2 1 3 1 2 1 2 1 2 1 3 1 3 1 3 1 2 2 3 1 3 1 3 1 3 1 3 2 3 2 3 1 3 1 2 1 2 2 3 2 3 1 2 2 3 1 3 2 3 1 2 1 2 2 3 2 3 2 3 2 3 1 2 1 3 2 3 1 2 2 3 1 3 2 3 1 2 1 3 1 2 1 3 2 3 2 3 2 3 1 3 1 2 1 3 2 3 2 3 2 3 1 ...
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...
result:
ok answer = 192988
Test #71:
score: 0
Accepted
time: 98ms
memory: 11304kb
input:
300000 234961 1 3 4 5 3 4 2 3 2 4 2 3 3 4 1 5 2 3 4 5 3 4 4 5 1 2 1 4 3 5 4 5 4 5 4 5 2 4 4 5 1 5 4 5 1 4 3 4 2 4 4 5 4 5 2 3 3 4 2 3 4 5 2 5 2 4 2 5 2 4 4 5 2 5 4 5 4 5 2 3 1 3 4 5 1 3 2 5 3 5 4 5 1 2 3 5 3 4 2 3 4 5 4 5 1 5 3 5 2 4 3 5 1 5 1 2 1 4 4 5 2 5 2 3 1 3 1 5 3 4 3 4 2 3 1 5 1 4 3 4 1 3 1 ...
output:
57850 53703 62573 59870 62574 59866 62575 62576 59863 53702 62577 53701 17969 62578 62579 53700 53699 53698 62580 53697 62581 53696 62582 62583 62584 53695 53694 59841 62585 59838 53693 62586 62587 62588 62589 53692 62590 53691 53675 59850 60995 53689 60987 62591 62592 53688 17975 62593 62594 59903 ...
result:
ok answer = 297533
Test #72:
score: 0
Accepted
time: 142ms
memory: 12216kb
input:
300000 144464 3 4 4 10 4 10 2 4 1 6 8 9 6 8 8 10 5 6 6 10 8 9 1 7 4 7 9 10 8 10 6 7 6 10 2 7 1 2 2 6 6 9 9 10 9 10 3 7 1 10 2 3 3 7 4 8 7 9 3 10 5 7 2 6 4 6 9 10 4 6 8 10 8 10 7 9 2 8 7 8 6 7 6 9 7 10 1 10 7 8 2 6 6 7 5 10 6 10 4 5 9 10 2 6 9 10 9 10 5 7 8 10 3 10 7 10 1 10 4 6 2 9 5 7 6 10 8 10 8 9...
output:
17541 9582 9606 14638 65307 67077 123641 67245 44634 29438 67190 67665 82719 106651 67340 85178 29177 72136 314 46867 29202 106647 106646 87932 133576 6031 87908 133577 60728 133578 69263 46856 66460 106641 54648 67344 67262 60680 117357 118712 80146 28316 60496 133579 111686 46877 84839 15917 28075...
result:
ok answer = 278039
Test #73:
score: 0
Accepted
time: 151ms
memory: 11744kb
input:
300000 150022 74 99 18 100 43 70 30 95 2 95 67 85 93 97 21 51 96 100 2 33 50 93 74 79 43 71 54 85 76 86 95 100 5 48 99 100 35 94 2 3 15 99 68 88 48 51 90 100 47 50 82 96 22 96 76 82 4 90 84 94 52 91 66 87 81 95 94 96 53 83 62 98 10 21 78 86 97 99 9 98 51 54 7 77 60 62 47 71 82 84 54 55 56 63 76 97 9...
output:
75749 4380 96593 13385 143714 85431 138538 46824 143583 17863 42799 145369 97874 52052 106631 75823 40709 148625 18936 62 2694 87454 47067 133495 43795 98104 6717 106787 135106 124195 46278 84567 63589 141872 48210 72620 6365 111728 146208 770 52557 111100 72793 113822 119550 55274 75798 106524 1348...
result:
ok answer = 299938
Test #74:
score: 0
Accepted
time: 158ms
memory: 11600kb
input:
300000 149998 846 912 507 874 872 908 926 962 959 961 791 821 840 964 858 889 833 959 897 978 734 817 686 915 292 679 418 592 247 966 975 984 16 33 62 987 397 560 239 859 363 777 861 945 823 946 145 540 682 838 782 824 206 417 368 819 53 829 345 789 38 344 889 980 260 476 253 382 188 754 898 954 346...
output:
124915 46717 129381 138448 74571 114524 123861 79902 53800 133709 102938 92352 91018 67389 9743 10550 154 526 59238 9089 141200 127473 120606 54584 82211 112779 30382 22873 121918 146199 19949 72601 40759 25012 107356 133835 90256 49068 137450 51983 75359 10683 126772 30730 90469 102764 89266 29624 ...
result:
ok answer = 299996
Test #75:
score: 0
Accepted
time: 198ms
memory: 11720kb
input:
300000 150000 3735 8768 3087 8764 3482 4806 5737 8689 9989 9992 9410 9674 3833 8798 6568 9556 1940 4565 6881 9857 1744 3824 4950 4980 3581 5547 5098 8827 9948 9992 2413 6458 9108 9257 4334 6121 4330 7925 2429 7742 3225 9979 6339 7770 1132 2452 7899 8950 5936 7534 4333 4780 4764 9001 385 2374 1066 92...
output:
24122 16007 42014 63122 56786 25597 25550 85700 37400 82212 25435 45566 58352 48013 149244 82923 20521 73382 147810 111753 17527 141399 9922 83217 131785 41522 41187 9285 1831 95280 74901 56768 69465 25328 145240 96400 46462 57131 139358 77675 93862 107020 112441 28554 92955 86463 25140 87739 112876...
result:
ok answer = 300000
Test #76:
score: 0
Accepted
time: 210ms
memory: 11592kb
input:
300000 150000 49790 78377 97347 99479 72006 76581 43881 72339 81666 89279 2075 38244 89843 97604 77076 87731 28189 51164 28777 78100 53937 67907 22141 37944 11183 58352 78093 98649 95282 99006 99399 99405 4146 67855 59203 94723 66857 79990 74343 97034 11388 64823 57171 64530 54072 64158 36065 69808 ...
output:
143700 145971 136451 119028 119252 25463 133756 23518 48557 142582 99591 24997 65808 40621 60186 34945 91108 68057 88685 52698 83636 85208 83788 95497 121351 66258 6679 86969 135482 65090 70900 148807 50507 16263 140267 41320 57833 31151 35858 145412 82611 128908 37477 1406 141873 129608 121070 8847...
result:
ok answer = 300000
Test #77:
score: 0
Accepted
time: 230ms
memory: 11536kb
input:
300000 150000 291766 999528 239706 390565 933299 995606 273097 763455 851446 888731 543833 767589 699748 927426 664379 691555 190026 914875 764030 851584 611326 958847 62849 849203 573123 905908 900958 929788 593543 736367 143467 888350 121565 426255 341185 707591 831864 839245 636104 681776 402398 ...
output:
14264 26604 139727 109488 34985 137219 96005 105709 5841 109599 73433 125565 63115 106955 124621 3286 32232 97781 102018 101373 127543 134422 90315 23989 34096 125079 119312 18874 80157 77328 65541 69430 35132 60297 45428 147494 6127 70151 22474 94191 121947 136532 114861 103566 128803 35597 106616 ...
result:
ok answer = 300000
Test #78:
score: 0
Accepted
time: 237ms
memory: 11540kb
input:
300000 150000 8227243 9686470 6719345 8881636 3775474 8198905 5364395 9947503 2981953 9696782 1329265 1565360 3644642 4928409 1716902 8967301 9699990 9988645 3821700 7387931 2856554 3399403 9842792 9957190 8991337 9997797 9923943 9959914 2779208 7972351 6971201 9876462 8441175 9612050 6121536 656518...
output:
120653 89485 24348 54100 14307 3879 44573 4674 74705 125348 19565 147596 133981 29712 149428 95248 22459 89810 65203 8594 146032 27186 133438 142665 137421 123759 55845 26448 123378 72540 44785 92595 91141 139717 50511 16021 115586 149970 13272 33157 77950 86271 52307 23337 8046 82982 110133 108891 ...
result:
ok answer = 300000
Test #79:
score: 0
Accepted
time: 226ms
memory: 11716kb
input:
300000 150000 77560217 84821462 57863108 73308827 13349108 92483582 10831881 85670719 92153207 98497873 21826186 59894512 5351484 44192081 23323148 98213132 83517574 87114426 1026504 90841700 99023752 99694292 6764164 7844534 43604894 58538721 33421423 79957123 45276705 79665537 79467172 80182633 80...
output:
111736 122719 2732 126823 83023 69340 34817 8739 29732 135564 148510 914 65712 19031 149195 115518 117817 55042 30449 94595 94200 101632 64833 119693 25319 116438 48950 119085 87808 5976 20785 135751 134764 46152 136299 23366 112944 141030 61494 128132 40818 9965 18637 8262 75044 24468 109813 45229 ...
result:
ok answer = 300000
Test #80:
score: 0
Accepted
time: 291ms
memory: 11588kb
input:
300000 150000 763814908 996726129 281635131 688248102 904370118 945799883 94949607 286111159 689327474 903697825 926497730 966723335 696541135 923862111 589032579 598315025 292449712 301680987 318552055 778181558 378162882 452092573 107483323 873580594 184668805 250494315 140236757 829538288 6751721...
output:
47669 93387 135010 13595 42757 138566 95326 69829 15202 142486 36722 129747 10226 121950 140170 73795 110078 126436 20233 66888 24378 60530 98925 87241 31072 13721 68410 30906 54263 98567 136056 95746 10944 50410 130197 51376 110911 20551 59659 102686 134493 56849 107242 93260 121626 24941 81800 968...
result:
ok answer = 300000
Test #81:
score: 0
Accepted
time: 95ms
memory: 14080kb
input:
300000 233191 1 3 1 3 2 3 2 3 2 3 2 3 2 3 2 3 1 2 2 3 1 3 2 3 2 3 1 3 1 3 1 3 1 3 1 3 2 3 2 3 2 3 2 3 2 3 2 3 1 2 2 3 1 3 2 3 2 3 2 3 1 3 2 3 1 2 1 3 2 3 1 3 1 3 2 3 2 3 1 3 1 2 2 3 2 3 2 3 2 3 1 3 2 3 1 3 1 2 2 3 1 2 1 2 2 3 1 3 1 3 1 2 2 3 2 3 2 3 2 3 2 3 1 2 1 3 1 2 2 3 1 3 2 3 2 3 1 2 2 3 1 2 1 ...
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...
result:
ok answer = 233191
Test #82:
score: 0
Accepted
time: 110ms
memory: 11420kb
input:
300000 24012 4 5 4 5 1 3 4 5 2 4 2 5 2 5 2 3 4 5 2 4 2 3 3 4 3 4 3 4 2 4 4 5 4 5 2 3 4 5 1 5 1 5 3 5 1 4 3 5 1 4 2 3 2 4 1 4 1 3 1 5 2 4 1 3 3 4 1 3 4 5 1 2 3 4 1 4 2 3 4 5 4 5 2 4 3 4 2 4 2 5 2 5 2 4 2 4 1 5 1 3 2 3 3 5 4 5 1 3 1 4 4 5 2 3 2 5 2 3 1 3 3 5 4 5 3 5 1 5 2 3 2 3 3 5 2 4 3 4 2 4 4 5 4 5...
output:
0 0 0 0 0 0 0 23881 0 0 23882 0 0 0 0 0 0 23883 0 0 0 0 0 0 0 23888 0 0 0 0 0 0 0 0 0 4011 0 0 23886 0 0 0 0 0 0 0 0 0 0 0 23889 0 0 0 0 0 23871 0 23870 0 0 0 0 0 23873 23875 0 0 0 0 0 0 0 0 0 0 0 0 0 4041 0 0 0 0 0 0 0 0 0 4026 0 0 0 0 0 0 0 0 0 0 0 0 0 23903 0 0 0 23906 0 0 0 0 4034 0 0 0 0 0 4036...
result:
ok answer = 48024
Test #83:
score: 0
Accepted
time: 135ms
memory: 12196kb
input:
300000 104991 7 8 5 10 2 4 3 4 3 9 2 9 3 4 7 9 6 9 3 10 4 8 7 8 9 10 6 8 2 8 2 10 3 5 3 10 5 9 4 10 7 8 7 10 3 9 3 10 1 2 3 4 9 10 3 9 7 9 1 5 1 7 1 8 8 10 6 9 7 10 9 10 9 10 2 5 6 10 7 10 9 10 8 9 4 8 6 8 1 9 9 10 1 5 6 10 4 7 5 8 3 9 6 7 6 7 8 9 5 9 4 7 5 10 9 10 8 10 8 9 9 10 9 10 9 10 9 10 7 8 5...
output:
0 16637 17959 17578 0 0 17563 60943 26058 0 0 0 0 0 0 0 27245 0 16720 10157 0 60937 0 0 3504 17540 0 0 60962 25387 68603 0 67700 25900 61014 0 0 32928 26022 60798 0 67421 0 0 0 0 24892 26357 99975 104676 0 72920 72928 67411 16672 89310 16874 0 67426 67348 0 0 0 0 0 16742 0 24506 0 68086 0 16811 3809...
result:
ok answer = 209982
Test #84:
score: 0
Accepted
time: 146ms
memory: 11652kb
input:
300000 47061 70 94 30 50 45 100 36 88 32 91 25 54 9 27 61 65 41 64 65 69 8 68 81 89 46 90 17 31 15 24 93 97 65 78 15 31 94 100 78 79 33 35 19 75 3 62 93 95 15 58 71 84 61 64 26 73 19 72 60 100 81 96 81 88 54 91 15 37 23 46 63 67 4 40 88 100 57 63 13 86 9 23 87 88 58 100 30 67 27 90 65 83 38 92 48 72...
output:
0 44105 33186 20489 15497 0 11219 0 0 0 0 25990 34844 15645 8903 0 0 15708 0 0 19443 0 0 31354 0 0 0 0 0 0 26120 0 0 23191 36728 0 27256 13958 0 0 7762 0 0 0 10529 0 22781 0 0 43384 0 7561 0 0 0 0 0 0 0 0 0 0 28617 27430 0 10462 0 0 0 44617 0 37528 13308 0 0 24399 1763 0 0 0 0 0 0 13643 0 0 0 24740 ...
result:
ok answer = 94122
Test #85:
score: 0
Accepted
time: 168ms
memory: 11656kb
input:
300000 24043 284 933 365 927 559 679 102 483 407 653 677 969 463 602 814 900 375 498 620 698 637 793 824 998 213 383 100 496 725 872 52 612 35 947 749 882 724 920 212 665 421 711 675 904 730 890 84 519 508 893 515 984 82 958 975 989 586 750 757 965 34 601 469 593 412 766 389 653 666 884 851 923 616 ...
output:
13440 22802 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 919 0 0 0 0 0 0 0 0 18885 0 68 0 0 0 0 0 15838 0 0 0 0 0 2223 22911 0 0 0 0 0 0 0 0 0 0 0 0 6242 0 0 0 0 0 0 0 8385 0 0 0 397 23005 0 18810 0 7056 0 23770 0 0 0 0 0 0 0 7892 0 0 0 0 0 0 0 0 21621 0 0 0 0 0 0 0 0 0 0 0 8903 0 0 0 0 0 0 0 0 2...
result:
ok answer = 48086
Test #86:
score: 0
Accepted
time: 174ms
memory: 11624kb
input:
300000 39197 3464 9192 2491 4593 8097 9019 4096 9853 8425 8896 361 3624 3848 5908 5689 7816 4995 9362 3956 4144 2335 9360 7158 9342 3450 7596 6058 9998 1016 5957 4091 9487 4355 5263 2859 9771 9072 9331 8269 8799 1081 5503 5930 8840 5606 6760 4876 7444 9610 9801 5986 9429 9001 9776 3594 8009 156 9211...
output:
20612 38442 0 29882 0 22814 0 0 0 30679 9086 0 0 0 0 29792 0 13771 0 0 0 0 0 0 23125 0 38816 22325 0 29286 0 0 0 0 0 20342 0 0 0 0 38151 20224 0 11889 0 0 0 10574 0 0 0 0 0 35357 0 10919 0 38121 14956 19767 0 0 0 16980 0 29818 0 0 36079 0 0 12931 0 0 0 0 0 34240 0 25369 0 0 0 3847 0 12173 0 0 0 1811...
result:
ok answer = 78394
Test #87:
score: 0
Accepted
time: 204ms
memory: 11628kb
input:
300000 12008 61060 93610 29964 39538 99379 99599 68300 85459 78526 92446 4557 64653 38330 54309 3419 86837 64888 74988 9351 68829 15679 22336 45276 86285 1753 67864 62960 77046 62686 94661 7937 11565 10790 12322 55724 71521 98415 99275 62100 78617 70531 89247 6543 29130 8246 50974 90235 99940 27517 ...
output:
0 0 0 0 0 0 0 0 0 0 8168 0 0 0 0 2096 2400 0 0 0 0 0 0 0 0 4303 0 0 0 0 0 0 0 0 0 0 0 0 0 6754 0 0 0 0 0 0 0 0 0 0 0 0 8735 0 0 0 0 0 6707 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10203 0 0 0 1330 0 0 3435 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3612 0 0 0 0 0 0 0 0 0 2216 0 0 0 0 0 0...
result:
ok answer = 24016
Test #88:
score: 0
Accepted
time: 217ms
memory: 11648kb
input:
300000 51943 922968 931060 676228 902422 706391 835341 377320 837379 728897 785928 945419 983794 728153 742025 530848 705151 193003 410603 795045 976129 628017 856937 286764 722057 45994 560645 835098 931094 935878 983991 440103 965747 474374 609564 522246 850694 287757 962939 754589 843217 262173 7...
output:
0 0 0 24783 0 0 0 0 29850 0 0 0 0 0 39469 34693 0 50886 13753 0 0 0 25960 23850 0 0 0 36158 0 9865 0 25373 28722 45913 0 0 0 0 0 0 0 0 0 19091 0 0 39038 0 0 7321 0 35578 0 0 19728 0 0 0 43244 0 0 14500 44630 0 0 0 31998 0 0 0 0 0 33473 0 6047 0 41959 0 0 0 0 0 0 0 0 0 0 0 5577 0 0 0 0 0 0 9358 6248 ...
result:
ok answer = 103886
Test #89:
score: 0
Accepted
time: 278ms
memory: 11656kb
input:
300000 92186 5881667 9245835 585950 1112181 2359288 4822085 582150 3868378 2463796 8615660 5466872 7826770 4190126 6736016 5587359 7790977 9047264 9662912 5210034 8575619 8929902 9587777 6225173 9633255 891946 1478964 2631518 3196046 9369588 9836606 2702532 7732659 2191361 2486418 4246739 6627269 63...
output:
66765 1909 42325 25988 9946 0 89579 0 0 50385 65461 76305 3386 17296 0 0 10130 86989 0 30784 84888 66577 46878 79269 37057 45526 10226 8538 59203 0 72410 0 60723 84883 0 70446 11364 16380 60801 54694 57438 0 87168 0 77029 35829 0 87892 0 0 78604 84487 0 0 0 0 0 60120 0 27122 53370 31650 0 9642 0 312...
result:
ok answer = 184372
Test #90:
score: 0
Accepted
time: 231ms
memory: 11660kb
input:
300000 5101 22533551 61918934 55282140 76435955 67436320 75349037 25838176 76449937 72274253 73479904 12520364 55901303 63268357 78610611 90446269 98394669 45735435 58300568 65549491 93811961 53562826 72410596 98875739 99970807 76621426 81931190 49609129 77583583 10142883 58372718 2868357 10564697 5...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1755 0 0 0 0 0 0 0 0 0 0 1786 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3355 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4340 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok answer = 10202
Test #91:
score: 0
Accepted
time: 294ms
memory: 11556kb
input:
300000 45343 161780904 410049562 283210989 686643566 75741737 207110089 133792723 222338922 681018503 797751796 882310807 893049049 7612807 793470558 622224492 928679497 145325156 991514099 270763472 617283828 259767717 509070778 918270298 952247865 656605285 954061584 531619154 652348482 693773286 ...
output:
29542 0 6899 7975 0 0 0 0 3237 0 0 0 0 0 0 18537 27865 31367 27278 0 35939 0 0 0 40298 24240 0 16088 0 0 0 0 0 0 26559 0 0 0 0 0 0 0 0 0 1895 0 0 0 0 0 0 0 35503 0 0 0 8289 0 0 25663 17237 0 0 0 0 0 0 0 0 21189 0 0 0 40749 1966 0 0 0 5795 0 43706 0 13375 42873 0 0 27046 0 0 0 0 0 0 18575 0 0 0 0 0 1...
result:
ok answer = 90686
Test #92:
score: 0
Accepted
time: 105ms
memory: 13928kb
input:
300000 1 2 3 1 3 2 3 2 3 1 2 2 3 2 3 1 2 2 3 2 3 2 3 1 3 1 2 1 2 1 2 2 3 1 2 2 3 2 3 1 3 1 2 1 3 1 2 2 3 2 3 1 2 2 3 1 2 1 2 1 3 1 2 2 3 1 2 2 3 2 3 1 2 1 2 2 3 2 3 2 3 2 3 1 3 2 3 2 3 2 3 1 2 1 2 2 3 2 3 1 3 1 3 1 3 1 3 1 3 2 3 1 3 1 2 1 2 2 3 1 2 2 3 2 3 2 3 1 2 2 3 1 2 1 3 2 3 1 2 1 2 1 2 1 3 1 3...
output:
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok answer = 1
Test #93:
score: 0
Accepted
time: 138ms
memory: 10800kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
664 522 349 348 347 346 345 344 343 342 341 340 339 338 337 336 351 334 333 332 331 330 329 328 327 326 325 324 323 322 321 367 382 381 380 379 378 377 376 375 374 373 372 371 370 369 368 383 366 365 364 363 362 361 360 359 358 357 356 355 354 353 352 335 288 287 286 285 284 283 282 281 280 279 278 ...
result:
ok answer = 300000
Test #94:
score: 0
Accepted
time: 153ms
memory: 10820kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
664 522 350 349 348 347 346 345 344 343 342 341 340 339 338 337 336 351 334 333 332 331 330 329 328 327 326 325 324 323 322 321 367 382 381 380 379 378 377 376 375 374 373 372 371 370 369 368 383 366 365 364 363 362 361 360 359 358 357 356 355 354 353 352 335 288 287 286 285 284 283 282 281 280 279 ...
result:
ok answer = 300000
Test #95:
score: 0
Accepted
time: 153ms
memory: 10904kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
664 522 350 349 348 347 346 345 344 343 342 341 340 339 338 337 336 351 334 333 332 331 330 329 328 327 326 325 324 323 322 321 367 382 381 380 379 378 377 376 375 374 373 372 371 370 369 368 383 366 365 364 363 362 361 360 359 358 357 356 355 354 353 352 335 288 287 286 285 284 283 282 281 280 279 ...
result:
ok answer = 300000
Test #96:
score: 0
Accepted
time: 114ms
memory: 10952kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
6670 5020 3348 3347 3346 3345 3344 3343 3342 3341 3350 3339 3338 3337 3336 3335 3334 3333 3332 3360 3369 3368 3367 3366 3365 3364 3363 3362 3361 3370 3359 3358 3357 3356 3355 3354 3353 3352 3351 3340 3310 3309 3308 3307 3306 3305 3304 3303 3302 3311 3300 3299 3298 3297 3296 3295 3294 3293 3321 3330 ...
result:
ok answer = 300000
Test #97:
score: 0
Accepted
time: 128ms
memory: 10972kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
6670 5020 3348 3347 3346 3345 3344 3343 3342 3341 3350 3339 3338 3337 3336 3335 3334 3333 3332 3360 3369 3368 3367 3366 3365 3364 3363 3362 3361 3370 3359 3358 3357 3356 3355 3354 3353 3352 3351 3340 3310 3309 3308 3307 3306 3305 3304 3303 3302 3311 3300 3299 3298 3297 3296 3295 3294 3293 3321 3330 ...
result:
ok answer = 300000
Test #98:
score: 0
Accepted
time: 137ms
memory: 10968kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
6670 5020 3348 3347 3346 3345 3344 3343 3342 3341 3350 3339 3338 3337 3336 3335 3334 3333 3332 3360 3369 3368 3367 3366 3365 3364 3363 3362 3361 3370 3359 3358 3357 3356 3355 3354 3353 3352 3351 3340 3310 3309 3308 3307 3306 3305 3304 3303 3302 3311 3300 3299 3298 3297 3296 3295 3294 3293 3321 3330 ...
result:
ok answer = 300000
Test #99:
score: 0
Accepted
time: 123ms
memory: 11372kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
33337 25025 16685 16684 16683 16682 16681 16680 16679 16678 16677 16676 16687 16674 16673 16672 16671 16670 16669 16668 16667 16666 16665 16664 16699 16711 16710 16709 16708 16707 16706 16705 16704 16703 16702 16701 16700 16712 16698 16697 16696 16695 16694 16693 16692 16691 16690 16689 16688 16675 ...
result:
ok answer = 300000
Test #100:
score: 0
Accepted
time: 119ms
memory: 11424kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
33337 25025 16685 16684 16683 16682 16681 16680 16679 16678 16677 16676 16687 16674 16673 16672 16671 16670 16669 16668 16667 16666 16665 16664 16699 16711 16710 16709 16708 16707 16706 16705 16704 16703 16702 16701 16700 16712 16698 16697 16696 16695 16694 16693 16692 16691 16690 16689 16688 16675 ...
result:
ok answer = 300000
Test #101:
score: 0
Accepted
time: 133ms
memory: 11428kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
33337 25025 16685 16684 16683 16682 16681 16680 16679 16678 16677 16676 16687 16674 16673 16672 16671 16670 16669 16668 16667 16666 16665 16664 16699 16711 16710 16709 16708 16707 16706 16705 16704 16703 16702 16701 16700 16712 16698 16697 16696 16695 16694 16693 16692 16691 16690 16689 16688 16675 ...
result:
ok answer = 300000
Test #102:
score: 0
Accepted
time: 123ms
memory: 12088kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
66686 50026 33339 33340 33341 33342 33343 33344 33345 33346 33347 33348 33349 33363 33351 33352 33353 33354 33355 33356 33357 33358 33359 33360 33361 33362 33350 33315 33316 33317 33318 33319 33320 33321 33322 33323 33324 33325 33338 33327 33328 33329 33330 33331 33332 33333 33334 33335 33336 33337 ...
result:
ok answer = 300000
Test #103:
score: 0
Accepted
time: 111ms
memory: 11968kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
66686 50026 33340 33341 33342 33343 33344 33345 33346 33347 33348 33349 33363 33351 33352 33353 33354 33355 33356 33357 33358 33359 33360 33361 33362 33350 33315 33316 33317 33318 33319 33320 33321 33322 33323 33324 33325 33338 33327 33328 33329 33330 33331 33332 33333 33334 33335 33336 33337 33375 ...
result:
ok answer = 300000
Test #104:
score: 0
Accepted
time: 133ms
memory: 12072kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
66686 50026 33340 33341 33342 33343 33344 33345 33346 33347 33348 33349 33363 33351 33352 33353 33354 33355 33356 33357 33358 33359 33360 33361 33362 33350 33315 33316 33317 33318 33319 33320 33321 33322 33323 33324 33325 33338 33327 33328 33329 33330 33331 33332 33333 33334 33335 33336 33337 33375 ...
result:
ok answer = 300000
Test #105:
score: 0
Accepted
time: 132ms
memory: 12020kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
66686 50026 33340 33341 33342 33343 33344 33345 33346 33347 33348 33349 33363 33351 33352 33353 33354 33355 33356 33357 33358 33359 33360 33361 33362 33350 33315 33316 33317 33318 33319 33320 33321 33322 33323 33324 33325 33338 33327 33328 33329 33330 33331 33332 33333 33334 33335 33336 33337 33375 ...
result:
ok answer = 300000
Test #106:
score: 0
Accepted
time: 112ms
memory: 13968kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
100008 75024 50018 50017 50016 50015 50014 50013 50012 50011 50019 50009 50008 50007 50006 50005 50004 50003 50002 50028 50037 50036 50035 50034 50033 50032 50031 50030 50029 50038 50027 50026 50025 50024 50023 50022 50021 50020 50010 49982 49981 49980 49979 49978 49977 49976 49975 49983 49973 49972...
result:
ok answer = 300000
Test #107:
score: 0
Accepted
time: 105ms
memory: 14104kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
100008 75024 50018 50017 50016 50015 50014 50013 50012 50011 50019 50009 50008 50007 50006 50005 50004 50003 50002 50028 50037 50036 50035 50034 50033 50032 50031 50030 50029 50038 50027 50026 50025 50024 50023 50022 50021 50020 50010 49982 49981 49980 49979 49978 49977 49976 49975 49983 49973 49972...
result:
ok answer = 300000
Test #108:
score: 0
Accepted
time: 122ms
memory: 13980kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
100008 75024 50018 50017 50016 50015 50014 50013 50012 50011 50019 50009 50008 50007 50006 50005 50004 50003 50002 50028 50037 50036 50035 50034 50033 50032 50031 50030 50029 50038 50027 50026 50025 50024 50023 50022 50021 50020 50010 49982 49981 49980 49979 49978 49977 49976 49975 49983 49973 49972...
result:
ok answer = 300000
Test #109:
score: 0
Accepted
time: 105ms
memory: 13992kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
100008 75024 50018 50017 50016 50015 50014 50013 50012 50011 50019 50009 50008 50007 50006 50005 50004 50003 50002 50028 50037 50036 50035 50034 50033 50032 50031 50030 50029 50038 50027 50026 50025 50024 50023 50022 50021 50020 50010 49982 49981 49980 49979 49978 49977 49976 49975 49983 49973 49972...
result:
ok answer = 300000
Test #110:
score: 0
Accepted
time: 119ms
memory: 14056kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
100008 75024 50018 50017 50016 50015 50014 50013 50012 50011 50019 50009 50008 50007 50006 50005 50004 50003 50002 50028 50037 50036 50035 50034 50033 50032 50031 50030 50029 50038 50027 50026 50025 50024 50023 50022 50021 50020 50010 49982 49981 49980 49979 49978 49977 49976 49975 49983 49973 49972...
result:
ok answer = 300000
Test #111:
score: 0
Accepted
time: 141ms
memory: 14040kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
100008 75024 50018 50017 50016 50015 50014 50013 50012 50011 50019 50009 50008 50007 50006 50005 50004 50003 50002 50028 50037 50036 50035 50034 50033 50032 50031 50030 50029 50038 50027 50026 50025 50024 50023 50022 50021 50020 50010 49982 49981 49980 49979 49978 49977 49976 49975 49983 49973 49972...
result:
ok answer = 300000
Test #112:
score: 0
Accepted
time: 190ms
memory: 14040kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
100008 50018 50017 50016 50015 50014 50013 50012 50011 50019 50009 50008 50007 50006 50005 50004 50003 50002 50028 50037 50036 50035 50034 50033 50032 50031 50030 50029 50038 50027 50026 50025 50024 50023 50022 50021 50020 50010 49982 49981 49980 49979 49978 49977 49976 49975 49983 49973 49972 49971...
result:
ok answer = 300000
Test #113:
score: 0
Accepted
time: 126ms
memory: 14020kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
100008 50018 50017 50016 50015 50014 50013 50012 50011 50019 50009 50008 50007 50006 50005 50004 50003 50002 50028 50037 50036 50035 50034 50033 50032 50031 50030 50029 50038 50027 50026 50025 50024 50023 50022 50021 50020 50010 49982 49981 49980 49979 49978 49977 49976 49975 49983 49973 49972 49971...
result:
ok answer = 300000
Test #114:
score: 0
Accepted
time: 109ms
memory: 14108kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
50017 75025 50016 50015 50014 50013 50012 50011 50019 50009 50008 50007 50006 50005 50004 50003 50002 50028 50037 50036 50035 50034 50033 50032 50031 50030 50029 50038 50027 50026 50025 50024 50023 50022 50021 50020 50010 49982 49981 49980 49979 49978 49977 49976 49975 49983 49973 49972 49971 49970 ...
result:
ok answer = 299999
Test #115:
score: 0
Accepted
time: 101ms
memory: 14044kb
input:
300000 150000 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...
result:
ok answer = 150000
Test #116:
score: 0
Accepted
time: 171ms
memory: 14076kb
input:
300000 150000 1 2 2 300000 1 3 3 300000 1 4 4 300000 1 5 5 300000 1 6 6 300000 1 7 7 300000 1 8 8 300000 1 9 9 300000 1 10 10 300000 1 11 11 300000 1 12 12 300000 1 13 13 300000 1 14 14 300000 1 15 15 300000 1 16 16 300000 1 17 17 300000 1 18 18 300000 1 19 19 300000 1 20 20 300000 1 21 21 300000 1 ...
output:
1 150000 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9 11 10 12 11 13 12 14 13 15 14 16 15 17 16 18 17 19 18 20 19 21 20 22 21 23 22 24 23 25 24 26 25 27 26 28 27 29 28 30 29 31 30 32 31 33 32 34 33 35 34 36 35 37 36 38 37 39 38 40 39 41 40 42 41 43 42 44 43 45 44 46 45 47 46 48 47 49 48 50 49 51 50 52 51 53...
result:
ok answer = 299999
Test #117:
score: 0
Accepted
time: 167ms
memory: 13928kb
input:
300000 150000 1 2 3 300000 1 3 4 300000 1 4 5 300000 1 5 6 300000 1 6 7 300000 1 7 8 300000 1 8 9 300000 1 9 10 300000 1 10 11 300000 1 11 12 300000 1 12 13 300000 1 13 14 300000 1 14 15 300000 1 15 16 300000 1 16 17 300000 1 17 18 300000 1 18 19 300000 1 19 20 300000 1 20 21 300000 1 21 22 300000 1...
output:
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 ...
result:
ok answer = 300000
Test #118:
score: 0
Accepted
time: 132ms
memory: 12232kb
input:
300000 151658 8 10 9 10 1 6 8 10 7 10 3 9 8 9 9 10 3 5 1 8 9 10 7 8 3 4 8 9 5 6 8 9 1 8 3 5 7 10 2 5 9 10 2 4 1 9 2 3 7 10 3 7 8 10 4 7 9 10 4 5 2 10 2 4 6 10 6 10 3 4 2 3 1 2 9 10 7 8 8 10 7 10 9 10 6 10 1 7 3 7 8 10 3 6 9 10 6 10 5 8 7 9 3 10 1 4 8 9 9 10 4 7 3 9 4 6 1 7 2 10 7 9 3 4 2 3 2 6 6 10 ...
output:
99109 100378 66612 88646 58056 133357 88648 101600 38185 133358 101597 110356 20207 88656 51906 88659 106220 38190 58085 41932 101591 23944 133359 11430 58011 92526 88620 77431 101625 29174 133360 23722 40375 40376 20222 11295 15 101624 116100 88625 58047 101619 40377 66897 92569 88633 62530 101615 ...
result:
ok answer = 285014
Test #119:
score: 0
Accepted
time: 107ms
memory: 12292kb
input:
300000 161017 8 10 7 8 8 10 7 9 7 10 9 10 3 10 1 4 9 10 2 9 7 10 7 10 8 9 7 9 1 5 6 10 3 10 2 4 1 2 1 6 6 9 1 8 6 9 5 6 7 8 9 10 8 9 1 5 7 10 9 10 1 3 3 6 9 10 2 9 3 4 1 10 4 5 9 10 8 10 3 10 1 2 6 9 5 6 7 9 1 9 8 9 7 9 5 10 8 9 8 10 1 3 7 10 4 7 8 10 5 8 8 9 5 9 3 4 8 9 8 10 8 10 1 10 4 7 3 4 9 10 ...
output:
67420 107821 67689 54112 54101 105462 133843 13692 105461 133844 54045 54039 67709 54073 26317 37245 133845 18231 552 44178 37276 105748 37192 53863 114721 105407 68504 26280 54167 105545 4879 57173 105543 133846 17390 133847 34383 105594 68338 133848 559 37092 53866 54183 133849 68704 54132 23961 6...
result:
ok answer = 294859
Test #120:
score: 0
Accepted
time: 119ms
memory: 12200kb
input:
300000 157295 1 2 3 7 5 6 8 9 3 9 4 6 4 7 8 9 2 7 9 10 1 6 8 10 3 4 9 10 9 10 2 3 2 4 9 10 4 6 9 10 5 10 6 10 9 10 4 5 8 9 3 10 1 9 2 10 2 4 5 8 4 6 9 10 5 8 1 5 1 9 1 7 5 10 6 9 3 4 2 5 8 9 8 9 1 10 2 9 9 10 2 3 8 9 3 4 4 7 5 8 9 10 5 10 5 9 5 8 2 7 9 10 4 8 4 9 5 8 5 8 9 10 2 4 7 9 4 10 5 10 5 7 2...
output:
938 99062 46699 67828 133690 58090 88795 67823 89107 100756 45911 67818 19238 100668 100685 8673 18053 100682 58095 100748 15705 40152 101085 34042 67544 2073 133691 133692 18077 101787 58097 100903 101776 27045 133693 71184 15933 40226 19235 34234 68270 68357 133694 133695 100778 8683 67966 19234 8...
result:
ok answer = 290984
Test #121:
score: 0
Accepted
time: 132ms
memory: 12232kb
input:
300000 152600 6 10 6 7 1 2 1 6 4 7 3 7 3 10 8 10 1 10 6 10 1 8 6 7 9 10 1 2 5 8 8 10 9 10 7 10 5 9 3 10 3 4 2 5 2 9 6 8 6 8 3 4 1 8 7 8 5 8 8 10 9 10 2 3 4 6 6 8 1 10 3 4 4 7 6 10 6 10 5 10 4 10 7 8 5 8 8 9 2 3 4 5 1 10 7 10 2 10 5 10 2 6 9 10 3 5 3 6 3 4 7 10 9 10 1 2 5 7 4 8 5 9 9 10 9 10 4 10 9 1...
output:
32114 81215 1356 48659 89013 84939 133719 95796 133720 32110 104400 81277 101101 1352 106318 95865 101123 56741 16662 133721 18126 25576 133722 133252 120474 18121 123238 109492 106310 95835 101247 4182 60786 125838 133723 18133 89084 32105 32159 16593 3908 116144 106246 95626 4177 35284 133724 5673...
result:
ok answer = 286318