QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#58475 | #1173. Knowledge Is... | vme50 | AC ✓ | 247ms | 22564kb | C++14 | 1.1kb | 2022-10-26 16:49:29 | 2022-10-26 16:49:32 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define N 300005
int n,m,ps[N],ans[N];
struct Range
{
int l,r,id;
bool operator < (Range t) const
{return l==t.l?r<t.r:l<t.l;}
}a[N];
struct Node
{
int x,id;
bool operator < (Node t) const
{return x==t.x?id<t.id:x<t.x;}
};set<Node> z1,z2;
int main()
{
scanf("%d %d",&n,&m);
for(int i=1;i<=n;++i)
scanf("%d %d",&a[i].l,&a[i].r),a[i].id=i;
sort(a+1,a+n+1);
for(int i=1,l,r,id;i<=n;++i)
{
l=a[i].l;r=a[i].r;id=a[i].id;
set<Node>::iterator it;
if(!z1.empty())
{
it=z1.lower_bound((Node) {l,0});
if(it!=z1.begin())
{
--it;ps[id]=it->id;z1.erase(it);
z2.insert((Node) {r,id});continue;
}
}
if(!z2.empty())
{
it=z2.begin();
if(r>it->x)
{
ps[id]=ps[it->id];ps[it->id]=0;
z1.insert(*it);z2.erase(it);
z2.insert((Node) {r,id});continue;
}
}z1.insert((Node) {r,id});
}
for(int i=1;i<=n;++i) if(ps[i])
ans[i]=ans[ps[i]]=++ans[0];
for(int i=1;i<=n;++i) if(!ans[i]) ans[i]=++ans[0];
for(int i=1;i<=n;++i)
printf("%d ",ans[i]<=m?ans[i]:0);return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3656kb
input:
7 5 9 10 7 9 3 4 9 10 2 6 8 9 5 8
output:
1 4 3 2 2 3 1
result:
ok answer = 7
Test #2:
score: 0
Accepted
time: 2ms
memory: 3764kb
input:
2 2 1 2 3 4
output:
1 1
result:
ok answer = 2
Test #3:
score: 0
Accepted
time: 2ms
memory: 3780kb
input:
2 1 1 2 2 3
output:
1 0
result:
ok answer = 1
Test #4:
score: 0
Accepted
time: 2ms
memory: 3728kb
input:
1 1 4 26
output:
1
result:
ok answer = 1
Test #5:
score: 0
Accepted
time: 2ms
memory: 3752kb
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:
48 1 119 2 3 4 120 24 5 121 122 6 7 8 79 123 124 125 9 10 80 11 12 13 126 127 128 129 14 130 15 78 16 17 18 81 131 132 44 82 133 19 134 83 13 135 20 43 136 84 21 22 23 77 24 25 26 137 12 91 27 28 29 138 30 92 139 140 141 31 85 142 143 144 145 40 146 147 148 149 150 151 104 36 5 152 32 153 154 155 15...
result:
ok answer = 376
Test #6:
score: 0
Accepted
time: 2ms
memory: 3824kb
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:
230 1 231 2 3 4 232 218 194 5 233 234 25 235 236 6 237 7 238 215 239 240 241 61 242 8 9 0 10 0 0 21 32 11 109 12 159 106 13 226 14 15 113 65 130 15 178 16 0 103 0 224 17 53 18 0 19 20 172 12 21 19 22 0 131 23 154 132 0 24 133 25 0 26 101 27 136 140 209 0 142 143 28 18 29 30 14 31 32 0 89 0 146 33 34...
result:
ok answer = 471
Test #7:
score: 0
Accepted
time: 0ms
memory: 3812kb
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:
1 145 2 174 172 217 3 4 5 125 187 219 6 7 8 9 136 10 11 12 13 3 14 204 15 57 64 16 17 157 23 188 89 155 31 18 19 20 21 22 176 23 24 25 41 42 110 218 120 24 26 27 161 28 4 88 100 29 30 31 232 32 190 33 34 35 36 171 37 38 39 40 41 193 42 248 158 43 44 45 9 46 47 226 48 162 63 230 213 49 22 225 32 242 ...
result:
ok answer = 500
Test #8:
score: 0
Accepted
time: 0ms
memory: 3808kb
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:
1 103 2 64 3 4 5 119 6 7 8 62 48 9 10 246 139 11 12 13 14 15 136 16 17 154 58 224 18 19 10 20 21 162 61 130 22 23 24 25 147 26 90 45 27 28 29 30 31 109 32 33 195 146 34 41 35 36 37 1 38 165 3 144 39 94 149 216 40 101 231 104 41 79 128 182 42 37 167 29 237 43 50 2 44 45 56 166 46 14 47 48 49 50 51 14...
result:
ok answer = 500
Test #9:
score: 0
Accepted
time: 2ms
memory: 3796kb
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:
31 1 2 229 3 4 5 118 151 247 242 56 222 111 6 145 112 68 27 249 119 238 7 8 208 9 10 11 12 13 106 14 15 176 221 237 51 144 16 17 18 19 104 20 21 166 22 6 210 23 217 215 24 11 195 25 26 27 245 28 138 216 29 167 30 134 103 31 32 33 34 12 35 125 36 71 156 108 37 38 116 39 198 40 41 189 248 42 136 66 43...
result:
ok answer = 500
Test #10:
score: 0
Accepted
time: 3ms
memory: 3812kb
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:
1 2 3 28 170 48 4 5 6 92 7 8 9 37 108 10 11 68 173 63 12 220 13 131 14 15 16 122 160 17 18 241 19 20 21 223 143 22 177 201 23 38 120 24 25 150 26 27 189 28 85 231 245 29 30 31 32 33 209 34 224 202 187 35 94 36 127 37 38 39 236 215 40 41 69 42 43 142 43 124 44 45 86 178 197 46 72 47 48 49 229 149 119...
result:
ok answer = 500
Test #11:
score: 0
Accepted
time: 2ms
memory: 3732kb
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:
184 1 90 79 2 140 3 221 4 5 248 6 17 7 8 9 10 11 12 141 13 201 191 42 54 14 15 177 16 180 17 18 19 102 20 103 21 22 23 72 31 24 23 25 233 26 105 65 27 28 189 83 29 98 30 57 31 32 33 183 34 35 126 172 151 202 36 45 37 13 38 39 108 81 122 40 41 243 42 43 44 45 46 114 47 127 48 101 49 228 129 50 51 136...
result:
ok answer = 500
Test #12:
score: 0
Accepted
time: 1ms
memory: 3808kb
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:
1 2 207 3 238 4 165 5 6 7 25 8 56 9 134 121 177 10 1 250 61 34 11 206 12 163 13 14 15 16 243 111 74 178 123 17 18 19 20 21 101 22 23 230 189 36 24 25 26 209 27 33 225 237 223 28 29 132 30 31 66 32 33 34 47 197 35 36 103 159 37 38 136 113 176 39 69 40 41 42 93 183 43 62 10 44 45 9 46 5 47 117 210 205...
result:
ok answer = 500
Test #13:
score: 0
Accepted
time: 3ms
memory: 3848kb
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:
1 2 241 3 172 178 149 246 160 164 222 4 5 76 244 6 7 8 174 11 120 9 10 11 124 12 13 14 15 38 213 184 168 214 86 235 177 16 17 78 49 18 77 119 19 56 141 20 97 21 22 40 23 24 249 25 26 132 27 116 28 29 228 7 126 30 191 31 32 33 243 34 32 35 75 36 67 52 37 38 39 40 41 42 43 188 47 183 146 134 44 45 171...
result:
ok answer = 500
Test #14:
score: 0
Accepted
time: 2ms
memory: 3808kb
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:
1 2 3 69 3 142 67 46 4 5 6 189 7 8 96 122 34 241 9 10 200 11 64 12 12 94 13 14 15 16 110 214 45 152 17 18 19 90 172 20 21 13 231 57 22 23 182 153 123 24 25 26 27 28 29 30 51 7 156 31 32 187 33 34 185 35 106 204 170 36 37 109 38 39 158 40 41 42 43 41 31 48 44 221 82 229 27 225 45 107 46 47 48 53 18 1...
result:
ok answer = 500
Test #15:
score: 0
Accepted
time: 2ms
memory: 3796kb
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: 2ms
memory: 3900kb
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 1 2 3 107 108 4 5 6 109 7 8 110 111 50 112 113 74 9 10 11 114 12 13 14 115 116 48 117 101 15 41 118 119 120 47 121 16 19 17 18 46 122 123 19 20 124 21 22 125 126 127 23 128 42 129 130 131 132 133 134 135 136 45 100 137 44 138 139 43 140 141 51 142 143 144 145 68 146 67 24 25 147 28 148 149 1...
result:
ok answer = 483
Test #17:
score: 0
Accepted
time: 2ms
memory: 3816kb
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 1 171 223 184 2 3 80 98 4 224 225 5 6 226 207 89 7 8 139 227 9 10 11 228 12 229 70 13 4 77 87 14 15 230 16 88 231 232 16 17 27 233 234 92 99 101 18 102 19 104 20 235 21 22 23 108 161 110 111 79 236 112 24 237 25 156 113 137 131 180 26 27 28 32 132 39 238 29 239 30 31 32 33 34 240 114 17 141 35 4...
result:
ok answer = 494
Test #18:
score: 0
Accepted
time: 0ms
memory: 3808kb
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:
1 2 9 188 68 3 100 167 211 4 5 6 106 7 8 126 219 9 235 10 159 228 11 173 54 12 13 14 15 75 96 16 17 89 88 34 119 18 201 107 172 19 20 116 21 22 22 142 23 102 137 111 24 25 26 206 27 28 29 30 31 32 33 47 5 34 35 36 37 10 38 232 39 169 40 41 63 42 43 14 44 45 46 155 118 74 47 138 157 121 156 48 202 49...
result:
ok answer = 500
Test #19:
score: 0
Accepted
time: 2ms
memory: 3680kb
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:
15 1 2 198 3 4 5 110 6 7 240 8 162 249 84 9 79 10 11 128 23 12 114 13 14 15 16 8 247 17 18 73 19 85 20 131 115 21 22 242 143 34 23 5 24 25 217 194 26 119 52 178 21 27 28 29 133 30 189 149 224 31 32 165 33 34 35 36 111 37 117 66 48 113 158 38 39 45 40 41 42 190 43 96 94 226 44 83 45 144 99 212 195 76...
result:
ok answer = 500
Test #20:
score: 0
Accepted
time: 2ms
memory: 3816kb
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:
1 2 3 4 224 5 6 63 69 66 22 49 133 126 152 55 7 89 8 26 9 82 183 197 10 11 12 131 129 13 182 14 8 234 15 122 41 16 93 149 17 18 19 20 21 22 23 24 43 25 210 26 155 172 65 238 27 198 108 191 28 90 29 30 31 32 33 34 19 35 36 37 38 39 124 40 148 41 118 27 42 43 44 45 46 47 48 211 67 4 49 50 51 52 244 53...
result:
ok answer = 500
Test #21:
score: 0
Accepted
time: 2ms
memory: 3848kb
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:
31 1 199 32 2 3 4 5 6 7 8 9 10 95 224 11 248 106 229 12 246 164 166 13 14 134 15 154 196 133 60 76 70 230 190 16 243 225 3 15 175 17 118 112 18 19 215 19 138 20 21 174 22 5 23 24 25 26 27 163 50 28 29 222 114 147 30 158 27 191 151 197 31 32 48 33 34 37 35 213 107 36 37 73 38 195 139 39 221 40 41 219...
result:
ok answer = 500
Test #22:
score: 0
Accepted
time: 2ms
memory: 3888kb
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:
1 58 211 66 2 167 3 4 5 244 6 7 16 210 8 9 204 138 121 34 10 11 102 186 159 240 11 42 188 12 17 13 14 136 77 15 16 191 76 17 141 18 19 20 27 21 22 31 23 24 98 25 198 22 112 182 26 67 27 28 205 29 26 30 31 206 79 209 32 33 34 35 36 176 37 38 152 39 40 41 42 43 41 115 3 44 45 46 54 47 48 49 214 185 50...
result:
ok answer = 500
Test #23:
score: 0
Accepted
time: 2ms
memory: 3852kb
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:
89 115 1 2 3 62 4 5 175 6 218 110 111 249 58 203 7 113 8 9 10 72 11 116 146 12 13 224 14 15 85 222 8 65 12 16 2 163 17 18 108 130 197 19 172 20 21 22 192 134 23 70 24 210 25 26 27 28 29 30 117 24 31 141 32 217 94 33 137 34 6 245 35 205 36 76 233 37 38 159 39 26 40 41 118 42 96 43 74 44 45 46 47 48 4...
result:
ok answer = 500
Test #24:
score: 0
Accepted
time: 2ms
memory: 3848kb
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:
1 2 169 21 83 3 4 5 6 230 104 92 7 8 90 182 8 52 9 10 236 11 68 12 13 14 203 15 168 16 134 27 17 109 18 19 20 84 98 21 22 88 23 59 14 42 29 37 153 24 206 25 26 39 119 85 27 28 89 29 240 30 31 178 53 32 33 34 146 35 154 36 248 37 97 38 39 67 50 40 41 130 42 30 43 44 45 46 47 201 125 48 49 131 50 110 ...
result:
ok answer = 500
Test #25:
score: 0
Accepted
time: 2ms
memory: 3852kb
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:
214 1 191 201 111 166 90 2 87 3 77 4 180 5 6 7 8 9 10 11 208 240 12 80 160 226 69 13 44 68 14 19 15 16 17 18 178 19 120 20 57 21 22 13 23 27 24 185 122 25 63 26 217 27 108 28 121 78 29 207 30 31 15 179 16 7 4 32 33 211 34 134 35 154 36 37 38 39 40 230 176 41 42 43 44 45 46 47 48 96 49 50 51 75 52 66...
result:
ok answer = 500
Test #26:
score: 0
Accepted
time: 3ms
memory: 3856kb
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: 2ms
memory: 3800kb
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 1 2 3 107 108 4 5 22 109 6 110 111 112 113 21 7 8 114 115 20 116 19 117 118 9 18 23 119 10 11 120 12 13 60 121 122 123 16 14 124 15 125 126 15 127 128 16 14 17 18 129 13 19 130 131 20 132 12 11 133 134 135 21 9 136 22 137 3 138 139 140 8 141 7 23 6 142 143 144 145 146 147 148 149 150 151 152 153...
result:
ok answer = 500
Test #28:
score: 0
Accepted
time: 3ms
memory: 3680kb
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:
1 199 118 2 6 3 138 204 205 206 207 208 142 209 210 139 211 212 4 213 214 5 215 216 217 6 7 149 218 143 219 189 220 221 222 223 224 225 226 227 8 228 229 230 9 231 133 107 10 232 233 123 11 234 235 236 119 237 12 13 238 14 15 120 16 239 97 41 136 17 18 31 240 19 241 20 137 21 22 23 242 24 38 243 25 ...
result:
ok answer = 500
Test #29:
score: 0
Accepted
time: 2ms
memory: 3896kb
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:
99 1 2 3 4 8 14 5 232 76 6 56 7 49 86 161 242 8 51 154 9 80 148 133 121 240 106 64 10 11 250 12 103 13 75 14 172 181 15 3 62 244 124 234 25 50 16 180 139 126 83 17 179 155 18 7 156 196 19 135 130 20 21 31 22 159 70 183 167 23 24 25 26 27 245 188 107 28 29 203 30 31 184 32 217 239 33 34 72 35 36 37 1...
result:
ok answer = 500
Test #30:
score: 0
Accepted
time: 2ms
memory: 3796kb
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:
134 1 67 152 2 59 11 3 153 111 191 4 5 27 6 7 24 226 8 233 41 9 221 10 11 29 12 217 13 138 107 14 15 10 16 17 18 19 20 118 21 22 46 23 24 129 247 25 98 94 26 37 185 76 27 175 160 28 192 29 30 113 31 32 33 34 35 36 37 121 236 1 131 38 210 13 39 40 41 42 82 43 234 23 241 202 237 44 45 184 46 47 48 49 ...
result:
ok answer = 500
Test #31:
score: 0
Accepted
time: 2ms
memory: 3732kb
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:
1 217 104 14 206 50 154 2 124 3 4 233 127 5 8 250 171 6 7 41 8 90 172 9 249 173 78 10 164 58 11 243 53 12 77 13 14 225 27 17 15 16 71 101 31 17 52 18 19 185 62 61 20 21 128 63 22 156 132 23 70 39 24 25 155 26 27 244 11 213 28 30 42 98 29 237 176 30 31 32 33 34 35 36 37 115 38 56 39 76 223 40 179 219...
result:
ok answer = 500
Test #32:
score: 0
Accepted
time: 3ms
memory: 3884kb
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:
1 2 65 39 3 81 4 5 6 7 8 202 119 41 9 169 122 149 10 217 11 207 196 12 170 13 63 32 14 109 60 27 15 144 200 5 16 197 155 17 18 102 19 20 50 162 43 2 118 199 124 145 21 93 49 186 107 22 227 23 24 25 248 26 27 28 29 132 30 31 32 88 33 34 35 181 36 37 38 39 23 40 41 42 43 44 45 212 46 47 48 49 104 121 ...
result:
ok answer = 500
Test #33:
score: 0
Accepted
time: 3ms
memory: 3808kb
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:
181 176 167 16 1 2 3 4 77 5 6 7 8 9 5 206 10 11 12 13 14 233 15 16 53 17 103 18 220 19 20 224 155 21 81 7 22 86 23 24 25 91 26 200 27 28 19 29 30 150 31 32 117 33 34 180 228 35 36 171 112 37 38 61 126 131 50 39 40 145 41 246 154 42 43 47 44 45 46 208 219 83 153 47 48 157 49 183 87 68 26 50 82 51 52 ...
result:
ok answer = 500
Test #34:
score: 0
Accepted
time: 2ms
memory: 3852kb
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:
1 39 2 150 3 4 220 8 127 70 61 5 6 7 8 52 9 10 229 11 12 204 107 115 157 13 134 44 21 14 15 145 106 41 16 17 18 19 81 20 27 21 22 23 24 25 20 5 197 26 27 96 237 51 28 146 221 132 29 30 31 144 32 33 166 238 34 163 225 35 234 162 32 36 218 137 37 199 190 38 39 40 41 92 42 249 43 44 15 104 45 46 47 243...
result:
ok answer = 500
Test #35:
score: 0
Accepted
time: 3ms
memory: 3812kb
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:
161 179 1 2 168 3 226 4 117 126 5 6 7 8 9 94 240 189 10 222 191 73 11 182 159 12 13 84 34 14 15 83 82 112 197 16 17 39 49 18 19 60 20 170 21 57 105 22 23 24 25 26 27 28 115 220 29 89 201 77 150 30 31 32 61 33 34 28 67 35 36 33 37 38 39 40 41 166 12 42 80 74 43 22 44 45 239 7 46 90 195 47 194 151 48 ...
result:
ok answer = 500
Test #36:
score: 0
Accepted
time: 2ms
memory: 3884kb
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:
1 2 3 4 5 6 7 216 198 8 1 9 10 41 211 50 206 110 11 247 168 12 13 18 149 14 176 23 78 177 245 169 11 201 155 15 16 17 18 196 55 73 77 19 114 20 21 105 44 43 203 91 22 146 130 23 24 238 49 167 25 26 27 28 39 29 30 151 31 32 52 54 33 207 202 34 153 35 75 36 28 185 132 37 248 20 150 38 109 152 179 39 4...
result:
ok answer = 500
Test #37:
score: 0
Accepted
time: 2ms
memory: 3852kb
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: 150ms
memory: 20648kb
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 35908 37186 35909 62463 62464 53816 1 2 62465 3 4 62466 5 62467 6 62468 62469 62470 62471 7 8 35907 9 10 62472 11 35869 62473 62474 35366 62475 62476 12 62477 62478 62479 35365 13 14 15 62480 62481 62482 16 62483 31694 62484 62485 35364 35363 62486 62487 62488 35362 17 62489 35872 18 62490 19 ...
result:
ok answer = 230231
Test #39:
score: 0
Accepted
time: 181ms
memory: 17416kb
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:
133729 1 133730 90974 133731 133732 133733 133734 2 133735 3 133736 4 5 83879 133737 577 6 7 133738 107243 133739 8 133740 133741 118094 133742 9 10 103236 133743 133744 129087 128143 133745 11 133746 12 133747 21909 97161 133748 13 14 15 133749 16 133750 17 133751 18 133752 19 133753 133754 133755 ...
result:
ok answer = 292561
Test #40:
score: 0
Accepted
time: 188ms
memory: 16744kb
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:
143617 84839 1 2 116160 3 33552 4 9877 92830 5 6 44984 9621 105323 140344 35246 7 41240 132717 8 148035 9 44971 10 11 12 13 14 292 15 16 17 12106 83706 46240 103153 1208 126968 18 146388 135214 50254 140529 60662 19 90831 126233 20 741 148458 116621 21 22 23 64065 76393 95577 24 50630 25 125305 26 8...
result:
ok answer = 299930
Test #41:
score: 0
Accepted
time: 205ms
memory: 16600kb
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:
1 76060 2 3 39916 4 5 6 7 8 96343 9 10 32833 39244 86663 11 81882 39107 147021 12 13 14 20274 15 16 17 18 19 20 66281 21 68813 22 15110 23 107073 24 25 78069 104738 75909 81937 26 27 28 29 48529 30 31 32 33 106881 14348 37925 116094 26220 34 142947 35 3292 15417 44472 36 25762 5981 72531 110445 37 3...
result:
ok answer = 300000
Test #42:
score: 0
Accepted
time: 228ms
memory: 16700kb
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:
8447 1 82973 2 20228 98220 61916 3 4 56787 89152 5 6 33068 63354 7 72667 8 9 41966 91154 10 11 12 13 17916 14 7130 3757 18381 20156 7827 15 110255 16 26775 36712 17 145940 18 19 36424 106264 20 92504 21 47183 22 65404 23 24 25 26 27 28 50065 22326 36176 12371 44213 18895 29 30 31 32 77591 33 34 6583...
result:
ok answer = 300000
Test #43:
score: 0
Accepted
time: 196ms
memory: 16700kb
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:
21917 1 6144 2 3 4 41573 5 123071 6 7 66340 8 9 14186 69533 10 58923 128382 53810 11 123719 124693 87913 12 19666 115091 149087 87967 80379 83066 13 14 94774 15 129507 16 123504 17 18 92582 136529 19 20 40064 21 30068 24969 22 23 3854 36845 24 59482 35063 107258 25 26 61814 69535 27 28 146453 77925 ...
result:
ok answer = 300000
Test #44:
score: 0
Accepted
time: 221ms
memory: 16624kb
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:
128315 1 2 61504 3 15568 4 5 135493 104108 6 101012 116786 130643 7 8 9 132379 10 26019 146239 112589 123148 11 116197 117024 10256 83229 119846 12 113034 13 14 15 16 118111 22289 81147 17 18 136348 104889 91129 19 20536 20 21 22 23 55745 24 53155 25 13917 26 27 28 72517 29 50944 30 43443 24030 8927...
result:
ok answer = 300000
Test #45:
score: 0
Accepted
time: 237ms
memory: 16664kb
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:
104824 23947 1 82147 65002 132897 10132 2 8158 48923 84820 28327 3 42985 56042 4 5 49761 131028 6 7 97759 45742 8 138746 24385 118498 126749 79337 9 10 11 12 13 140905 16986 53064 14 15 16 17 53991 76393 136305 18 115626 19 46103 20 21 22 133085 77608 44376 34181 104939 14820 23 24 8320 124293 14038...
result:
ok answer = 300000
Test #46:
score: 0
Accepted
time: 202ms
memory: 16660kb
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:
116166 38807 109971 116126 1 2 3 4 5 6 21386 114430 7 6452 8 9 114916 28700 10 11 143448 63940 12 13 13108 14 15 120973 2894 16 17 18 7624 96639 19 144882 20 21 126035 25356 22 115797 134915 23 24 50837 25 119112 26 27 28 29 30 31 45746 80424 32 33 123141 51156 34 87349 101437 35 36 16044 37 35781 3...
result:
ok answer = 300000
Test #47:
score: 0
Accepted
time: 247ms
memory: 16748kb
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:
1 34001 2 56880 3 62616 4 83759 5 102405 106855 49429 112711 39647 124819 6 126220 7 8 9 10 11 99357 106660 17523 12 39002 13 14 47912 64202 113164 15 136679 16 17 111554 103676 123936 18 19 20 50548 21 34498 45224 38695 22 23 73293 24 140651 25 85258 26 145600 31939 27 13121 84597 83566 110728 28 1...
result:
ok answer = 300000
Test #48:
score: 0
Accepted
time: 131ms
memory: 22564kb
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: 127ms
memory: 20660kb
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 35308 62456 35307 62457 53468 62458 1 62459 2 62460 46606 62461 62462 62463 35306 35305 3 4 62464 35304 35905 62465 35309 62466 5 62467 62468 62469 62470 62471 62472 6 62473 62474 62475 62476 7 8 62477 35289 62478 62479 62480 9 35288 62481 10 62482 11 35287 62483 62484 35286 62485 62486 ...
result:
ok answer = 296054
Test #50:
score: 0
Accepted
time: 154ms
memory: 17392kb
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:
1 129682 2 37265 2729 133688 121145 56587 133689 111010 124511 133690 133691 3 4 5 6 7 86819 8 9 15738 10 11 12 13 133692 133693 15737 14 91667 133694 98558 111025 15 39821 133695 133696 16 17 88957 133697 18 133698 19 133699 133700 133701 20 21 5183 72500 133702 22 133703 62679 23 28512 133297 24 1...
result:
ok answer = 290604
Test #51:
score: 0
Accepted
time: 188ms
memory: 16704kb
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:
1 19780 2 12233 3 53150 66687 117384 4 22809 135446 86999 5 6 78380 7 8 39242 9 10 11 8477 107321 96569 12 13 127873 19328 84620 60129 125084 14 121522 15 16 148341 17 18 45471 28923 19 20 111481 21 22 23 60728 28261 24 87647 25 12248 26 27 28 29 30 31 76207 92815 32 91758 70110 12090 33 34 10352 35...
result:
ok answer = 299989
Test #52:
score: 0
Accepted
time: 201ms
memory: 16640kb
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:
1 90664 2 89961 3 4 124345 133052 3191 146507 50954 123385 5567 133363 120473 127712 105485 127143 5 6 52712 7 67360 8 9 116669 10 34590 11 102526 12 13 14 15 16 66326 97927 74940 17 92295 18 19 20 21 116218 22 23 34929 24 25 54134 31549 26 68501 143266 27 28 30649 29 30 31 32 144396 33 34 149691 35...
result:
ok answer = 299998
Test #53:
score: 0
Accepted
time: 222ms
memory: 16664kb
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:
40043 1 149836 2 3 26015 4 456 110895 26519 111775 5 21732 6 7 8 9 10 34118 11 12 88313 121581 13 126754 124743 104183 14 15 16 87506 17 17597 71330 71656 18 19 20 21 22 23 24 141624 36118 25 99923 26 27 28 29 30 104253 31 32 746 33 122479 124956 100161 90547 34 35 126276 84912 94895 50056 36 37 38 ...
result:
ok answer = 299999
Test #54:
score: 0
Accepted
time: 200ms
memory: 16596kb
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:
1 102969 2 3 4 46469 5 6 46994 8783 1561 17199 27563 29486 48488 7 69527 6039 8 9 39363 10 49221 138653 116178 11 12 13 75350 14 15 16 30226 100999 17 131867 18 134129 20010 19 20 21 22 23 24 25 26 27 28 1555 29 70886 30 139080 31 140022 32 54936 143314 104531 15776 5339 140007 68646 90148 141974 33...
result:
ok answer = 300000
Test #55:
score: 0
Accepted
time: 229ms
memory: 16600kb
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:
1 51500 2 3 86472 18564 4 83165 74726 95544 5 6 7 8 9 28262 10 11 91329 84248 12 13 14 15 16 76471 17 95855 58359 15624 18 19 28112 20 21 22 23 133043 114681 24 1583 25 14807 26 143336 27 28 80438 29 98066 111767 53760 30 31 32 138715 33 73852 115012 34 35 86974 80733 36 37 38 39 40 23582 41 108786 ...
result:
ok answer = 300000
Test #56:
score: 0
Accepted
time: 225ms
memory: 16664kb
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:
1 61916 5518 14881 87573 2 3 4 5 6 7 133867 8 62289 9 29963 10 11 12 13 14 15 127573 16 17 146894 18 19 20 104965 140646 25158 21 35157 22 19676 25260 23 24 79594 25 100250 26 27 28 64009 126263 29 71752 30 31 32 114623 76522 66730 5846 33 34 35 111597 36 37 38 54943 39 32750 40 106277 41 131064 300...
result:
ok answer = 300000
Test #57:
score: 0
Accepted
time: 223ms
memory: 16584kb
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:
1 8906 45039 2 66449 46142 3 4 5 6 7 8 115230 9 13433 43127 10 142678 11 47909 135153 12 13 14 15 16 17 45997 110918 18 84792 32252 74657 19 67259 20 21 22 23 136530 24 640 44434 134371 20731 21107 25 26 114307 27 48769 28 122019 104759 39156 29 17866 30 31 32 33 13225 34 35 36 118254 37 38 45517 14...
result:
ok answer = 300000
Test #58:
score: 0
Accepted
time: 245ms
memory: 16584kb
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:
1 2 3 4 5 6 7 8 9 30363 10 33136 17422 77353 11 84786 119116 12 13 49196 14 30535 51228 15 27339 8438 16 54468 91183 130048 17 18 80324 19 20 21 47276 22 23 24 30394 25 61411 26 63957 27 68384 28 61582 118421 29 30 31 32 33 64820 34 35 137037 29684 37216 36 35624 37 38 39 40 41 42 5477 4846 43 44 45...
result:
ok answer = 300000
Test #59:
score: 0
Accepted
time: 138ms
memory: 22520kb
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: 123ms
memory: 20772kb
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:
23501 62547 1 62548 2 62549 3 62550 62551 33843 62552 62553 4 62554 5 62555 62556 62557 33842 62558 62559 62560 62561 62562 62563 62564 62565 62566 62567 33841 23834 62568 6 62569 7 8 9 10 62570 33840 62571 11 12 62572 13 14 62573 62574 35440 62575 17102 62576 62577 62578 62579 15 16 17 18 33838 338...
result:
ok answer = 148740
Test #61:
score: 0
Accepted
time: 144ms
memory: 17440kb
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:
1 2 3 4 5 3309 18129 6 99822 7 8 117709 9 133778 133779 10 11 12 133780 133781 13 14 80555 15 39856 133782 16 93274 17 18 19 20 21 17672 22 23 133783 24 133784 25 133785 111900 78518 39549 105820 26 27 133786 28 29 28255 99399 30 31 32 107492 133787 34441 33 47777 50471 133788 133789 34 35 36 133790...
result:
ok answer = 275741
Test #62:
score: 0
Accepted
time: 195ms
memory: 16704kb
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:
121650 129729 1 50467 57949 2 30009 3 4 121965 5 6 7 84141 8 101950 74800 9 10 11 12 13 14 15 32307 16 17 18 19 20 60548 21 22 73750 23 65411 24 125068 25 26 27 28 29 30 75546 31 32 33 34 102482 35 21835 124942 137030 143613 36 37 38 63054 78088 39 40 41 55476 73490 42 55628 43 44 69611 45 36340 106...
result:
ok answer = 299817
Test #63:
score: 0
Accepted
time: 195ms
memory: 16644kb
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:
1 120041 90668 2 3 24247 4 5 6 63928 7 43251 8 82843 9 121773 10 2067 11 12 128250 36587 20802 13 14 15 82640 126656 16 2401 138670 17 95044 92146 126223 63853 2140 18 19 136850 20 66037 21 22 128760 123986 23 24 102588 31197 25 26 27 94330 28 32126 29 117993 132171 30 30756 114491 31 78861 32 33 34...
result:
ok answer = 299999
Test #64:
score: 0
Accepted
time: 221ms
memory: 16644kb
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:
1 126241 2 148443 3 143750 4 5 70008 6 7 65547 34332 8 111360 9 10 11 14652 12 13 142093 53691 10506 14 15 16 17 9065 18 17757 100359 19 20 21 21 28560 91184 22 49969 23 46099 24 25 119622 26 27 28 36725 129414 29 47610 30 31 32 24585 33 74935 18395 34 35 36 37 38 72613 39 40 27675 65331 77648 31742...
result:
ok answer = 300000
Test #65:
score: 0
Accepted
time: 221ms
memory: 16588kb
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:
1 113376 2 74466 3 4 24975 77348 91932 45453 5 6 59087 7 8 69521 9 147960 10 11 19352 53093 12 13 14 130477 135771 130089 15 28344 16 20766 17 44745 91779 18 13237 7586 23163 139942 26758 19 20 21 22 84830 23 135636 65599 24 34586 52960 119793 98776 25 51466 137842 96144 98056 24310 56501 112463 138...
result:
ok answer = 300000
Test #66:
score: 0
Accepted
time: 211ms
memory: 16648kb
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:
135223 1 7706 2 3 4 77995 106684 5 34686 51712 6 7 8 142435 54164 9 31924 31513 10 11 12 13 24856 14 15 16 94215 17 36415 108014 1903 105963 146263 18 19 20 119175 21 110247 22 61816 23 87539 139727 24 138442 123801 25 6453 26 27 49286 28 46607 61100 29 72029 30 31 32 69171 33 88197 25897 34 27051 2...
result:
ok answer = 300000
Test #67:
score: 0
Accepted
time: 221ms
memory: 16664kb
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:
1 2 3 45999 9078 16310 4 67571 5 6 131610 33855 108080 7 181 8 9 10 11 3256 12 142763 13 14 15 74152 33007 16 17 18 106731 69494 19 20 21 22 23 62976 113777 40292 24 25 50293 117074 26 27 28 85026 29 44140 30 123431 34286 5219 116649 31 32 30412 33 74477 34 35 36 140648 78593 37 21930 23597 92438 38...
result:
ok answer = 300000
Test #68:
score: 0
Accepted
time: 231ms
memory: 16748kb
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:
63422 1 70168 46102 115171 2 3 31252 4 5 124135 2051 6 136093 12667 7 10574 97192 8 66119 22745 9 10 65673 11 12 123936 10808 13 14 15 23915 16 17 18 33456 19 138432 20 21 20188 59283 16764 22 23 15437 24 76863 83381 25 44203 92336 26 38191 27 70139 28 29 107506 30 94503 31 32 33 34 35 39326 36 37 3...
result:
ok answer = 300000
Test #69:
score: 0
Accepted
time: 239ms
memory: 16644kb
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:
20646 63107 25340 143766 143474 1 2 3 4 110904 5 6 7 38833 129656 8 145579 9 10 11 12 13 125727 14 15 107980 16 15171 98589 17 18 19 19648 3589 20 21 128015 50894 14151 22 57497 23 60318 9906 114525 24 129123 122485 144677 25 55707 26 27 81461 62696 24631 133676 28 29 89297 30 31 32 33 131230 34 123...
result:
ok answer = 300000
Test #70:
score: 0
Accepted
time: 106ms
memory: 22540kb
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: 122ms
memory: 20548kb
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:
11760 1 62573 11762 62574 11763 62575 62576 11766 2 62577 3 38991 62578 62579 4 5 6 62580 7 62581 8 62582 62583 62584 9 10 11767 62585 11768 11 62586 62587 62588 62589 12 62590 13 14 11769 11708 15 11772 62591 62592 16 42013 62593 62594 11773 17 18 62595 62596 62597 62598 62599 20038 62600 19 62601 ...
result:
ok answer = 297533
Test #72:
score: 0
Accepted
time: 163ms
memory: 17428kb
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:
110849 1 2 128764 128744 3 133576 4 106385 5 6 28919 92593 7 8 112502 9 93361 58463 48721 10 11 12 89029 133577 34492 56323 133578 13 133579 28917 27377 52227 14 101389 15 16 17 133580 133581 61065 18 19 133582 133583 51751 131720 20 21 56152 22 70205 23 24 92545 25 133584 26 133585 97585 133586 588...
result:
ok answer = 278039
Test #73:
score: 0
Accepted
time: 194ms
memory: 16672kb
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:
1 2 64890 3 8950 4 5 37548 6 148067 7 20889 9614 8 9 10 13700 11 12 58611 13 14 147736 15 52576 16 17 18 2953 19 20 21 22 23 24 25 117587 26 27 28 23964 125615 114449 14548 29 114145 70906 30 31 32 33 34 54726 87183 21115 95383 35349 35 28729 24260 36 37 41602 36976 37751 19963 42709 38 39 39704 791...
result:
ok answer = 299938
Test #74:
score: 0
Accepted
time: 217ms
memory: 16704kb
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:
1 2 3 4 5 6 7 8 9 10 11 12 678 70286 13 14 59489 15 140110 16 115188 17 18 56264 19 20 100653 21 33379 120922 49535 22 90385 101836 126512 23 27882 84235 24 133558 5064 25 140046 26 27 121481 9614 26346 28 29 30 31 32 33 111849 140092 34 69876 70125 98534 139131 35 36 18953 31519 37 35900 38 39 1773...
result:
ok answer = 299996
Test #75:
score: 0
Accepted
time: 226ms
memory: 16592kb
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:
1 2 38440 3 4 5 6 7 79138 8 131433 62767 41543 9 10 134817 11 139576 109998 146527 12 48719 75134 13 103064 14365 14 2938 15 16 17 18 19 124608 20 56127 21 57453 22 21627 23 51637 24 45139 127571 47111 44692 25 70335 32639 38330 119762 142114 79126 26 27 28 29 30 77044 31 5293 32 89266 757 107702 13...
result:
ok answer = 300000
Test #76:
score: 0
Accepted
time: 223ms
memory: 16700kb
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:
25665 1 128309 585 2 110023 3 4 140022 62912 120011 64195 121537 5 6 7 31697 8 9 10 100540 1022 110170 86258 49381 11 12 13 14 50426 121614 15 16 46192 17 18 106646 19 119466 20 21 145595 129030 68517 77537 115388 84568 121064 22 23 24 25 26 8840 13721 20919 21464 83455 87621 27 8629 28 29 32402 30 ...
result:
ok answer = 300000
Test #77:
score: 0
Accepted
time: 235ms
memory: 16660kb
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:
1 16860 2 139653 3 16317 4 58030 5 6 7 39874 8 9 135253 10 16410 68693 11 142702 73645 72475 12 43205 37957 133870 16940 13 14 62176 15 72011 81326 36412 93291 16 17 124047 27118 18 19 20 21 22 23 24 51692 114390 25 48276 26 132002 27 28 100448 29 30 120068 31 58119 32 33 75858 46680 34 35 63883 36 ...
result:
ok answer = 300000
Test #78:
score: 0
Accepted
time: 201ms
memory: 16660kb
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:
1 2 3 4 5 113656 57803 6 7 142674 82946 8 9 10 53539 11 12 51993 13 20920 14 67528 15 70689 105285 16 17 18 84747 1896 89133 21211 19 66392 80247 48228 54641 31315 20 21 22 23 41460 24 27858 33818 25 26 143339 133252 27 28 29 116722 30 87746 147417 31 32 104672 33 33765 16178 30226 34 51346 33809 92...
result:
ok answer = 300000
Test #79:
score: 0
Accepted
time: 237ms
memory: 16588kb
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:
1 12179 2 121883 3 110688 24983 4 5 147108 6 844 37439 7 41674 8 9 40809 92585 37848 10 141522 122774 14683 11 12 13 14 15 123236 43944 18262 16 119402 111650 4059 72699 109942 17 18 19 142797 20 48772 21 22 48812 54384 30979 35683 23 123833 24 25 26 92069 27 31479 38156 28 29 73613 74047 128628 144...
result:
ok answer = 300000
Test #80:
score: 0
Accepted
time: 213ms
memory: 16676kb
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:
1 70924 2 111389 3 4 5 31870 35983 129731 44677 24812 86148 60667 19484 6 7 8 9 12088 140346 10 38133 11 12 44363 13 14 135425 15 16 77092 125637 64366 17 138598 18 19 137657 65826 147595 142638 20 32765 21 22 68607 9463 23 24 25 39957 26 77582 44318 128804 27 135439 28 26708 29 69938 54989 138329 1...
result:
ok answer = 300000
Test #81:
score: 0
Accepted
time: 110ms
memory: 22492kb
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: 141ms
memory: 20684kb
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 1 11799 2 0 0 0 11801 3 0 11803 0 0 0 0 4 5 11805 6 0 0 0 0 0 0 11806 0 0 11809 0 0 11810 0 11831 7 0 0 0 11812 8 9 0 0 0 0 0 0 0 0 11814 11815 0 10 11816 0 11 11817 0 11818 11820 0 12 0 0 11821 11822 0 0 0 0 13 14 0 15 0 16 17 0 0 0 18 19 0 0 0 0 0 0 0 0 0 0 0 0 11823 20 0 0 21 0 0 0 22 11824 23 ...
result:
ok answer = 48024
Test #83:
score: 0
Accepted
time: 156ms
memory: 17532kb
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 1 61604 54632 0 0 20017 2 3 4 0 0 5 0 0 0 0 6 0 7 0 8 0 9 24108 24009 10 0 11 0 0 0 12 13 14 15 16 79691 17 18 19 20 0 0 0 21 0 22 60583 0 0 72272 66755 23 0 19936 24 25 26 27 28 29 30 31 0 32 0 0 33 34 0 0 68787 35 69127 0 0 36 37 38 39 40 41 26008 42 43 0 44 45 46 41636 0 0 54609 8956 0 47 13549...
result:
ok answer = 209982
Test #84:
score: 0
Accepted
time: 179ms
memory: 16664kb
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:
1 0 2 3 4 39627 0 0 33973 0 0 5 6 0 28586 7 0 0 8 0 46166 0 34138 9 39055 10 21783 24438 36223 11 12 13 14 0 22966 4143 0 15 0 0 0 16 17 0 18 19 20 0 21 22 23 18305 14673 0 24 25 0 0 26 0 27 0 0 0 0 0 28 29 30 31 0 0 0 12530 32 0 33 0 34 0 35 21213 0 0 31641 36 37 478 41703 0 38 39 0 40 0 41 42 43 4...
result:
ok answer = 94122
Test #85:
score: 0
Accepted
time: 198ms
memory: 16584kb
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:
1 2 0 5699 0 3 22480 4 0 0 0 5 0 0 6 0 0 7 8 0 7753 9 10 0 11 12 13 14 0 15 0 0 0 0 16 17 18 19 7396 0 20 21 22 23 0 23134 0 24 0 0 0 22856 0 0 0 25 0 0 26 27 28 29 30 31 32 33 34 23239 35 36 0 37 38 0 39 0 40 41 42 16944 43 44 0 0 0 0 0 45 46 18826 0 47 0 48 49 50 0 51 52 53 54 55 0 0 0 0 10676 178...
result:
ok answer = 48086
Test #86:
score: 0
Accepted
time: 227ms
memory: 16644kb
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:
1 0 2 3 4 28609 0 0 5 0 6 7 0 8 0 9 8161 10 11 12 0 13 0 0 14 15 16 17 0 36690 29306 18 19 20 10914 26565 0 21 22 23 0 3294 24 0 25 26 27 28 29 30 31 0 32 33 34 35 36 0 37 38 0 0 0 0 39 0 0 0 40 0 0 0 0 41 0 42 0 43 44 0 45 0 46 47 48 49 50 51 52 53 54 55 0 5864 0 31652 0 0 56 57 58 16437 59 0 0 617...
result:
ok answer = 78394
Test #87:
score: 0
Accepted
time: 229ms
memory: 16660kb
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:
1 0 2 3 4 0 0 0 0 0 0 5 0 0 6 0 0 0 7 0 8 0 0 9 10 11 0 0 0 12 13 0 0 14 15 16 17 18 0 19 20 21 0 11559 22 0 23 0 24 0 25 0 26 0 27 28 0 0 29 0 0 0 30 31 32 33 0 6036 34 0 0 0 35 36 37 0 38 39 40 0 0 0 41 42 43 44 45 0 0 46 47 48 49 0 50 51 52 0 53 0 0 54 55 56 57 58 59 60 61 7944 62 0 63 0 0 64 65 ...
result:
ok answer = 24016
Test #88:
score: 0
Accepted
time: 224ms
memory: 16736kb
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:
1 2 3 4 0 5 0 3696 0 6 7 22643 51477 8 9 10 0 11 12 13 0 0 14 15 16 17 18 19 0 0 8796 0 20 0 21 1248 22 23 0 0 24 0 25 16847 26 0 27 28 29 30 31 0 0 32 42814 33 34 0 0 35 0 0 36 0 0 37 0 5287 38 39 40 41 42 43 44 45 0 14428 46 0 47 0 48 49 50 51 52 0 53 44788 54 55 0 56 27174 57 0 34538 58 59 60 0 4...
result:
ok answer = 103886
Test #89:
score: 0
Accepted
time: 205ms
memory: 16628kb
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:
1 55324 0 47836 2 57028 42712 0 3 4 5 6 24882 0 7 4621 0 0 0 8 9 10 11 35935 12 13 46665 14 15 0 16 17 43839 18 89516 19 54525 74049 20 21 0 90260 22 0 23 0 36298 71631 24 0 25 26 27 28 101 0 29 0 1525 30 31 32 33 34 0 35 54345 13420 36 37 0 38 39 0 40 41 0 14783 0 0 58046 28410 42 43 84923 0 0 44 2...
result:
ok answer = 184372
Test #90:
score: 0
Accepted
time: 216ms
memory: 16592kb
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 1 0 2 0 3 4 0 0 0 0 5 6 0 7 8 0 0 0 9 10 0 0 0 11 12 13 14 0 0 15 0 0 0 0 0 0 0 0 16 17 0 18 0 0 0 19 0 0 0 20 21 0 22 0 23 24 0 25 26 27 0 28 0 0 29 30 31 32 0 33 0 0 34 35 0 0 36 0 0 0 37 0 38 0 0 0 39 0 40 0 0 41 0 0 0 0 42 43 44 0 45 0 0 46 0 47 48 835 49 0 0 0 0 0 0 50 51 52 0 53 ...
result:
ok answer = 10202
Test #91:
score: 0
Accepted
time: 241ms
memory: 16640kb
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:
0 0 0 0 0 1 0 2 3 0 0 4 5 5044 6 7 0 0 0 42622 27991 8 9 0 0 9136 6221 10 11 12 13 0 0 0 0 14 0 2749 0 0 15 16 17 18 19 20 8834 0 0 0 21 22 23 24 25 26 27 28 29 30 28829 32757 0 31 32 8072 33 0 34 35 36 0 37 38 42530 39 0 0 0 26291 40 0 0 41 22020 30591 42 43 0 0 44 45 0 0 17115 46 9942 36379 47 794...
result:
ok answer = 90686
Test #92:
score: 0
Accepted
time: 101ms
memory: 22456kb
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: 115ms
memory: 16532kb
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:
3296 3891 3520 2436 3043 3168 4459 2589 2670 2788 2914 2149 3420 3996 4340 4210 4080 4957 4831 4706 4576 2528 5405 5211 5085 5946 5820 5750 2172 2141 5464 6031 6930 6804 6573 6703 118682 7300 7176 7031 7926 7800 7662 7539 5619 8366 8244 8020 8990 8864 8740 8609 9278 9150 9025 8430 9762 9630 9501 988...
result:
ok answer = 300000
Test #94:
score: 0
Accepted
time: 105ms
memory: 16584kb
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:
95881 96271 96304 96187 96054 95081 94843 95329 95587 95681 95904 94220 93975 93713 93497 93243 93481 93730 94429 94297 94124 94787 96024 95277 104754 98354 98116 98124 98671 98704 98516 99258 99387 99504 99471 99081 94524 98881 97171 96916 96697 96443 96681 97420 97787 97904 97871 97324 97497 99104...
result:
ok answer = 300000
Test #95:
score: 0
Accepted
time: 134ms
memory: 16740kb
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:
105204 105060 105274 105034 104996 105604 105444 105844 105804 105549 103449 103729 103784 103924 104064 104564 104424 104699 104086 104284 102483 102671 102226 102384 102850 103264 103416 102939 103044 102799 101484 101204 101407 101005 101164 101846 102039 101644 101687 101824 100636 100203 100086...
result:
ok answer = 300000
Test #96:
score: 0
Accepted
time: 95ms
memory: 16624kb
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:
43293 43346 43323 49172 43316 43209 43255 43232 43278 43141 43302 43152 43437 43198 43377 43129 43428 43422 43090 43606 43629 43690 43636 43659 43217 43548 43570 42969 43577 43443 43466 43489 43512 43506 43678 43392 43415 43534 42745 42530 42682 42705 42728 42713 42659 42602 43731 42648 41289 42770 ...
result:
ok answer = 300000
Test #97:
score: 0
Accepted
time: 121ms
memory: 16592kb
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:
3962 3988 3980 3972 3946 3954 3781 3914 3922 3930 3938 3883 3970 3996 3773 3765 3757 3812 3804 3796 3788 3903 3836 3828 3820 3874 3866 3858 3899 3891 3844 3633 3688 3680 3658 3666 2008 3711 3703 3695 3750 3742 3734 3726 3850 3520 3512 3504 3559 3551 3543 3535 3589 3581 3573 3611 3619 3595 3603 3565 ...
result:
ok answer = 300000
Test #98:
score: 0
Accepted
time: 117ms
memory: 16624kb
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:
9334 9380 9355 9363 9368 9337 9344 9312 9309 9534 9376 9396 9283 9214 9222 9202 9245 9238 9213 9265 9291 9299 9364 9317 9264 9539 9547 9504 9512 9520 9551 9569 9564 9556 9579 9587 9256 9400 9410 9420 9402 9445 9438 9481 9471 9462 9454 9497 9477 9595 9708 9724 9743 9729 9765 9771 9762 9754 9779 9787 ...
result:
ok answer = 300000
Test #99:
score: 0
Accepted
time: 116ms
memory: 16508kb
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:
30010 30002 30004 30006 30008 30039 30035 30037 30033 30031 30019 30027 30025 30023 30021 30029 30014 30012 30132 30050 30048 30046 30044 30042 30040 30077 30075 30134 30071 30069 30067 30065 30063 30061 30059 30018 30016 30073 30090 30117 30086 30084 30082 30080 30088 30115 30052 30111 30109 30097 ...
result:
ok answer = 300000
Test #100:
score: 0
Accepted
time: 106ms
memory: 16408kb
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:
48014 48004 48006 48008 48010 48012 48063 48018 48020 48022 48024 48026 48016 48002 48061 48059 48057 48055 48053 48051 48049 48031 48045 48043 48041 48039 48037 48035 48030 48028 48047 48089 48087 48085 48083 48081 48500 48077 48075 48073 48071 48069 48067 48065 48033 48123 48121 48119 48117 48115 ...
result:
ok answer = 300000
Test #101:
score: 0
Accepted
time: 119ms
memory: 16340kb
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:
49806 49808 49810 49812 49814 49816 49818 49820 49822 49802 49804 49827 49849 49847 49845 49843 49841 49839 49838 49829 49831 49833 49813 49824 49965 49867 49869 49871 49873 49875 49864 49862 49860 49858 49856 49854 49835 49801 49899 49897 49895 49893 49891 49877 49887 49885 49883 49881 49879 49852 ...
result:
ok answer = 300000
Test #102:
score: 0
Accepted
time: 111ms
memory: 16256kb
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:
69995 69996 69997 69998 69999 70000 40001 69987 69944 69945 69946 69947 69948 69949 69950 69951 69952 69953 69954 69955 69956 69957 69973 69959 69960 69961 69962 69963 69964 69965 69966 69967 69968 69969 69970 69971 69972 69958 69798 69799 69800 69801 69802 69803 69804 69805 69806 69807 69808 69809 ...
result:
ok answer = 300000
Test #103:
score: 0
Accepted
time: 111ms
memory: 16148kb
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:
43333 43334 43335 43336 43337 43338 43331 43332 43330 43329 43328 43327 43326 43325 43324 43323 43340 43339 43321 43358 43357 43356 43355 43354 43353 43352 43351 43322 43349 43348 43347 43346 43345 43344 43343 43342 43341 43350 43300 43299 43298 43297 43296 43295 43294 43293 43359 43291 43290 43289 ...
result:
ok answer = 300000
Test #104:
score: 0
Accepted
time: 111ms
memory: 16316kb
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:
49337 49332 49333 49334 49335 49336 49338 49339 49340 49341 49342 49343 49330 49331 49329 49328 49327 49326 49325 49324 49323 49322 49321 49320 49319 49318 49317 49316 49345 49344 49314 49374 49373 49372 49371 49370 49369 49368 49367 49366 49365 49364 49363 49362 49315 49360 49359 49358 49357 49356 ...
result:
ok answer = 300000
Test #105:
score: 0
Accepted
time: 136ms
memory: 16276kb
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:
49932 49936 49935 49934 49933 49931 49930 49929 49928 49938 49937 49939 49940 49941 49942 49943 49944 49945 49946 49947 49948 49949 49926 49927 49901 49902 49903 49904 49905 49906 49907 49908 49909 49910 49911 49912 49950 49914 49915 49916 49917 49918 49919 49920 49921 49922 49923 49924 49925 49913 ...
result:
ok answer = 300000
Test #106:
score: 0
Accepted
time: 126ms
memory: 16120kb
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:
116673 116672 116671 116670 116669 116668 116667 116666 116665 116664 116663 125000 116661 116660 116659 116658 116657 116656 116655 116654 116653 116652 116651 116662 116697 116696 116695 116694 116693 116692 116691 116690 116689 116688 116687 116674 116685 116684 116683 116682 116681 116680 116679...
result:
ok answer = 300000
Test #107:
score: 0
Accepted
time: 109ms
memory: 16164kb
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:
129991 129992 129993 129994 129995 129996 129997 129998 129999 130000 130001 130002 130003 135000 130005 130006 130007 130008 130009 130010 130011 130012 130013 130014 130015 130016 130017 130018 130004 129962 129963 129964 129965 129966 129967 129968 129969 129970 129971 129972 129973 129974 129990...
result:
ok answer = 300000
Test #108:
score: 0
Accepted
time: 103ms
memory: 16112kb
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:
143338 143337 143336 143335 143334 143333 143332 143331 145000 143329 143328 143327 143326 143325 143324 143323 143322 143321 143330 143358 143357 143356 143355 143354 143353 143352 143351 143350 143339 143348 143347 143346 143345 143344 143343 143342 143341 143340 143349 143299 143298 143297 143296...
result:
ok answer = 300000
Test #109:
score: 0
Accepted
time: 109ms
memory: 16004kb
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:
149343 149342 149341 149340 149339 149338 149337 149336 149335 149334 149333 149332 149331 149330 149500 149328 149327 149326 149325 149324 149323 149322 149321 149320 149319 149318 149317 149316 149315 149314 149329 149374 149373 149372 149371 149370 149369 149368 149367 149366 149365 149364 149363...
result:
ok answer = 300000
Test #110:
score: 0
Accepted
time: 102ms
memory: 16060kb
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:
149926 149927 149928 149929 149930 149931 149932 149933 149934 149935 149936 149950 149938 149939 149940 149941 149942 149943 149944 149945 149946 149947 149948 149949 149937 149901 149902 149903 149904 149905 149906 149907 149908 149909 149910 149911 149925 149913 149914 149915 149916 149917 149918...
result:
ok answer = 300000
Test #111:
score: 0
Accepted
time: 94ms
memory: 15948kb
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:
150000 149999 149998 149997 149996 149995 149994 149993 149992 149991 149981 149982 149984 149985 149986 149987 149988 149989 149990 149983 149971 149972 149973 149974 149975 149977 149978 149979 149980 149976 149966 149961 149962 149964 149965 149967 149968 149969 149970 149963 149951 149952 149953...
result:
ok answer = 300000
Test #112:
score: 0
Accepted
time: 126ms
memory: 16004kb
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:
150000 149999 149998 149997 149996 149995 149994 149993 149992 149991 149990 149989 149988 149987 149986 149985 149984 149983 149981 149982 149980 149979 149978 149977 149976 149975 149974 149973 149972 149971 149970 149969 149968 149967 149966 149965 149963 149964 149962 149961 149960 149959 149958...
result:
ok answer = 300000
Test #113:
score: 0
Accepted
time: 122ms
memory: 16072kb
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:
150000 149999 149998 149997 149996 149995 149994 149993 149992 149991 149990 149989 149988 149987 149986 149985 149984 149983 149982 149981 149980 149979 149978 149977 149976 149975 149974 149973 149972 149971 149970 149969 149968 149967 149966 149965 149964 149963 149962 149961 149960 149959 149958...
result:
ok answer = 300000
Test #114:
score: 0
Accepted
time: 102ms
memory: 16092kb
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:
150000 0 50005 50004 50003 50002 50001 50000 49999 49998 75000 49996 49995 49994 49993 49992 49991 49990 49989 49997 50023 50022 50021 50020 50019 50018 50017 50016 50006 50014 50013 50012 50011 50010 50009 50008 50007 50015 49968 49967 49966 49965 49964 49963 49962 49961 49988 49959 49958 49957 499...
result:
ok answer = 299999
Test #115:
score: 0
Accepted
time: 106ms
memory: 22392kb
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: 150ms
memory: 16660kb
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: 147ms
memory: 16660kb
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: 157ms
memory: 17448kb
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:
1 2 117084 3 4 133357 5 6 34779 133358 7 133359 67355 8 105833 9 133360 806 10 58527 11 20638 133361 12302 12 13966 13 90068 14 6194 133362 130155 15 16 106947 43981 60531 17 133363 18 19 20 21 97961 61749 22 117079 23 24 133364 25 26 84017 27 28 107948 133365 105837 108094 133366 29 67807 108279 11...
result:
ok answer = 285014
Test #119:
score: 0
Accepted
time: 136ms
memory: 17356kb
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:
1 133843 2 3 4 5 6 68037 7 133844 8 9 10 11 110885 12 13 53463 89166 130217 14 133845 15 92628 133846 16 17 95913 18 19 92837 131719 20 133847 120388 133848 113343 21 22 23 51919 24 92629 25 133849 26 27 28 29 30 2297 31 111368 32 133850 33 133851 90323 34 35 36 133852 73331 27938 37 38 39 40 116700...
result:
ok answer = 294859
Test #120:
score: 0
Accepted
time: 162ms
memory: 17504kb
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:
33243 133690 59700 1 133691 19083 133692 2 133693 3 132420 4 5607 5 6 98036 74697 7 103414 8 9 10 11 30559 12 13 133694 133695 54880 133696 75298 14 133697 26675 133698 90121 15 16 44643 30496 17 18 133699 133700 19 95945 20 35712 35365 133701 21 22 133702 133703 73023 23 133704 133705 133706 133707...
result:
ok answer = 290984
Test #121:
score: 0
Accepted
time: 157ms
memory: 17464kb
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:
1 45213 95569 23194 24223 33569 133719 2 133720 3 133721 55694 4 61479 133722 5 6 7 133723 8 49669 26419 133724 133725 133726 24710 133727 133728 133729 9 10 127095 18093 133730 133731 81530 98494 11 12 13 14 133732 133733 15 54358 31584 133734 16 133735 17 101215 18 95926 18096 133373 19 20 90540 1...
result:
ok answer = 286318