QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#331486 | #7415. Fast Spanning Tree | Dualqwq | AC ✓ | 2291ms | 139784kb | C++17 | 3.0kb | 2024-02-18 11:55:08 | 2024-02-18 11:55:10 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
namespace FastIO {
#define iL (1 << 20)
char ibuf[iL],*iS = ibuf + iL,*iT = ibuf + iL;
#define gc() (iS == iT ? (iT = (iS = ibuf) + fread(ibuf,1,iL,stdin),iS == iT ? EOF : *iS++) : *iS++)
template<typename T>
inline void read(T &a) {
char ch;int sign = 0;
for(ch = gc();!isdigit(ch);ch = gc())
if(ch == '-') sign = 1;
a = ch & 15;
for(ch = gc();isdigit(ch);ch = gc())
a = (a << 3) + (a << 1) + (ch & 15);
if(sign) a = -a;
}
char Out[iL],*iter = Out;
#define flush() fwrite(Out,1,iter - Out,stdout),iter = Out
template<typename T>
inline void write(T x,char end = '\n') {
int c[40],l = 0;if(x < 0) *iter++ = '-',x = -x;
do c[++l] = x % 10,x /= 10; while(x);
while(l) *iter++ = c[l--] + '0';
*iter++ = end;flush();
}
#undef iL
#undef gc
#undef flush
}
using namespace FastIO;
const int N = 3e5 + 5;
typedef long long ll;
#define FI first
#define SE second
#define mkp make_pair
int n,m,w[N];
int A[N],B[N],pw[N],wlim[N]; // lim / 2 ceil
int ufs[N],sze[N];
ll Dec[N],sumw[N];
int find(int x) { return ufs[x] == x ? x : ufs[x] = find(ufs[x]);}
set<pair<ll,int> > warn[N];
map<int,ll> valw[N];
priority_queue<int,vector<int>,greater<int> > edges;
void Rebuild_warn(int x,ll dta) {
x = find(x);vector<int> V;Dec[x] += dta;
while(warn[x].size() && warn[x].begin() -> FI <= Dec[x]) {
int id = warn[x].begin() -> SE;
// int y = find(A[id]) ^ find(B[id]) ^ x;
V.push_back(id);warn[x].erase(warn[x].begin());
}
for(auto id : V) if(find(A[id]) != find(B[id])) {
int y = find(A[id]) ^ find(B[id]) ^ x;
wlim[id] = max(0ll,pw[id] - Dec[x] - Dec[y]);
warn[y].erase(mkp(valw[y][id],id));
// printf("dec:%d,%d\n",id,dta);
if(wlim[id] <= 0) edges.push(id);
else {
int v = (wlim[id] + 1) / 2;
valw[x][id] = (v + Dec[x]);valw[y][id] = (v + Dec[y]);
warn[x].emplace(v + Dec[x],id);
warn[y].emplace(v + Dec[y],id);
}
}
}
void Merge(int x,int y) {
assert(x != y);
if(sze[x] < sze[y]) swap(x,y);
ll s1 = sumw[x],s2 = sumw[y];
Rebuild_warn(x,s2);Rebuild_warn(y,s1);
sze[x] += sze[y];sumw[x] += sumw[y];
ufs[y] = x;
for(auto [v,id] : warn[y]) {
if(find(A[id]) == find(B[id])) continue;
warn[x].emplace(v,id);
valw[x][id] = v;
}
warn[y].clear();valw[y].clear();
}
int main() {
read(n);read(m);
for(int i = 1;i <= n;i++)
read(w[i]),sumw[i] = w[i],sze[i] = 1,ufs[i] = i;
for(int i = 1;i <= m;i++) {
read(A[i]);read(B[i]);read(wlim[i]);
pw[i] = wlim[i];
int v = (wlim[i] + 1) / 2;
warn[A[i]].emplace(v,i);
valw[A[i]][i] = v;
warn[B[i]].emplace(v,i);
valw[B[i]][i] = v;
}
for(int i = 1;i <= n;i++) Rebuild_warn(i,w[i]);
vector<int> Ans;
while(!edges.empty()) {
int id = edges.top();edges.pop();
// cerr << id << endl;
int x = A[id],y = B[id];
x = find(x);y = find(y);
if(x == y) continue;
Merge(x,y);
Ans.push_back(id);
}
printf("%d\n",Ans.size());
for(auto i : Ans) write(i,' ');
printf("\n");
return 0;
}
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 3ms
memory: 43764kb
input:
5 5 1 4 3 4 0 4 5 5 3 1 1 2 5 2 4 3 1 4 1 4
output:
4 2 3 1 4
result:
ok 5 number(s): "4 2 3 1 4"
Test #2:
score: 0
Accepted
time: 0ms
memory: 43096kb
input:
3 5 3 2 2 1 2 6 1 2 6 1 2 3 1 2 6 2 3 6
output:
2 3 5
result:
ok 3 number(s): "2 3 5"
Test #3:
score: 0
Accepted
time: 3ms
memory: 43952kb
input:
10 20 4 6 6 1 7 9 1 8 7 9 5 3 2 1 10 10 5 6 7 9 6 9 3 1 1 6 8 1 5 7 0 9 5 4 10 3 4 8 6 8 3 10 6 5 3 8 3 7 9 1 9 10 10 1 0 5 7 6 6 10 1 6 5 9 5 8 2 9 2 4
output:
8 1 2 3 4 5 6 7 20
result:
ok 9 numbers
Test #4:
score: 0
Accepted
time: 3ms
memory: 42876kb
input:
10 20 0 10 4 6 2 0 2 0 2 8 5 10 8 7 1 6 10 5 0 9 8 0 5 8 4 5 1 8 10 3 6 5 4 3 9 2 6 10 3 6 4 3 1 3 10 3 6 1 3 3 2 5 6 9 2 4 2 5 10 6 5 8 6 3 2 1 0 2 3 6
output:
9 1 4 5 6 2 7 8 9 13
result:
ok 10 numbers
Test #5:
score: 0
Accepted
time: 0ms
memory: 43832kb
input:
100 200 49 21 70 93 66 51 36 59 56 62 10 4 46 73 22 48 89 17 72 60 29 64 19 56 32 54 55 0 77 86 34 35 56 17 55 2 98 80 73 71 64 37 61 22 89 96 99 28 0 35 56 45 74 81 30 3 66 96 28 16 29 43 60 61 60 95 83 5 73 1 28 47 73 44 8 4 91 34 100 23 4 93 44 87 72 5 13 88 100 52 56 61 100 80 14 30 59 97 51 43 ...
output:
96 1 2 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 9 20 21 22 23 25 26 3 27 28 29 30 31 32 33 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 34 54 55 56 58 59 60 61 62 63 64 66 67 68 69 70 71 72 74 76 78 80 81 82 87 89 91 94 95 96 100 43 101 24 84 107 109 110 117 119 129 142 144 169 170 195
result:
ok 97 numbers
Test #6:
score: 0
Accepted
time: 3ms
memory: 43760kb
input:
100 200 24 84 94 70 81 51 70 9 39 61 34 89 37 23 21 52 19 65 37 53 85 70 27 74 46 45 49 76 36 51 38 8 91 84 30 21 82 93 54 4 65 44 66 78 42 42 74 11 12 66 24 88 65 75 78 55 61 45 21 83 29 24 85 37 73 25 25 40 96 100 26 28 18 30 56 41 15 11 88 61 42 74 8 97 14 34 5 39 24 94 84 8 3 54 75 62 73 36 58 4...
output:
98 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 11 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 63 64 65 66 67 68 70 71 72 73 74 75 77 78 80 81 82 84 85 87 88 89 90 91 92 94 96 98 99 103 104 129 156 163 164 167 185 199
result:
ok 99 numbers
Test #7:
score: 0
Accepted
time: 4ms
memory: 43432kb
input:
1000 2000 919 776 189 249 535 136 885 695 607 561 235 179 233 501 828 472 532 337 721 344 71 885 630 612 867 132 392 624 477 527 529 17 960 726 235 661 407 923 214 882 554 194 68 561 993 393 548 92 269 41 754 647 1 924 510 573 464 911 845 303 624 583 255 861 668 998 648 901 251 766 349 248 504 117 6...
output:
979 2 3 4 5 6 7 8 10 13 14 15 16 17 18 19 20 21 22 24 25 26 27 28 29 30 31 32 33 34 35 36 38 39 42 43 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 71 72 73 74 75 76 77 78 79 80 81 82 45 83 84 85 86 87 88 89 90 91 92 93 94 95 97 98 99 100 101 102 103 105 41 106 107 108 1...
result:
ok 980 numbers
Test #8:
score: 0
Accepted
time: 7ms
memory: 42848kb
input:
1000 2000 838 14 274 368 930 991 554 645 860 709 557 447 647 723 384 339 801 423 843 957 649 71 997 106 521 713 275 876 396 541 377 586 934 998 330 221 529 635 515 216 643 742 507 270 902 288 440 622 950 258 295 505 358 540 452 414 888 601 815 386 759 689 742 840 994 786 974 648 379 102 450 754 624 ...
output:
970 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 23 24 25 26 28 29 30 31 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 27 54 56 52 57 58 59 60 61 62 63 64 65 67 68 69 70 71 72 73 76 77 78 79 80 81 82 83 84 85 86 87 89 90 91 93 95 97 98 99 100 101 102 104 105 106 108 75 109 ...
result:
ok 971 numbers
Test #9:
score: 0
Accepted
time: 17ms
memory: 47472kb
input:
10000 20000 2770 4102 7211 7463 5376 956 7654 6142 7795 4467 5954 3814 401 4217 3088 9 3334 5642 8164 4848 1690 4609 9606 1472 2055 3238 4429 1866 2551 1891 3108 231 8719 5315 3920 9718 2547 9932 2680 15 7872 7302 4641 1096 7732 5134 1348 3489 4436 7903 168 9090 2765 2650 8730 7433 6196 9299 8451 43...
output:
9826 1 3 4 5 6 7 9 10 11 12 15 16 20 21 22 23 24 25 26 29 30 32 33 34 35 36 39 40 41 42 43 45 46 47 48 49 50 51 52 53 55 57 58 59 60 61 62 63 65 66 67 68 69 71 72 73 74 75 76 27 77 79 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 106 107 108 109 110 111 113 114 116 117 11...
result:
ok 9827 numbers
Test #10:
score: 0
Accepted
time: 25ms
memory: 49092kb
input:
10000 20000 6023 137 374 4404 7135 4862 3664 1753 2615 5821 3591 1821 1772 8756 6173 3166 8856 8030 994 8260 4267 4477 691 8970 5445 9593 452 7959 3303 6588 3700 4861 1268 9344 2475 2435 7968 1011 9437 5883 4815 2770 9056 4423 2924 1525 4211 4655 9676 8745 429 9269 8489 4940 6051 8532 6732 6831 7866...
output:
9797 1 2 5 6 8 10 11 12 13 14 15 16 17 19 20 21 22 23 24 26 27 29 30 31 32 33 34 35 36 37 38 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 59 60 61 62 63 64 66 67 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 93 94 96 97 99 100 101 103 104 105 106 107 108 109 110 111 112 113...
result:
ok 9798 numbers
Test #11:
score: 0
Accepted
time: 561ms
memory: 123808kb
input:
300000 300000 79589 56209 39109 45927 40583 85355 37235 93800 80252 94753 77793 8508 27123 53965 42678 78268 75590 62814 33653 46238 58818 17465 5587 99163 91597 76787 82053 11436 79434 6262 59411 20917 1182 10838 63928 74239 21886 15024 29599 86110 97887 2230 71925 42987 37897 58688 65784 50117 486...
output:
250270 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 25 26 27 28 30 31 32 33 35 36 37 39 40 41 42 44 45 46 47 48 49 51 52 53 54 56 57 58 59 60 61 62 63 67 68 69 70 71 72 74 75 76 78 79 82 83 84 85 86 88 89 90 91 92 93 94 95 96 97 99 100 101 102 103 104 110 111 112 113 115 116 117 118 120 ...
result:
ok 250271 numbers
Test #12:
score: 0
Accepted
time: 565ms
memory: 123460kb
input:
300000 300000 51045 94574 62648 61791 13468 47104 18922 75351 33470 57260 52525 92002 42350 1518 49576 49520 23938 83685 98745 22853 85627 93225 96449 76858 84297 90634 18353 5126 90756 95406 41289 30050 58903 47603 51054 61224 85597 48982 73701 9944 714 60626 62593 56124 53915 69599 35071 442 67000...
output:
250310 1 3 4 5 6 7 8 9 10 11 12 13 14 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 36 37 38 39 40 41 42 43 45 46 47 48 49 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 69 71 72 73 74 75 77 78 79 81 82 83 84 85 86 87 88 89 90 91 92 93 95 97 98 99 100 101 102 103 104 107 108 109 110 111 ...
result:
ok 250311 numbers
Test #13:
score: 0
Accepted
time: 603ms
memory: 123476kb
input:
300000 300000 72519 10569 85101 89272 66593 57128 67893 64457 283 83904 65334 95597 56714 33689 56790 51503 55537 5913 42695 73175 42976 97554 67173 82311 58467 53879 67191 44933 99208 54410 17322 32869 83909 72219 99697 45792 99743 41855 26611 7202 50097 60431 82821 89967 83344 66226 72347 2538 142...
output:
250229 3 4 5 6 7 9 10 11 12 13 15 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 35 36 38 39 40 41 43 44 45 46 47 48 49 51 52 53 54 55 56 57 59 61 62 63 64 65 66 67 69 70 71 72 73 74 75 77 79 80 81 82 83 85 87 88 90 92 93 94 95 96 97 98 102 104 105 106 107 108 109 110 111 113 114 115 116 117 119 12...
result:
ok 250230 numbers
Test #14:
score: 0
Accepted
time: 592ms
memory: 123740kb
input:
300000 300000 53581 86152 7554 68058 60129 2393 16863 88805 7509 10547 18554 47885 60184 65861 80069 88726 27548 3795 86646 47844 11219 85818 2657 47351 16572 17125 80787 36045 42899 48655 33768 35689 24979 32075 13098 19466 13887 99487 28215 4461 12932 35889 27395 23809 77531 22439 33969 15528 2617...
output:
250219 1 3 5 6 7 8 9 10 11 12 13 14 15 16 19 20 21 22 23 24 28 29 30 31 32 33 35 38 39 40 41 42 43 44 47 48 49 50 51 52 53 54 55 56 57 58 59 61 62 63 64 66 67 68 69 70 71 72 73 74 76 77 79 80 81 82 83 84 85 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 112 113 11...
result:
ok 250220 numbers
Test #15:
score: 0
Accepted
time: 588ms
memory: 123712kb
input:
300000 300000 10295 2146 81315 95539 13253 12417 65835 77911 25629 37191 31362 64933 50200 98033 62935 90709 34800 77331 71008 33406 3809 38841 73382 63698 39436 45130 53971 51504 62245 56352 9801 62856 14743 56690 61740 68794 87621 68012 81126 26066 51422 11347 23276 81999 6959 19066 71245 93279 13...
output:
250424 1 2 5 7 10 11 12 13 15 18 19 20 21 22 23 24 25 26 27 28 29 31 32 33 34 37 38 40 41 42 43 44 46 47 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64 65 66 67 68 69 70 73 74 75 76 77 78 79 80 81 82 83 84 86 87 88 89 90 91 92 93 94 95 97 98 99 100 101 103 104 106 107 108 109 110 112 113 115 116 117 1...
result:
ok 250425 numbers
Test #16:
score: 0
Accepted
time: 589ms
memory: 123848kb
input:
300000 300000 56116 29036 3768 98673 42031 82029 90459 67017 32855 28595 44170 68528 53670 30203 21455 52278 66400 99560 90612 83728 72053 2758 19760 4391 13607 8376 67567 66964 5936 15356 61488 41329 55815 81306 75142 77710 1765 49991 69277 47672 49498 35499 43504 91495 76801 15693 32867 30615 6100...
output:
250121 1 2 3 4 5 6 7 8 10 11 12 13 16 17 18 20 21 22 23 26 27 29 30 31 32 33 36 37 38 40 41 42 43 44 45 47 49 51 52 53 54 58 59 60 61 62 64 65 66 67 69 70 71 72 73 74 75 76 77 78 79 80 82 84 86 87 88 89 90 91 92 93 95 96 97 98 99 100 101 102 103 104 105 106 107 109 110 111 112 113 114 115 116 117 11...
result:
ok 250122 numbers
Test #17:
score: 0
Accepted
time: 2261ms
memory: 139328kb
input:
150000 300000 10 6 5 3 9 6 4 10 4 2 6 8 3 2 4 4 9 9 7 7 5 5 4 10 4 2 4 5 3 8 4 10 5 10 1 0 5 10 4 6 0 7 6 4 3 8 0 0 8 0 8 5 7 5 6 7 6 6 0 2 2 7 10 1 0 4 5 8 1 0 3 3 8 0 8 2 2 6 10 10 10 7 10 2 6 4 2 4 7 6 1 8 10 8 0 5 0 1 3 3 10 9 5 6 5 8 7 9 3 2 4 8 1 2 0 8 1 10 8 3 9 0 2 9 8 1 9 0 7 2 10 2 10 1 2 ...
output:
140229 1 3 13 33 63 134 178 201 256 258 265 373 488 500 508 555 574 577 591 624 628 642 646 658 671 760 766 770 776 816 832 862 882 935 945 947 951 1042 1126 1127 1139 1144 1161 1262 1282 1327 1345 1361 1435 1442 1445 1476 1480 1491 1515 1556 1563 1696 1768 1779 1786 1869 1872 1909 1940 1967 1995 20...
result:
ok 140230 numbers
Test #18:
score: 0
Accepted
time: 2192ms
memory: 123232kb
input:
150000 300000 5 5 0 6 3 3 6 6 3 9 2 1 8 6 10 7 4 4 7 8 1 10 5 9 8 9 5 2 1 8 6 0 0 3 4 9 9 6 0 5 10 5 6 4 5 6 6 0 9 0 7 9 4 7 4 0 0 2 5 8 7 1 1 0 2 2 10 9 4 3 0 7 5 10 5 4 0 2 1 9 5 9 1 3 4 0 0 7 10 4 0 6 4 1 1 4 0 8 10 7 9 10 1 6 10 0 3 8 1 9 6 3 5 5 5 8 7 5 10 8 9 4 6 0 5 2 8 8 9 3 8 7 0 8 3 5 4 3 ...
output:
140137 59 117 127 128 177 184 189 207 220 238 241 242 245 309 312 363 369 400 406 432 455 554 572 611 660 671 706 711 717 733 751 776 819 827 828 840 855 866 890 904 910 911 932 964 974 983 990 1017 1098 1108 1165 1170 1179 1233 1274 1278 1302 1323 1333 1350 1393 1406 1411 1412 1449 1458 1470 1526 1...
result:
ok 140138 numbers
Test #19:
score: 0
Accepted
time: 2270ms
memory: 131748kb
input:
150000 300000 5 0 3 8 8 10 4 9 6 5 4 5 0 3 1 0 10 3 6 7 1 6 2 8 8 3 9 7 5 8 4 9 5 8 1 10 6 9 1 2 0 9 8 2 8 6 3 2 8 7 7 4 10 2 0 6 7 0 10 5 2 8 5 4 7 1 3 7 0 8 8 5 6 4 2 3 8 1 6 1 4 8 5 4 3 6 0 4 9 5 3 5 9 10 8 9 8 2 3 0 9 7 5 5 10 1 1 2 4 5 6 2 10 8 7 5 9 7 2 10 1 3 8 2 10 4 10 6 5 9 5 8 4 5 0 5 6 8...
output:
140266 33 38 39 49 57 68 111 218 240 313 329 354 361 367 397 401 471 529 612 633 682 722 737 743 767 770 773 779 820 916 926 942 948 968 984 985 1017 1019 1064 1089 1127 1132 1246 1271 1286 1342 1357 1364 1388 1432 1441 1463 1472 1479 1488 1495 1516 1533 1556 1562 1582 1694 1710 1714 1719 1729 1741 ...
result:
ok 140267 numbers
Test #20:
score: 0
Accepted
time: 2253ms
memory: 127636kb
input:
150000 300000 9 10 10 3 7 5 5 7 3 1 0 8 7 5 1 4 3 4 0 0 3 9 0 0 10 6 5 6 3 2 6 3 10 8 1 4 5 4 3 10 7 4 7 6 6 1 10 10 1 8 2 2 3 5 5 8 4 9 10 8 4 3 0 10 0 8 0 4 1 1 6 10 10 0 5 2 10 3 1 10 3 10 8 1 0 7 7 3 0 0 6 7 7 7 8 2 7 1 8 0 6 4 9 7 7 1 8 3 8 9 10 4 5 4 7 0 6 3 4 7 10 0 3 3 6 9 4 0 1 6 4 0 6 5 6 ...
output:
140026 19 26 42 58 68 109 123 130 164 173 217 226 232 281 287 324 339 346 362 371 433 441 472 474 497 505 524 537 552 598 627 654 662 668 669 688 713 735 774 823 871 891 1121 1162 1195 1205 1248 1280 1297 1314 1338 1379 1393 1415 1425 1440 1475 1492 1507 1523 1533 1559 1563 1596 1670 1680 1700 1743 ...
result:
ok 140027 numbers
Test #21:
score: 0
Accepted
time: 2204ms
memory: 125000kb
input:
150000 300000 5 8 5 7 1 9 10 8 6 10 2 6 8 8 7 4 4 9 3 9 7 8 3 0 5 6 6 3 9 0 1 4 1 1 9 0 5 8 3 1 8 2 1 0 5 7 0 5 5 6 1 9 10 9 1 0 10 7 10 1 4 4 2 0 6 2 0 10 5 9 2 5 2 5 5 8 5 0 3 10 2 0 3 0 10 5 1 2 4 1 2 7 9 1 7 9 0 0 8 0 4 3 1 7 7 3 9 1 4 5 5 4 2 9 10 0 7 1 5 9 3 4 0 0 6 3 0 4 9 2 5 3 2 10 4 7 7 8 ...
output:
140166 9 13 60 71 118 226 241 247 261 292 347 401 412 433 492 494 520 545 549 593 594 612 626 636 650 671 711 721 830 835 853 886 911 922 971 1041 1064 1080 1093 1159 1164 1174 1176 1187 1213 1229 1236 1254 1282 1285 1287 1291 1310 1376 1416 1497 1509 1522 1527 1539 1552 1569 1584 1613 1635 1646 165...
result:
ok 140167 numbers
Test #22:
score: 0
Accepted
time: 1546ms
memory: 121756kb
input:
150000 300000 0 7 7 6 5 10 3 10 0 9 1 4 2 0 5 2 3 9 1 5 9 0 8 9 8 6 9 1 6 8 1 7 10 0 0 7 0 9 0 7 6 5 5 4 6 6 7 3 7 7 7 4 6 1 9 8 1 1 3 4 5 2 4 1 7 3 2 4 7 1 0 1 9 6 10 3 3 6 7 3 3 7 6 2 2 5 3 7 4 1 9 3 9 0 7 1 4 8 10 4 9 3 7 3 4 5 4 8 7 5 7 2 5 0 9 5 2 2 8 9 9 4 5 6 6 10 10 7 0 1 1 1 0 0 6 1 6 1 7 7...
output:
144078 20 21 23 55 153 155 206 258 272 287 298 313 331 357 378 402 456 489 519 520 535 555 577 632 648 650 664 689 708 719 745 761 782 816 838 844 846 851 873 882 883 901 927 933 947 957 977 978 1012 1089 1114 1116 1137 1183 1231 1257 1277 1280 1305 1340 1360 1373 1453 1501 1538 1564 1571 1595 1614 ...
result:
ok 144079 numbers
Test #23:
score: 0
Accepted
time: 1470ms
memory: 121808kb
input:
150000 300000 5 5 0 5 4 5 5 9 6 6 3 4 5 2 0 8 3 1 8 3 3 2 9 1 8 0 1 9 2 1 1 4 5 0 3 6 9 1 9 0 5 9 9 9 6 10 9 6 0 6 10 7 0 0 6 1 2 3 10 8 9 9 7 9 2 10 8 9 8 7 8 10 9 10 3 4 6 9 3 5 1 1 3 7 4 6 1 1 1 4 8 2 7 3 1 9 1 8 7 4 8 5 7 6 7 9 4 6 6 6 3 0 9 10 1 9 6 5 2 6 7 8 4 0 6 5 9 5 1 1 6 3 1 1 5 5 7 7 10 ...
output:
146776 15 18 60 65 66 69 92 97 175 200 234 260 270 279 287 292 321 331 347 348 359 369 445 491 520 548 578 592 619 625 658 666 689 700 711 724 744 789 843 866 1043 1055 1086 1087 1108 1111 1149 1174 1202 1220 1240 1245 1273 1278 1286 1316 1331 1366 1371 1375 1407 1447 1448 1487 1527 1573 1614 1644 1...
result:
ok 146777 numbers
Test #24:
score: 0
Accepted
time: 1537ms
memory: 121244kb
input:
150000 300000 6 3 8 3 7 7 1 2 10 1 6 7 3 1 10 0 8 0 1 10 0 5 5 2 10 8 0 1 8 3 0 6 6 9 8 3 9 7 8 3 3 6 10 5 4 0 3 0 10 3 3 8 3 8 5 5 3 3 1 6 6 5 10 6 4 3 1 3 10 1 4 7 9 2 10 10 0 2 1 0 3 1 0 3 7 6 8 0 7 7 0 3 3 0 8 1 6 9 4 2 0 2 7 1 10 9 1 8 4 6 10 8 9 10 6 2 6 10 3 9 2 10 4 9 4 0 1 5 1 0 9 0 1 9 8 1...
output:
146557 2 12 40 94 102 139 140 155 237 246 270 271 311 372 398 401 446 451 492 511 529 532 596 597 646 689 706 724 741 776 847 852 862 886 900 949 971 976 978 1049 1110 1118 1173 1174 1212 1227 1252 1281 1299 1307 1349 1375 1376 1434 1566 1586 1593 1597 1606 1623 1674 1704 1705 1777 1790 1801 1811 18...
result:
ok 146558 numbers
Test #25:
score: 0
Accepted
time: 1513ms
memory: 121016kb
input:
150000 300000 5 2 9 8 10 10 9 10 2 1 7 6 0 1 1 3 4 5 5 1 6 1 3 3 1 0 7 1 3 5 0 8 9 2 2 2 0 6 1 6 9 5 0 7 4 10 10 4 4 1 8 1 6 4 7 1 1 7 8 7 1 9 3 6 6 5 0 7 5 7 10 6 10 3 10 6 6 1 8 6 10 0 2 4 8 5 0 8 10 2 10 3 0 1 10 5 4 7 0 2 0 3 1 10 9 6 10 1 1 5 8 7 9 0 5 3 9 4 7 8 8 9 9 1 4 4 5 10 6 6 3 0 1 9 1 1...
output:
146207 1 13 18 27 32 42 75 80 157 198 212 226 227 243 265 353 374 383 391 401 415 418 439 455 469 502 530 592 594 597 681 691 698 712 733 748 772 850 1034 1098 1141 1155 1159 1173 1184 1245 1248 1293 1305 1326 1360 1369 1374 1411 1424 1432 1439 1465 1533 1538 1565 1581 1631 1635 1672 1698 1745 1793 ...
result:
ok 146208 numbers
Test #26:
score: 0
Accepted
time: 1686ms
memory: 121748kb
input:
150000 300000 0 6 10 9 1 6 5 8 10 8 4 0 8 5 2 1 0 5 9 4 10 10 2 4 9 9 3 3 1 8 3 1 10 3 0 0 9 6 6 3 1 0 6 3 2 1 4 5 8 3 2 3 0 3 3 10 8 6 1 2 1 2 1 1 4 10 4 3 10 4 4 10 6 2 7 7 10 10 7 2 3 8 0 7 7 0 1 9 6 8 8 0 4 8 5 0 1 9 8 8 5 2 2 2 4 6 6 4 3 6 6 6 0 6 1 3 10 4 9 7 9 7 1 9 4 3 1 10 5 5 10 0 6 1 7 9 ...
output:
145650 23 46 61 67 68 97 108 166 181 190 238 248 253 277 308 328 355 468 472 491 552 700 727 735 772 775 786 875 901 941 944 963 970 980 994 1002 1013 1047 1096 1127 1138 1163 1199 1222 1244 1277 1308 1330 1351 1404 1410 1427 1431 1464 1513 1517 1547 1548 1606 1619 1621 1754 1828 1840 1872 1880 1893...
result:
ok 145651 numbers
Test #27:
score: 0
Accepted
time: 1574ms
memory: 121644kb
input:
150000 300000 1 4 0 2 5 4 1 8 6 7 0 4 7 0 6 9 7 10 7 8 1 8 0 2 0 10 5 4 4 7 4 4 5 9 6 1 3 8 8 2 10 7 7 1 4 2 9 1 1 4 3 1 10 3 7 10 10 6 2 7 9 0 3 5 8 9 2 4 5 7 0 7 10 7 7 0 9 0 5 3 5 4 4 7 10 2 4 3 10 7 1 4 1 6 8 2 9 9 1 8 9 9 9 8 9 0 9 3 8 2 4 1 1 5 7 5 0 5 7 4 3 7 7 8 2 5 3 7 0 5 4 2 4 5 1 6 9 5 1...
output:
145356 14 38 50 99 102 107 124 130 146 163 252 260 269 315 323 337 399 412 466 472 482 512 543 611 718 753 767 797 852 856 915 931 941 994 1061 1070 1123 1182 1222 1226 1236 1309 1340 1382 1389 1398 1408 1415 1434 1496 1529 1626 1653 1668 1679 1713 1738 1742 1746 1773 1780 1843 1863 1891 1932 1990 2...
result:
ok 145357 numbers
Test #28:
score: 0
Accepted
time: 2266ms
memory: 139784kb
input:
150000 300000 10 6 5 3 9 6 4 10 4 2 6 8 3 2 4 4 9 9 7 7 5 5 4 10 4 2 4 5 3 8 4 10 5 10 1 0 5 10 4 6 0 7 6 4 3 8 0 0 8 0 8 5 7 5 6 7 6 6 0 2 2 7 10 1 0 4 5 8 1 0 3 3 8 0 8 2 2 6 10 10 10 7 10 2 6 4 2 4 7 6 1 8 10 8 0 5 0 1 3 3 10 9 5 6 5 8 7 9 3 2 4 8 1 2 0 8 1 10 8 3 9 0 2 9 8 1 9 0 7 2 10 2 10 1 2 ...
output:
140290 26 62 100 146 191 211 223 227 255 265 308 317 344 347 348 382 401 496 591 641 654 675 712 731 745 760 770 825 828 832 860 913 930 935 937 943 945 974 992 994 1009 1011 1090 1117 1149 1218 1225 1236 1257 1300 1356 1361 1364 1372 1435 1436 1462 1491 1524 1556 1585 1620 1641 1683 1764 1777 1809 ...
result:
ok 140291 numbers
Test #29:
score: 0
Accepted
time: 2182ms
memory: 137552kb
input:
150000 300000 5 5 0 6 3 3 6 6 3 9 2 1 8 6 10 7 4 4 7 8 1 10 5 9 8 9 5 2 1 8 6 0 0 3 4 9 9 6 0 5 10 5 6 4 5 6 6 0 9 0 7 9 4 7 4 0 0 2 5 8 7 1 1 0 2 2 10 9 4 3 0 7 5 10 5 4 0 2 1 9 5 9 1 3 4 0 0 7 10 4 0 6 4 1 1 4 0 8 10 7 9 10 1 6 10 0 3 8 1 9 6 3 5 5 5 8 7 5 10 8 9 4 6 0 5 2 8 8 9 3 8 7 0 8 3 5 4 3 ...
output:
140197 23 92 117 166 177 229 235 252 277 294 463 475 510 539 547 572 597 620 624 625 666 676 677 710 776 790 816 821 898 965 1043 1051 1062 1109 1119 1120 1165 1174 1204 1223 1242 1259 1273 1281 1393 1456 1464 1477 1516 1539 1571 1577 1599 1617 1686 1689 1702 1766 1778 1779 1790 1812 1828 1541 1837 ...
result:
ok 140198 numbers
Test #30:
score: 0
Accepted
time: 2273ms
memory: 132040kb
input:
150000 300000 5 0 3 8 8 10 4 9 6 5 4 5 0 3 1 0 10 3 6 7 1 6 2 8 8 3 9 7 5 8 4 9 5 8 1 10 6 9 1 2 0 9 8 2 8 6 3 2 8 7 7 4 10 2 0 6 7 0 10 5 2 8 5 4 7 1 3 7 0 8 8 5 6 4 2 3 8 1 6 1 4 8 5 4 3 6 0 4 9 5 3 5 9 10 8 9 8 2 3 0 9 7 5 5 10 1 1 2 4 5 6 2 10 8 7 5 9 7 2 10 1 3 8 2 10 4 10 6 5 9 5 8 4 5 0 5 6 8...
output:
139979 43 54 111 135 299 314 344 396 406 446 460 477 514 517 551 552 564 601 633 661 669 694 707 738 779 799 820 835 837 848 853 876 902 906 926 927 1035 1095 1106 1141 1217 1446 1447 1477 1479 1509 1516 1548 1556 1570 1593 1597 1693 1699 1711 1730 1732 1774 1786 1805 1813 1815 1820 1822 1956 1964 1...
result:
ok 139980 numbers
Test #31:
score: 0
Accepted
time: 2260ms
memory: 127316kb
input:
150000 300000 9 10 10 3 7 5 5 7 3 1 0 8 7 5 1 4 3 4 0 0 3 9 0 0 10 6 5 6 3 2 6 3 10 8 1 4 5 4 3 10 7 4 7 6 6 1 10 10 1 8 2 2 3 5 5 8 4 9 10 8 4 3 0 10 0 8 0 4 1 1 6 10 10 0 5 2 10 3 1 10 3 10 8 1 0 7 7 3 0 0 6 7 7 7 8 2 7 1 8 0 6 4 9 7 7 1 8 3 8 9 10 4 5 4 7 0 6 3 4 7 10 0 3 3 6 9 4 0 1 6 4 0 6 5 6 ...
output:
140235 30 47 54 58 66 77 133 162 164 200 217 240 307 346 347 352 379 389 422 443 465 495 497 508 515 517 562 574 598 635 645 653 681 695 701 709 729 767 799 921 949 1020 1079 1080 1082 1102 1117 1131 1156 1237 1240 1258 1268 1269 1276 1282 1309 1373 1380 1406 1419 1483 1485 1508 1526 1536 1537 1538 ...
result:
ok 140236 numbers
Test #32:
score: 0
Accepted
time: 2291ms
memory: 124016kb
input:
150000 300000 5 8 5 7 1 9 10 8 6 10 2 6 8 8 7 4 4 9 3 9 7 8 3 0 5 6 6 3 9 0 1 4 1 1 9 0 5 8 3 1 8 2 1 0 5 7 0 5 5 6 1 9 10 9 1 0 10 7 10 1 4 4 2 0 6 2 0 10 5 9 2 5 2 5 5 8 5 0 3 10 2 0 3 0 10 5 1 2 4 1 2 7 9 1 7 9 0 0 8 0 4 3 1 7 7 3 9 1 4 5 5 4 2 9 10 0 7 1 5 9 3 4 0 0 6 3 0 4 9 2 5 3 2 10 4 7 7 8 ...
output:
140157 1 60 75 117 132 158 187 191 216 219 230 301 329 338 396 405 483 491 506 507 512 520 536 572 575 593 686 700 750 779 787 814 823 829 832 897 908 952 997 1023 1063 1085 1099 1121 1133 1151 1153 1164 1166 1176 1199 1226 1231 1251 1254 1283 1341 1354 1364 1396 1434 1461 1522 1569 1596 1617 1646 1...
result:
ok 140158 numbers
Test #33:
score: 0
Accepted
time: 1704ms
memory: 121744kb
input:
150000 300000 0 7 7 6 5 10 3 10 0 9 1 4 2 0 5 2 3 9 1 5 9 0 8 9 8 6 9 1 6 8 1 7 10 0 0 7 0 9 0 7 6 5 5 4 6 6 7 3 7 7 7 4 6 1 9 8 1 1 3 4 5 2 4 1 7 3 2 4 7 1 0 1 9 6 10 3 3 6 7 3 3 7 6 2 2 5 3 7 4 1 9 3 9 0 7 1 4 8 10 4 9 3 7 3 4 5 4 8 7 5 7 2 5 0 9 5 2 2 8 9 9 4 5 6 6 10 10 7 0 1 1 1 0 0 6 1 6 1 7 7...
output:
144143 4 33 42 72 93 189 190 194 206 242 249 264 278 280 290 368 373 481 535 560 609 612 648 649 671 689 720 743 753 771 791 805 842 843 861 933 957 960 977 992 1070 1082 1114 1118 1120 1167 1176 1183 1212 1244 1266 1276 1299 1308 1368 1374 1445 1448 1570 1575 1599 1612 1613 1675 1677 1771 1860 1885...
result:
ok 144144 numbers
Test #34:
score: 0
Accepted
time: 1544ms
memory: 121800kb
input:
150000 300000 5 5 0 5 4 5 5 9 6 6 3 4 5 2 0 8 3 1 8 3 3 2 9 1 8 0 1 9 2 1 1 4 5 0 3 6 9 1 9 0 5 9 9 9 6 10 9 6 0 6 10 7 0 0 6 1 2 3 10 8 9 9 7 9 2 10 8 9 8 7 8 10 9 10 3 4 6 9 3 5 1 1 3 7 4 6 1 1 1 4 8 2 7 3 1 9 1 8 7 4 8 5 7 6 7 9 4 6 6 6 3 0 9 10 1 9 6 5 2 6 7 8 4 0 6 5 9 5 1 1 6 3 1 1 5 5 7 7 10 ...
output:
146823 106 116 142 162 238 283 287 304 326 329 415 435 445 450 496 548 549 619 666 688 689 694 715 728 743 749 771 776 777 812 820 823 925 942 968 970 979 989 996 1008 1043 1088 1119 1174 1223 1240 1245 1332 1341 1413 1416 1432 1461 1475 1487 1526 1553 1555 1572 1601 1644 1650 1674 1677 1688 1696 17...
result:
ok 146824 numbers
Test #35:
score: 0
Accepted
time: 1506ms
memory: 121636kb
input:
150000 300000 6 3 8 3 7 7 1 2 10 1 6 7 3 1 10 0 8 0 1 10 0 5 5 2 10 8 0 1 8 3 0 6 6 9 8 3 9 7 8 3 3 6 10 5 4 0 3 0 10 3 3 8 3 8 5 5 3 3 1 6 6 5 10 6 4 3 1 3 10 1 4 7 9 2 10 10 0 2 1 0 3 1 0 3 7 6 8 0 7 7 0 3 3 0 8 1 6 9 4 2 0 2 7 1 10 9 1 8 4 6 10 8 9 10 6 2 6 10 3 9 2 10 4 9 4 0 1 5 1 0 9 0 1 9 8 1...
output:
146520 1 60 84 88 95 106 135 144 157 166 177 245 275 318 380 405 418 458 465 539 628 682 756 770 980 1001 1006 1061 1085 1110 1230 1239 1250 1287 1299 1302 1328 1376 1390 1408 1442 1450 1473 1475 1498 1513 1541 1549 1614 1636 1707 1749 1755 1758 1783 1790 1810 1811 1832 1878 1902 1964 1966 1976 1993...
result:
ok 146521 numbers
Test #36:
score: 0
Accepted
time: 1540ms
memory: 121216kb
input:
150000 300000 5 2 9 8 10 10 9 10 2 1 7 6 0 1 1 3 4 5 5 1 6 1 3 3 1 0 7 1 3 5 0 8 9 2 2 2 0 6 1 6 9 5 0 7 4 10 10 4 4 1 8 1 6 4 7 1 1 7 8 7 1 9 3 6 6 5 0 7 5 7 10 6 10 3 10 6 6 1 8 6 10 0 2 4 8 5 0 8 10 2 10 3 0 1 10 5 4 7 0 2 0 3 1 10 9 6 10 1 1 5 8 7 9 0 5 3 9 4 7 8 8 9 9 1 4 4 5 10 6 6 3 0 1 9 1 1...
output:
146074 48 58 102 118 123 142 165 271 371 388 406 415 455 474 475 496 502 511 563 596 615 616 637 668 681 692 693 700 725 805 904 906 921 935 964 1012 1014 1042 1073 1095 1218 1289 1316 1352 1353 1410 1445 1479 1514 1518 1541 1555 1597 1659 1702 1748 1768 1798 1803 1807 1865 1866 1918 1927 1928 1960 ...
result:
ok 146075 numbers
Test #37:
score: 0
Accepted
time: 1529ms
memory: 121632kb
input:
150000 300000 0 6 10 9 1 6 5 8 10 8 4 0 8 5 2 1 0 5 9 4 10 10 2 4 9 9 3 3 1 8 3 1 10 3 0 0 9 6 6 3 1 0 6 3 2 1 4 5 8 3 2 3 0 3 3 10 8 6 1 2 1 2 1 1 4 10 4 3 10 4 4 10 6 2 7 7 10 10 7 2 3 8 0 7 7 0 1 9 6 8 8 0 4 8 5 0 1 9 8 8 5 2 2 2 4 6 6 4 3 6 6 6 0 6 1 3 10 4 9 7 9 7 1 9 4 3 1 10 5 5 10 0 6 1 7 9 ...
output:
145690 12 75 102 108 141 152 209 210 216 222 253 291 308 313 361 367 408 443 471 490 526 565 600 603 650 676 700 729 752 755 761 819 829 830 853 947 958 987 1002 1041 1140 1144 1199 1222 1243 1270 1291 1339 1348 1391 1394 1446 1470 1491 1503 1504 1518 1524 1556 1598 1603 1636 1651 1691 1704 1708 177...
result:
ok 145691 numbers
Test #38:
score: 0
Accepted
time: 1547ms
memory: 122024kb
input:
150000 300000 1 4 0 2 5 4 1 8 6 7 0 4 7 0 6 9 7 10 7 8 1 8 0 2 0 10 5 4 4 7 4 4 5 9 6 1 3 8 8 2 10 7 7 1 4 2 9 1 1 4 3 1 10 3 7 10 10 6 2 7 9 0 3 5 8 9 2 4 5 7 0 7 10 7 7 0 9 0 5 3 5 4 4 7 10 2 4 3 10 7 1 4 1 6 8 2 9 9 1 8 9 9 9 8 9 0 9 3 8 2 4 1 1 5 7 5 0 5 7 4 3 7 7 8 2 5 3 7 0 5 4 2 4 5 1 6 9 5 1...
output:
145410 22 34 71 82 114 130 163 199 204 288 384 387 392 393 419 427 436 466 528 540 550 567 587 605 613 653 678 715 718 767 847 852 864 879 889 899 919 922 941 950 968 971 973 974 989 1043 1067 1085 1099 1128 1163 1196 467 1226 1235 1241 1310 1322 1336 1448 1472 1513 1571 1596 1630 1635 1641 1650 168...
result:
ok 145411 numbers
Test #39:
score: 0
Accepted
time: 401ms
memory: 121620kb
input:
150000 300000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
149999 299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 299959 299958...
result:
ok 150000 numbers
Test #40:
score: 0
Accepted
time: 1644ms
memory: 121792kb
input:
150000 300000 7 10 4 6 3 10 6 2 6 0 4 5 2 9 8 9 10 4 8 0 6 9 2 9 2 7 1 9 7 4 2 2 1 2 2 5 5 6 10 6 1 10 0 9 0 4 2 9 10 5 7 7 1 2 8 9 0 2 9 3 2 4 4 10 9 1 3 4 9 10 3 2 0 7 5 4 9 8 0 9 6 5 0 7 5 9 4 7 6 9 6 10 5 1 4 6 2 10 8 1 5 4 3 2 6 0 4 4 0 9 7 6 3 3 9 1 0 0 4 3 5 1 5 2 9 4 1 8 9 1 2 4 2 1 4 3 7 8 ...
output:
139985 21 28 34 52 64 70 80 110 128 144 145 154 167 169 173 180 188 205 218 230 270 277 302 303 305 310 311 319 323 327 345 378 379 380 384 392 397 401 402 403 412 417 423 437 444 454 470 471 475 476 477 519 528 533 544 550 553 564 570 580 587 588 593 604 626 647 650 659 680 690 712 721 728 735 749 ...
result:
ok 139986 numbers
Test #41:
score: 0
Accepted
time: 1937ms
memory: 137964kb
input:
150000 300000 4 3 9 8 6 3 1 1 6 3 3 2 4 10 10 9 3 2 2 8 10 2 0 1 8 5 0 1 6 4 0 5 2 2 2 6 8 6 8 8 8 7 4 9 1 4 7 5 1 6 0 1 1 2 2 6 2 6 4 3 10 1 0 9 4 2 6 2 10 2 1 10 1 2 2 6 8 2 6 1 10 10 3 6 4 10 2 5 10 9 10 6 3 0 9 4 8 10 1 2 5 9 3 6 9 1 0 8 3 10 9 0 7 4 1 7 6 6 5 2 9 9 8 10 1 3 3 9 4 3 1 4 6 1 7 8 ...
output:
140060 2 3 10 12 14 32 41 43 50 57 68 79 80 89 92 105 110 111 113 119 121 124 129 133 146 148 172 177 194 198 203 205 245 251 255 256 258 259 283 295 307 311 312 332 338 368 375 377 383 386 397 399 403 406 411 416 433 436 441 478 481 487 490 491 496 499 510 512 520 534 538 547 561 573 597 604 607 60...
result:
ok 140061 numbers
Test #42:
score: 0
Accepted
time: 1814ms
memory: 122208kb
input:
150000 300000 5 6 6 4 9 4 1 9 9 1 8 6 9 9 2 5 2 4 7 9 5 9 9 7 4 9 9 1 4 1 9 2 4 8 2 3 8 10 6 9 4 5 2 10 1 3 6 2 6 8 1 9 1 7 7 4 7 0 2 0 9 2 4 3 6 9 9 9 9 3 9 6 6 4 4 1 5 7 5 7 4 10 4 4 4 0 6 6 4 10 4 8 2 2 8 5 5 10 9 1 7 7 7 6 6 9 3 10 9 5 7 1 4 9 6 3 3 9 6 9 0 8 4 10 10 4 8 4 8 7 3 5 0 2 1 6 6 7 8 ...
output:
139972 2 9 37 47 73 83 85 94 104 120 121 123 158 165 172 176 183 200 214 224 229 230 238 250 255 259 273 276 282 292 315 316 317 328 335 336 339 344 360 372 374 375 377 379 386 398 414 423 424 425 432 439 441 449 454 455 466 493 496 507 514 518 521 523 538 540 555 567 572 587 606 607 627 643 663 667...
result:
ok 139973 numbers
Test #43:
score: 0
Accepted
time: 1837ms
memory: 121864kb
input:
150000 300000 2 7 8 2 7 1 10 9 3 4 1 0 7 7 10 4 7 7 6 7 8 4 0 8 6 9 6 10 3 1 2 4 7 9 6 5 0 10 8 0 9 1 5 0 4 5 9 0 10 1 7 7 6 5 9 0 4 2 8 7 6 9 2 1 5 9 9 1 5 3 1 1 2 2 10 7 2 2 9 1 8 2 2 1 8 0 9 7 5 10 7 1 0 6 9 9 0 2 6 6 4 3 2 3 0 9 6 0 10 2 6 8 2 10 10 0 6 10 4 8 3 4 1 10 1 3 0 4 4 2 5 0 4 4 10 8 0...
output:
140239 6 11 17 52 55 58 67 72 81 99 114 122 124 127 161 163 171 197 201 203 204 212 213 215 222 223 229 253 279 280 282 296 298 302 304 306 320 322 326 333 335 337 339 346 360 363 367 369 376 389 396 397 404 415 416 423 439 440 455 459 463 468 484 485 508 510 535 541 547 551 552 559 570 578 587 593 ...
result:
ok 140240 numbers
Test #44:
score: 0
Accepted
time: 1667ms
memory: 121872kb
input:
150000 300000 2 3 9 9 2 4 7 4 7 1 10 3 4 2 8 4 0 1 2 9 9 1 9 10 0 6 5 1 9 4 2 7 2 9 5 9 1 1 0 6 3 2 7 3 10 5 6 6 4 2 6 10 7 5 9 6 4 10 9 6 4 5 10 10 8 6 1 0 3 10 7 3 6 4 1 4 1 7 2 9 1 10 6 4 4 10 5 1 0 5 9 2 2 3 7 0 7 0 3 9 1 8 6 8 9 7 7 8 0 9 2 10 1 6 5 6 9 10 5 5 10 3 3 9 0 4 9 4 9 9 8 7 6 7 7 6 5...
output:
139891 4 17 18 19 25 27 41 43 45 53 55 59 76 77 104 108 110 112 114 127 142 168 189 195 201 202 215 223 233 243 245 246 248 250 253 263 300 303 307 317 325 330 353 356 357 382 388 392 396 399 418 424 427 434 440 443 454 460 471 473 482 488 496 498 532 538 554 558 562 564 569 570 572 582 583 584 586 ...
result:
ok 139892 numbers
Test #45:
score: 0
Accepted
time: 1644ms
memory: 121824kb
input:
150000 300000 4 9 6 9 3 2 1 3 2 1 9 4 10 4 4 8 6 6 10 2 4 3 10 1 7 7 6 10 10 1 1 4 2 1 8 5 10 9 9 4 4 8 8 2 6 8 2 1 8 4 5 8 4 2 10 7 5 6 8 2 4 6 0 4 2 0 7 8 8 5 1 1 3 6 3 2 3 8 10 5 1 1 0 4 10 7 2 6 3 0 6 9 5 1 7 2 2 0 5 3 8 1 10 3 4 6 3 2 3 10 8 10 1 6 0 9 4 2 5 7 10 10 1 1 4 9 8 6 6 8 5 4 0 2 0 7 ...
output:
144114 2 14 35 41 68 70 79 92 107 116 120 137 141 146 148 150 157 162 173 174 187 188 195 214 223 224 226 241 252 262 267 270 273 278 291 292 299 325 327 339 343 345 349 354 378 391 393 397 408 409 410 424 430 463 468 470 478 482 483 486 490 510 514 521 526 527 530 553 559 584 588 615 618 656 661 67...
result:
ok 144115 numbers
Test #46:
score: 0
Accepted
time: 1565ms
memory: 121588kb
input:
150000 300000 2 2 9 2 8 0 8 6 3 6 4 8 10 10 7 2 3 5 6 10 5 3 8 8 4 0 0 7 5 5 8 10 2 0 7 10 7 9 0 10 3 1 10 2 6 4 2 1 9 4 3 6 8 0 6 7 6 5 2 10 3 1 4 10 5 2 1 10 6 2 2 7 5 0 2 1 2 1 4 6 0 5 4 10 6 6 3 10 8 10 1 4 9 2 6 5 6 4 2 7 10 5 6 5 1 7 2 0 6 6 10 7 4 8 1 4 9 3 8 4 8 6 0 2 10 7 10 3 9 10 2 2 3 7 ...
output:
146898 7 9 19 32 36 47 73 83 98 104 110 112 113 121 122 126 140 154 185 187 189 191 201 207 209 211 224 237 238 250 268 270 271 294 296 300 315 322 324 337 343 352 359 363 368 382 390 398 400 411 416 426 444 453 487 527 532 536 548 549 550 552 557 558 562 567 568 569 579 586 591 593 597 603 609 644 ...
result:
ok 146899 numbers
Test #47:
score: 0
Accepted
time: 1524ms
memory: 121480kb
input:
150000 300000 0 2 10 0 3 1 1 6 3 10 4 7 7 1 9 10 7 7 0 7 8 3 10 4 3 2 7 0 8 1 10 5 3 8 10 0 10 9 1 2 6 9 6 6 10 8 1 8 10 5 3 10 8 4 4 1 5 1 8 10 0 6 7 8 3 6 4 8 3 1 3 5 10 9 10 10 2 7 7 5 4 6 7 2 5 8 5 7 2 7 5 7 8 8 0 0 1 5 3 8 7 6 3 10 8 8 8 4 6 3 8 1 7 9 8 2 4 9 8 10 4 4 7 8 10 3 8 5 6 4 1 9 4 3 4...
output:
146556 2 3 15 22 40 41 42 46 62 69 110 119 146 153 170 188 196 210 221 228 239 240 250 251 258 279 287 295 299 301 304 315 324 325 337 339 340 344 352 380 391 392 405 418 419 421 427 429 444 446 457 458 462 465 470 480 489 494 504 521 530 545 554 585 587 626 636 642 649 651 659 666 668 673 702 703 7...
result:
ok 146557 numbers
Test #48:
score: 0
Accepted
time: 1650ms
memory: 121668kb
input:
150000 300000 10 3 9 7 10 9 9 0 5 2 4 1 10 8 6 0 2 0 6 0 7 10 2 1 1 9 0 1 2 10 8 2 1 5 10 2 4 4 8 1 4 10 2 4 1 2 3 9 9 5 10 3 5 2 10 4 9 3 7 8 1 4 2 4 0 6 1 3 0 0 9 9 3 4 4 0 3 7 2 7 9 3 9 2 2 5 2 5 3 0 7 1 10 1 7 6 3 8 1 1 7 7 0 10 0 0 4 5 3 2 1 4 6 4 1 5 0 9 2 1 0 0 7 9 5 6 10 1 9 4 6 3 1 7 7 0 7 ...
output:
146120 4 10 24 27 39 43 75 81 91 94 100 118 130 145 150 162 168 206 212 218 220 227 239 251 255 263 265 277 278 289 290 314 339 342 345 352 356 360 361 369 379 382 391 398 405 416 426 437 439 458 492 504 507 510 513 517 519 520 556 567 568 583 584 605 609 615 620 654 655 669 670 674 682 692 694 702 ...
result:
ok 146121 numbers
Test #49:
score: 0
Accepted
time: 1645ms
memory: 121696kb
input:
150000 300000 0 8 1 2 6 5 5 4 6 1 4 9 8 2 3 6 10 1 5 10 7 5 5 9 10 10 5 6 8 9 9 8 8 9 6 5 7 0 6 10 2 6 6 5 8 8 2 1 0 2 7 8 6 2 0 3 2 5 9 4 6 8 4 9 9 6 9 4 6 1 8 0 6 10 10 3 7 6 3 1 1 6 7 10 10 9 5 5 7 0 10 4 8 4 1 9 5 4 1 6 4 6 10 0 4 6 7 2 3 4 3 10 1 4 6 1 3 3 0 10 7 1 7 5 3 4 9 10 9 7 8 1 4 9 5 2 ...
output:
145800 4 6 9 25 27 34 35 37 39 40 53 56 61 63 66 70 72 74 79 83 107 136 144 147 152 172 175 178 192 194 195 198 208 217 224 232 233 240 243 247 254 261 262 266 269 275 290 306 315 332 346 350 354 357 371 379 380 385 398 406 408 413 429 440 441 451 457 459 460 464 472 476 485 490 493 504 505 517 529 ...
result:
ok 145801 numbers
Test #50:
score: 0
Accepted
time: 1632ms
memory: 121720kb
input:
150000 300000 3 0 5 8 4 2 8 2 3 1 9 2 8 2 4 3 7 5 4 7 3 2 10 0 4 7 8 2 3 1 8 4 3 8 6 1 1 10 10 5 6 10 1 2 4 8 10 2 0 7 1 8 7 2 0 6 5 5 10 3 8 4 0 0 5 3 3 5 4 7 8 10 10 4 10 0 7 4 6 2 5 10 0 1 10 4 4 9 3 2 1 2 8 1 9 9 5 9 9 9 1 0 3 9 2 1 8 3 5 4 7 2 8 1 8 8 3 3 2 0 8 6 10 1 7 3 3 9 7 6 0 8 9 10 10 1 ...
output:
145381 2 5 6 7 33 44 49 54 66 69 74 76 84 101 106 108 111 115 123 134 154 163 192 196 227 229 234 274 275 277 278 282 291 304 312 314 316 326 342 361 365 368 388 409 457 459 476 485 486 495 509 512 513 516 565 572 576 582 585 597 603 618 634 662 664 674 678 695 696 698 699 704 708 714 725 740 754 75...
result:
ok 145382 numbers
Test #51:
score: 0
Accepted
time: 227ms
memory: 121920kb
input:
300000 300000 20 66 33 86 72 81 58 0 9 69 55 70 34 99 37 62 68 36 59 20 26 3 42 44 7 73 63 85 32 56 15 48 3 81 45 68 12 78 80 35 48 2 42 38 52 42 48 53 55 38 14 33 69 15 16 20 37 16 7 22 12 1 33 38 21 14 48 0 98 65 60 43 64 58 73 45 46 27 95 46 89 41 98 7 10 37 48 75 8 82 96 69 51 0 13 60 17 63 41 1...
output:
0
result:
ok 1 number(s): "0"