QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#346079 | #8126. Restorani | OccDreamer | 33 | 193ms | 74332kb | C++14 | 3.9kb | 2024-03-07 20:15:17 | 2024-03-07 20:15:17 |
Judging History
answer
//code by Emissary
#include<bits/stdc++.h>
#define fi first
#define se second
#define vc vector
#define db double
#define ll long long
#define mk make_pair
#define pb push_back
#define PI pair<int,int>
#define ull unsigned long long
#define err cerr << " -_- " << endl
#define debug cerr << " ------------------- " << endl
#define input(x) freopen(#x".in","r",stdin)
#define output(x) freopen(#x".out","w",stdout)
#define NO puts("No")
#define YES puts("Yes")
//#define int long long
using namespace std;
namespace IO{
inline int read(){
int X=0, W=0; char ch=getchar();
while(!isdigit(ch)) W|=ch=='-', ch=getchar();
while(isdigit(ch)) X=(X<<1)+(X<<3)+(ch^48), ch=getchar();
return W?-X:X;
}
inline void write(ll x){
if(x<0) x=-x, putchar('-');
if(x>9) write(x/10);
putchar(x%10+'0');
}
inline void sprint(ll x){write(x), putchar(32);}
inline void eprint(ll x){write(x), putchar(10);}
}using namespace IO;
const int MAXN = 3e5+5;
int n, m, sum[MAXN], type[MAXN];
int ta[MAXN], tb[MAXN], siz[MAXN], tp[MAXN];
int head[MAXN], ne[MAXN<<1], to[MAXN<<1], de[MAXN], cnt;
set<PI> num[MAXN];
ll minans;
vc<int> ans;
inline void add(int x, int y){++cnt;to[cnt]=y;ne[cnt]=head[x];head[x]=cnt;}
inline void dfs(int x, int f){
siz[x]=(ta[x]?1:0)-(tb[x]?1:0); sum[x]=(ta[x]?1:0)+(tb[x]?1:0); de[x]=de[f]+1;
for(int i=head[x];i;i=ne[i]){
if(to[i]==f) continue;
dfs(to[i],x); siz[x]+=siz[to[i]]; sum[x]+=sum[to[i]];
if(!sum[to[i]]) continue;
minans+=max(2,abs(siz[to[i]])*2);
}
return ;
}
inline void construct(int x, int f){
type[x]=1;
for(int i=head[x];i;i=ne[i]){
if(to[i]==f) continue;
if(siz[to[i]]<0) continue;
construct(to[i],x);
if(type[to[i]]!=type[x]){
if(num[x].size()>num[to[i]].size()) swap(num[x],num[to[i]]), swap(type[x],type[to[i]]);
while(num[x].size()){
if(type[x]==1) ans.pb((*num[x].rbegin()).se), ans.pb((*num[to[i]].rbegin()).se);
else ans.pb((*num[to[i]].rbegin()).se), ans.pb((*num[x].rbegin()).se);
num[x].erase(*num[x].rbegin()); num[to[i]].erase(*num[to[i]].rbegin());
}
swap(num[x],num[to[i]]); type[x]=type[to[i]];
}
else{
if(num[x].size()<num[to[i]].size()) swap(num[x],num[to[i]]);
for(auto j:num[to[i]]) num[x].insert(j);
}
}
for(int i=head[x];i;i=ne[i]){
if(to[i]==f) continue;
if(siz[to[i]]>=0) continue;
construct(to[i],x);
if(type[to[i]]!=type[x]){
if(num[x].size()>num[to[i]].size()) swap(num[x],num[to[i]]), swap(type[x],type[to[i]]);
while(num[x].size()){
if(type[x]==1) ans.pb((*num[x].rbegin()).se), ans.pb((*num[to[i]].begin()).se);
else ans.pb((*num[to[i]].begin()).se), ans.pb((*num[x].rbegin()).se);
num[x].erase(*num[x].rbegin()); num[to[i]].erase(*num[to[i]].begin());
}
swap(num[x],num[to[i]]); type[x]=type[to[i]];
}
else{
if(num[x].size()<num[to[i]].size()) swap(num[x],num[to[i]]);
for(auto j:num[to[i]]) num[x].insert(j);
}
}
if(ta[x]){
if(num[x].size()==0) num[x].insert(mk(de[x],ta[x])), type[x]=1;
else{
if(type[x]==1) num[x].insert(mk(de[x],ta[x]));
else{
ans.pb(ta[x]); ans.pb((*num[x].rbegin()).se); num[x].erase(*num[x].rbegin());
}
}
}
if(tb[x]){
if(num[x].size()==0) num[x].insert(mk(de[x],tb[x])), type[x]=2;
else{
if(type[x]==2) num[x].insert(mk(de[x],tb[x]));
else{
ans.pb((*num[x].rbegin()).se); ans.pb(tb[x]); num[x].erase(*num[x].rbegin());
}
}
}
tp[x]=type[x];
return ;
}
signed main(){
n=read(), m=read();
for(int i=1;i<=m;++i) ta[read()]=i;
for(int i=1;i<=m;++i) tb[read()]=i;
for(int i=2;i<=n;++i){
int x, y;
x=read(), y=read();
add(x,y), add(y,x);
}
dfs(1,0); construct(1,0);
eprint(minans);
for(auto i:ans) sprint(i);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 6
Acceptable Answer
Test #1:
score: 20
Accepted
time: 5ms
memory: 25072kb
input:
1 1 1 1
output:
0 1 1
result:
ok
Test #2:
score: 20
Accepted
time: 0ms
memory: 26452kb
input:
5 3 3 1 2 4 2 1 1 2 2 3 3 4 4 5
output:
6 1 1 3 2 2 3
result:
ok
Test #3:
score: 20
Accepted
time: 0ms
memory: 29024kb
input:
4999 10 4738 1635 1963 2369 3205 2391 4217 3652 4299 4715 4453 194 1247 3569 2163 1817 1130 2997 1111 3271 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 ...
output:
22850 1 1 10 4 9 10 7 8 8 5 5 6 6 3 4 7 3 9 2 2
result:
ok
Test #4:
score: 6
Acceptable Answer
time: 2ms
memory: 28664kb
input:
5000 10 4081 160 1439 1557 2086 1753 2818 2417 4018 4079 4849 229 2458 4370 2939 2876 2221 3787 1463 3841 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 3...
output:
13114 1 1 10 4 9 10 7 8 8 5 5 6 6 3 4 7 3 9 2 2
result:
points 0.30
Test #5:
score: 20
Accepted
time: 0ms
memory: 27540kb
input:
5000 10 4590 3895 443 784 1335 1588 2195 823 3582 4229 4075 251 629 447 3074 620 1529 3402 3985 3998 4693 4634 4084 286 1355 992 404 127 4126 2543 2267 1302 668 3003 3351 1077 3014 413 4529 1319 4467 100 860 619 4720 2695 3412 2593 4511 1554 4210 727 3609 2670 478 136 4451 2437 2199 922 4588 1801 13...
output:
2090 4 1 10 4 6 10 7 5 5 6 8 8 2 9 9 2 3 7 1 3
result:
ok
Test #6:
score: 6
Acceptable Answer
time: 0ms
memory: 26220kb
input:
4 2 4 1 2 3 1 2 2 3 3 4
output:
6 1 2 2 1
result:
points 0.30
Test #7:
score: 6
Acceptable Answer
time: 4ms
memory: 28096kb
input:
16 8 15 6 2 9 16 5 12 3 14 1 10 4 8 11 7 13 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
output:
34 5 1 1 8 7 6 4 3 2 5 6 7 8 4 3 2
result:
points 0.30
Test #8:
score: 20
Accepted
time: 3ms
memory: 27456kb
input:
21 10 7 2 1 9 4 5 6 8 10 3 10 2 1 3 5 4 6 7 8 9 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
output:
18 9 1 4 10 8 9 1 8 7 7 6 5 5 6 10 4 2 2 3 3
result:
ok
Test #9:
score: 20
Accepted
time: 0ms
memory: 27572kb
input:
5000 10 2551 2546 2545 2553 2548 2549 2550 2552 2554 2547 110 102 101 103 105 104 106 107 108 109 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 ...
output:
49080 9 1 4 10 8 9 1 8 7 7 6 5 5 6 10 4 2 2 3 3
result:
ok
Test #10:
score: 20
Accepted
time: 0ms
memory: 27600kb
input:
2499 10 1118 1 615 88 284 552 268 862 2140 1050 2140 1 88 268 862 552 284 1118 615 1050 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 3...
output:
4278 9 1 1 8 10 10 8 5 3 9 6 6 5 7 7 4 4 3 2 2
result:
ok
Test #11:
score: 20
Accepted
time: 0ms
memory: 27480kb
input:
10 5 4 8 1 3 2 3 4 2 1 8 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10
output:
14 2 5 1 2 4 1 5 3 3 4
result:
ok
Test #12:
score: 20
Accepted
time: 0ms
memory: 28524kb
input:
10 3 6 9 1 9 1 4 10 9 3 2 5 2 6 2 9 2 9 1 9 7 9 8 9 4
output:
8 1 3 2 1 3 2
result:
ok
Test #13:
score: 20
Accepted
time: 0ms
memory: 27776kb
input:
17 1 5 3 16 4 5 2 16 7 16 10 14 2 16 3 8 7 15 9 17 2 16 1 16 2 16 12 16 15 16 13 16 11 13 6
output:
8 1 1
result:
ok
Test #14:
score: 20
Accepted
time: 4ms
memory: 27832kb
input:
157 2 94 79 27 4 150 114 36 150 122 93 80 126 122 134 81 20 150 28 137 109 65 99 150 48 100 36 61 7 97 51 52 46 153 124 21 140 107 79 24 6 63 96 62 53 82 63 73 19 56 5 154 129 114 74 64 26 81 15 95 63 150 141 73 17 103 40 98 80 76 145 46 26 78 40 11 155 86 138 75 23 121 91 123 91 92 57 56 13 133 57 ...
output:
32 1 1 2 2
result:
ok
Test #15:
score: 6
Acceptable Answer
time: 0ms
memory: 28220kb
input:
3872 9 2464 109 2649 3296 3698 1576 2921 2069 2627 3399 1773 2214 2313 2376 2692 2926 2776 3033 3849 209 2804 1184 2027 461 3241 1252 3384 1993 1699 253 2816 2064 2504 1607 3429 3280 476 621 3852 3039 2902 1939 3139 938 776 64 1611 410 3552 2247 3381 3277 1285 1513 2422 1325 2983 2554 3000 2380 1218...
output:
186 8 2 4 5 3 9 6 4 7 3 9 1 1 8 2 7 5 6
result:
points 0.30
Test #16:
score: 6
Acceptable Answer
time: 0ms
memory: 27416kb
input:
4981 8 4646 4356 3057 1258 3188 3259 459 3590 4469 3207 3516 2277 1290 2167 3902 2370 4699 126 2246 796 2093 996 3291 4878 3346 1078 473 1354 4890 2675 1334 1122 2926 1119 2502 1697 3803 4568 4111 3095 888 110 2980 1057 8 1675 517 191 3194 2312 3737 806 3894 2470 4022 1535 4663 3091 4210 2785 2367 7...
output:
160 1 2 3 5 8 7 6 8 2 3 5 6 4 4 7 1
result:
points 0.30
Test #17:
score: 20
Accepted
time: 0ms
memory: 27464kb
input:
5000 1 623 1961 4963 2290 1997 3588 3626 2518 2939 4767 4009 2239 4840 957 206 617 94 3838 1518 971 4885 4185 4195 364 2504 256 4556 99 2430 2189 4010 2480 2223 1842 4594 26 356 217 3945 3346 1181 1669 4752 4522 1766 1037 3419 2346 3633 3046 4681 1326 4131 1752 437 274 1734 781 4937 2526 4963 2397 4...
output:
28 1 1
result:
ok
Test #18:
score: 20
Accepted
time: 0ms
memory: 28152kb
input:
5000 2 623 1713 3501 2788 4977 4772 2473 2081 727 535 2201 111 4741 4478 4267 2126 4562 2478 1165 307 428 66 47 388 3235 1692 1156 1127 1869 1675 8 387 3338 3899 3547 4894 3398 2639 304 489 4920 279 1071 436 4099 3041 2450 1401 305 3071 2569 2387 3840 4238 886 448 3777 77 4946 4278 3634 1913 209 202...
output:
50 2 1 1 2
result:
ok
Test #19:
score: 6
Acceptable Answer
time: 0ms
memory: 28928kb
input:
5000 10 4458 613 623 797 4825 1713 873 1857 4164 1940 3781 2847 2353 991 4533 1225 3961 2517 597 942 4908 3994 1382 997 4164 616 4916 499 3302 3209 141 62 4542 201 2641 1984 4973 4760 3931 2032 1607 1311 4316 644 4318 1450 187 4 1885 801 4252 3412 4674 4534 1297 490 4304 1866 2967 1763 1845 755 1447...
output:
178 6 10 1 1 3 9 2 7 4 5 5 4 9 2 8 3 7 6 10 8
result:
points 0.30
Test #20:
score: 20
Accepted
time: 0ms
memory: 27996kb
input:
5000 10 4270 3949 193 268 604 801 1699 327 3283 4255 4956 894 2985 1388 3112 2953 3033 3666 4473 4641 4705 2987 4102 658 1426 515 480 27 4138 1088 2346 2083 1381 3040 3361 1459 3048 2170 4540 189 4471 2267 893 47 4730 2712 3407 965 4518 63 4216 428 3616 230 543 405 4456 560 2278 771 4597 114 1423 38...
output:
4046 6 1 5 8 9 5 1 3 3 6 4 2 7 7 10 10 8 4 2 9
result:
ok
Test #21:
score: 20
Accepted
time: 4ms
memory: 29268kb
input:
5000 10 4378 3653 227 499 815 2076 3467 767 3608 3864 4588 195 1801 242 3577 428 2941 3995 4216 4325 4694 3315 4084 551 1449 1288 527 42 4126 1520 2342 1114 2260 3034 3366 3171 3047 1197 4528 2556 4458 3786 880 562 4722 2175 3425 1414 4506 335 4201 2145 3616 1158 576 362 4441 1677 2271 2181 4589 909...
output:
10900 6 1 7 8 1 5 4 3 5 6 3 4 8 7 2 10 9 9 10 2
result:
ok
Test #22:
score: 6
Acceptable Answer
time: 3ms
memory: 28536kb
input:
17 2 16 1 13 6 16 4 16 2 16 10 14 2 17 2 13 6 16 11 16 13 15 9 16 3 16 7 16 12 8 7 16 1 16 15 5 2
output:
8 1 2 2 1
result:
points 0.30
Test #23:
score: 20
Accepted
time: 0ms
memory: 28528kb
input:
2817 9 2520 627 676 851 2657 954 1659 1804 1448 2576 2688 569 280 1170 1575 1272 2015 2564 2798 2585 2600 1107 341 205 2760 2617 2655 1669 449 797 1354 1022 1122 913 2500 265 2604 1200 2707 2421 87 1945 753 51 1995 1091 1025 338 2341 360 2668 2353 1386 211 1545 1078 1669 364 2454 271 1497 217 2775 1...
output:
184 8 6 7 1 3 5 9 7 6 2 1 3 5 8 4 4 2 9
result:
ok
Test #24:
score: 20
Accepted
time: 0ms
memory: 28120kb
input:
5000 10 4696 3066 282 1979 3213 2755 1573 721 3015 4018 4778 1065 3485 1605 3591 3937 4930 1838 4399 2133 4875 4865 2597 2095 1997 9 3748 504 749 2204 657 204 1665 1657 4187 3867 4366 411 3170 1113 4443 1615 3968 686 4766 3242 3082 1755 4717 2760 3772 3450 4559 913 343 241 3874 3474 1242 975 4123 57...
output:
186 6 9 9 4 2 6 8 7 7 3 3 5 10 10 5 1 4 2 1 8
result:
ok
Test #25:
score: 6
Acceptable Answer
time: 0ms
memory: 28308kb
input:
5000 10 4469 4270 155 381 2901 3283 3397 2882 3866 4386 4103 461 513 462 521 464 519 1028 3103 4029 4698 654 4085 3723 1365 567 400 332 4126 2391 2255 1058 977 2980 3335 1373 2992 1323 4533 386 4472 2543 826 494 4725 397 3391 777 4515 3873 4207 4157 3595 1131 477 183 4454 1218 2195 520 4589 1144 136...
output:
5522 2 6 5 5 4 2 6 7 10 3 9 9 1 1 7 4 3 10 8 8
result:
points 0.30
Test #26:
score: 20
Accepted
time: 0ms
memory: 28776kb
input:
6 6 6 1 2 3 4 5 5 1 4 2 6 3 6 1 3 1 6 2 6 5 6 4
output:
10 4 6 5 3 6 1 3 4 1 5 2 2
result:
ok
Test #27:
score: 20
Accepted
time: 2ms
memory: 28996kb
input:
4999 9 3758 758 3948 4035 1804 2407 2777 2213 1576 3948 2407 1804 1576 758 2213 2777 4035 3758 4977 1086 1501 170 4169 2804 1322 85 2634 4032 3869 3837 4977 4559 1839 549 3822 2185 3876 4059 2467 4331 3681 2582 3599 2808 3026 2896 3589 53 3793 1895 4702 1316 4469 3878 4270 1498 3946 2110 935 508 300...
output:
106 4 8 8 6 7 7 2 5 6 2 3 1 5 3 9 4 1 9
result:
ok
Test #28:
score: 6
Acceptable Answer
time: 0ms
memory: 27464kb
input:
16 8 6 1 10 14 13 15 7 8 4 16 2 3 12 5 9 11 15 13 3 2 5 1 12 3 8 6 9 8 7 5 10 1 16 2 6 11 16 10 14 13 11 7 14 12 15 4
output:
34 8 7 1 8 7 6 6 1 5 5 4 4 3 3 2 2
result:
points 0.30
Test #29:
score: 20
Accepted
time: 0ms
memory: 28288kb
input:
2 1 2 1 2 1
output:
2 1 1
result:
ok
Test #30:
score: 6
Acceptable Answer
time: 0ms
memory: 29008kb
input:
1928 5 1317 1443 873 936 473 1053 1518 351 507 225 1916 1442 1438 29 1746 1556 1242 1095 1511 1122 1233 337 1089 1026 1132 842 1876 867 1386 1853 1373 285 1918 766 1688 1299 1915 1475 931 253 324 303 1824 800 1559 251 1384 693 773 354 1751 543 1158 992 103 449 1267 621 1877 175 1058 581 1717 596 963...
output:
614 4 5 3 1 2 2 5 3 1 4
result:
points 0.30
Test #31:
score: 20
Accepted
time: 0ms
memory: 29268kb
input:
4921 9 3402 499 3710 4889 2086 3001 4750 2222 1535 3626 810 442 3684 3362 2926 2863 3267 3462 4778 1244 1810 1724 3394 2453 4798 3784 1387 2916 3507 3347 3761 2062 3004 1299 3470 3015 4827 4008 4768 3153 1507 1051 4439 917 1160 540 4365 1779 330 136 3657 2683 390 124 4615 1969 809 126 4197 2083 395 ...
output:
7368 1 8 5 5 7 2 6 7 2 3 3 6 4 9 8 4 9 1
result:
ok
Test #32:
score: 6
Acceptable Answer
time: 2ms
memory: 27416kb
input:
5000 10 4458 613 623 797 4825 1713 873 1857 4164 1940 3781 2847 2353 991 4533 1225 3961 2517 597 942 4858 2141 1343 887 4081 3933 4867 1056 3171 476 125 17 4464 2238 2575 2149 4925 2990 3801 633 1593 460 4229 3141 4231 3946 147 59 1850 653 4170 835 4610 1529 1289 893 4214 3386 2857 2600 1821 884 141...
output:
4884 4 3 9 6 6 7 3 10 5 1 10 9 8 4 2 5 7 2 1 8
result:
points 0.30
Test #33:
score: 6
Acceptable Answer
time: 0ms
memory: 27828kb
input:
5000 10 4458 613 623 797 4825 1713 873 1857 4164 1940 3781 2847 2353 991 4533 1225 3961 2517 597 942 4857 2124 1288 1000 4098 2018 4865 2522 3146 614 74 67 4483 3738 2543 1622 4926 708 3819 1792 1530 413 4258 1384 4260 3312 90 72 1838 1482 4189 2936 4623 4605 1203 485 4245 3737 2825 1407 1811 1527 1...
output:
1594 2 2 7 5 4 3 9 6 6 7 3 10 5 1 10 9 8 4 1 8
result:
points 0.30
Test #34:
score: 6
Acceptable Answer
time: 2ms
memory: 28228kb
input:
5000 10 4458 613 623 797 4825 1713 873 1857 4164 1940 3781 2847 2353 991 4533 1225 3961 2517 597 942 4868 3203 1339 1302 4077 68 4877 3162 3153 399 153 51 4467 3130 2582 538 4937 675 3782 2312 1574 789 4234 2663 4238 217 235 63 1863 1525 4163 1580 4618 3013 1272 40 4216 426 2850 2524 1831 687 1405 1...
output:
862 2 2 1 8 10 5 8 4 3 10 4 7 6 6 9 3 7 9 5 1
result:
points 0.30
Test #35:
score: 6
Acceptable Answer
time: 4ms
memory: 29132kb
input:
5000 10 4345 3623 1251 1656 2486 2840 3301 2372 3310 4183 4663 5 598 196 1996 528 1900 2403 2506 3928 4701 3003 4102 369 1428 191 502 491 4145 1808 2320 1721 2931 3037 3384 2812 3047 1197 4536 233 4475 1909 952 839 4726 30 3435 1646 4516 2686 4220 2321 3623 2372 566 285 4460 4452 2256 1162 4595 2592...
output:
18250 10 6 7 2 4 4 3 10 2 5 8 1 9 8 5 7 1 3 6 9
result:
points 0.30
Subtask #2:
score: 6
Acceptable Answer
Test #36:
score: 6
Acceptable Answer
time: 46ms
memory: 69616kb
input:
300000 100000 109370 205978 224742 196992 72895 175835 177858 199406 235175 124763 18605 240852 170753 234091 260042 224910 164378 18209 253733 55514 99033 39740 131545 58235 237944 168314 28570 283886 209944 126973 228465 187033 94132 153369 248330 47334 58875 113999 224027 260133 131708 288915 269...
output:
116515888 59780 55567 98252 43947 31011 29842 6783 18580 8602 50884 58624 16560 38535 47080 42251 929 68013 29380 5410 59077 60867 18982 65252 10685 52692 77305 9855 54207 30351 42840 89778 86919 14643 62717 38347 80090 50102 37754 5179 66177 58050 46271 97062 53971 77463 37459 52926 59757 71444 199...
result:
points 0.30
Test #37:
score: 6
Acceptable Answer
time: 31ms
memory: 69624kb
input:
300000 100000 78104 59245 233648 165428 2192 22736 35858 194280 105542 298270 295983 171397 287383 48744 94371 247725 17240 284014 145716 241255 277268 20241 163824 66458 174400 258032 60761 219926 78082 47269 221147 214615 112035 56330 121572 130231 293390 87157 279843 70509 120469 276044 168463 11...
output:
60815296 14072 21700 89442 72341 16153 39928 75713 29651 71063 61518 59299 40970 55422 49810 16926 75806 30400 68072 609 98970 43965 21631 50588 36861 47875 36302 37592 90925 72336 79674 30468 66577 69965 44405 37583 32615 53128 11718 95560 59138 63794 53135 96999 26365 22577 61559 66435 93847 85842...
result:
points 0.30
Test #38:
score: 6
Acceptable Answer
time: 43ms
memory: 69612kb
input:
300000 100000 292448 199070 173170 54188 171603 295091 38523 173211 224713 165318 30005 60643 127072 258304 250302 283513 35517 217817 290506 216778 1255 205914 186772 139356 148655 187145 80717 103726 211824 88045 50341 13888 88321 227387 296719 25255 216481 90974 128822 17972 15248 175704 69082 29...
output:
79323292 67257 1980 93413 63653 27996 33662 98752 58237 90347 29640 33863 96397 11433 97768 43745 3939 22441 27112 73689 1624 10144 83576 85962 2254 3388 64829 48149 60163 92669 81469 7229 23693 94450 86190 88600 71308 47498 9552 84028 98004 26673 93531 59875 22699 42988 54817 18443 63824 45771 6493...
result:
points 0.30
Test #39:
score: 6
Acceptable Answer
time: 43ms
memory: 69564kb
input:
300000 100000 259894 108202 69889 156488 107893 273991 7023 126629 242999 178147 38293 260264 194747 93963 204043 31882 175838 5540 244773 60866 26150 285324 92140 136508 269884 111077 58827 174985 131142 178166 177887 121395 266396 270678 182021 50518 68471 141240 105740 17598 24467 89133 70300 128...
output:
53630140 56129 38015 96364 1829 96227 30116 88858 74028 12251 81542 82719 9175 88655 84692 42981 44739 26747 30503 18443 7108 31158 422 58984 89002 30988 34533 68127 45951 56444 224 40266 85025 45174 89909 19676 96319 40508 64777 92358 56771 19991 27394 94527 31231 58383 87223 26804 76474 94574 1724...
result:
points 0.30
Test #40:
score: 6
Acceptable Answer
time: 39ms
memory: 69596kb
input:
300000 100000 7275 5342 274978 143716 204803 61205 82668 221004 90828 15162 274350 209209 18338 155618 123101 126471 44381 31238 22868 103631 291741 76537 279513 258654 277609 34276 169274 45557 198440 212996 124022 250995 152741 3471 15762 37427 48552 174743 283593 239418 87624 172390 262470 45847 ...
output:
103873560 71065 36465 51644 15286 62296 65962 58187 82840 62253 9361 69376 86147 73001 35657 70038 33505 81785 44276 50157 27504 71802 49863 59860 70305 42316 21086 92460 72938 22586 67022 29528 93529 20308 85550 22545 11441 69647 28291 42710 96307 49484 69582 72317 35593 64869 24423 93802 61444 401...
result:
points 0.30
Test #41:
score: 6
Acceptable Answer
time: 24ms
memory: 69612kb
input:
300000 100000 132157 51421 83351 201059 182309 166105 191875 91992 50161 174086 150630 290244 22984 129110 126308 237286 266969 218298 37613 210468 4409 93720 105737 185847 129292 258583 4490 151679 31999 3441 289387 29592 272057 80780 13529 71072 181907 189929 269145 80825 155396 191507 298255 2548...
output:
132658800 57318 87467 40653 63817 1519 89329 67718 50823 98392 3063 16645 5494 96287 56600 44611 30225 6184 31256 50885 39733 26888 80809 68470 40820 65574 85611 19386 15760 95365 31708 25957 30443 40125 82335 88906 58072 67178 64470 37154 42874 49798 29124 14052 28479 59056 70373 93118 11514 78923 ...
result:
points 0.30
Test #42:
score: 6
Acceptable Answer
time: 39ms
memory: 73912kb
input:
300000 100000 14703 321 148729 6226 112820 402 106053 7051 52501 58958 91203 28729 31077 107202 47610 18416 115995 3370 42803 70206 110257 145766 17703 66220 76615 36147 70751 116484 41199 34916 95432 149021 59011 144333 136468 119765 72781 79257 30022 1608 125792 74377 132544 128572 74955 65003 104...
output:
30011857656 86007 56190 14644 56833 26601 94236 69581 63623 37783 8250 48412 22120 2889 91534 97862 30564 40921 39757 7418 55818 5293 66466 12541 13544 31914 26123 15318 70480 25496 5532 54779 98617 39421 23161 94838 90503 60766 62205 82905 78403 8643 92763 38170 65837 51765 33279 29201 5415 22186 5...
result:
points 0.30
Test #43:
score: 6
Acceptable Answer
time: 39ms
memory: 73492kb
input:
300000 100000 92628 11729 78551 16660 145993 145352 29831 75532 104257 137875 135078 93944 84860 31799 23113 21522 148357 145017 25404 30444 22710 34939 138582 111123 139715 53615 25652 55857 33092 98278 135854 122130 52044 81318 122920 45743 66818 11929 15687 72794 98537 51758 149713 38919 88287 66...
output:
30021352238 74177 95300 36440 75901 81811 89316 9138 57180 86246 627 56663 62650 33745 7142 68949 17534 16900 25461 75833 20831 492 51554 50113 34468 17301 98703 95567 52852 43592 19981 534 76764 10881 56549 82892 90307 89195 72495 86945 11611 15303 77041 35843 66944 67654 86589 48114 43977 45393 88...
result:
points 0.30
Test #44:
score: 6
Acceptable Answer
time: 43ms
memory: 73964kb
input:
300000 100000 71190 112764 61437 5974 75159 139293 42548 35119 119047 112188 49725 2778 110472 61515 92904 111892 89239 64144 92455 118602 89158 61407 19707 127455 97856 65435 45546 81154 121812 111805 85556 76660 86967 16371 25381 39364 8688 91902 89949 74697 30562 116124 74700 148706 137122 73850 ...
output:
30003829366 24609 79963 69233 63065 13054 91758 62827 39011 99410 84358 77997 4856 1692 81773 72347 48703 47898 52326 16799 71007 33807 43131 67365 32136 62498 18064 15963 34209 18989 9932 12973 37456 72108 97335 25573 74745 18837 71603 27660 55464 92803 20793 22408 89511 57366 66979 50243 60406 315...
result:
points 0.30
Test #45:
score: 6
Acceptable Answer
time: 29ms
memory: 73948kb
input:
300000 100000 136663 131802 33350 62985 132134 73310 18157 70972 30604 94190 93357 57489 50841 145823 145715 3647 146431 51557 140151 136582 47590 92827 135836 19659 22662 131371 76417 78366 119549 68044 26864 66026 126854 3119 72952 131845 24840 27268 75073 59021 147332 138093 76987 93873 90986 236...
output:
30004707654 55648 44770 23301 81843 58729 70514 28553 76906 94783 4057 21653 78644 81060 51482 48249 37348 93454 50292 17309 47083 20127 89143 71746 4032 17266 89225 73492 26694 77724 48234 40429 1708 80924 18430 30861 46156 19478 53103 8965 94176 61215 54967 72130 47459 11037 6160 86922 91843 93269...
result:
points 0.30
Subtask #3:
score: 9
Acceptable Answer
Test #46:
score: 9
Acceptable Answer
time: 6ms
memory: 28596kb
input:
5000 2000 4078 2691 3285 4560 722 2633 1060 29 771 12 1702 164 4924 4572 906 2334 2800 3353 610 3939 4869 2690 3185 2079 2738 199 1926 2000 4985 39 1504 7 1350 3735 4371 1992 4196 555 393 2320 2194 114 831 28 424 1355 2010 3279 4932 3450 4345 4991 2758 96 2884 4840 1778 92 1691 256 666 792 3757 1986...
output:
157268 609 657 1341 1387 699 991 52 1402 1173 1445 1891 956 29 1 1035 1817 1660 889 243 1304 1511 601 596 1709 685 1289 1656 1688 337 1873 830 546 377 207 1449 1053 1909 1551 1527 421 1456 221 566 665 1093 99 810 619 1065 307 749 986 49 1160 1195 1934 13 415 973 1683 557 589 1481 129 1831 865 1914 1...
result:
points 0.30
Test #47:
score: 9
Acceptable Answer
time: 2ms
memory: 27972kb
input:
5000 2500 4860 5 830 1667 4815 1635 148 3 3327 2724 4663 3000 2905 176 29 4713 3719 2445 1867 665 1179 713 1272 252 857 3049 3823 4941 2384 1777 4832 398 2959 812 3701 159 3093 263 4172 1131 2731 433 2969 53 4414 3341 1932 108 3549 3453 4990 1741 1605 10 3306 2450 4096 3164 2049 1439 4304 520 696 51...
output:
187990 1577 621 2199 1752 2467 1559 477 771 232 1210 131 290 51 1102 1105 766 1545 1517 2419 1443 1193 881 2255 1217 1648 1201 1354 1205 349 1343 2077 2378 2449 2189 842 251 1489 393 1708 1277 528 501 327 42 2143 577 214 60 1237 1701 1786 892 1507 2115 1526 1702 937 1090 627 488 911 1349 904 640 827...
result:
points 0.30
Test #48:
score: 9
Acceptable Answer
time: 0ms
memory: 28344kb
input:
768 384 714 341 550 49 696 1 339 335 604 399 488 91 710 499 659 117 688 513 684 265 608 645 346 353 71 167 118 225 620 53 371 293 255 543 429 235 478 25 498 461 709 72 9 250 203 529 656 147 411 6 505 408 15 35 195 224 127 222 54 193 660 18 283 755 56 711 145 599 557 385 208 437 648 107 420 211 484 1...
output:
2390 193 241 188 101 115 193 305 195 119 340 277 209 333 253 64 237 286 17 196 319 355 344 231 88 83 169 265 185 369 140 337 378 351 331 158 225 101 247 125 183 280 198 91 365 287 155 331 63 323 289 1 77 121 176 66 139 13 236 41 21 80 231 340 89 211 228 81 300 199 153 157 304 5 165 345 364 147 343 2...
result:
points 0.30
Test #49:
score: 9
Acceptable Answer
time: 0ms
memory: 28524kb
input:
1792 896 1785 1442 532 1578 267 1140 1485 880 634 61 613 17 952 957 390 1005 1217 1550 1167 35 425 714 956 88 420 89 744 1732 1316 147 1087 547 1048 272 1574 25 1590 1359 382 800 1149 31 1253 395 628 1173 808 92 1416 1351 1226 139 1669 839 679 257 1533 1619 1194 570 1475 58 438 1608 703 1737 566 107...
output:
5902 411 223 81 552 568 20 1 827 665 706 242 670 871 325 701 685 70 31 485 777 657 656 606 131 361 890 294 713 549 183 245 849 75 796 415 229 870 746 493 257 241 470 382 311 784 39 637 566 781 569 265 297 611 846 66 116 218 831 586 323 28 574 616 577 407 226 565 103 392 287 672 43 545 361 111 584 36...
result:
points 0.30
Test #50:
score: 9
Acceptable Answer
time: 0ms
memory: 27712kb
input:
4096 2048 3973 1 1666 3109 1877 3625 2118 1979 2968 3775 2607 3003 1564 1427 1368 2369 2190 1335 1591 24 2147 1883 1422 30 3200 736 3394 3007 3054 1441 3202 2603 1687 899 3321 129 2756 1237 1075 3073 1465 723 3061 293 128 2899 3139 3555 2765 2459 333 651 2053 2847 1837 2143 1244 83 1641 2379 1642 39...
output:
14186 171 161 1210 481 145 25 325 1191 1335 2039 1497 2023 741 1195 460 754 1701 284 877 1513 71 629 1965 1081 1311 1045 1940 2021 196 1567 1453 673 1180 1155 1161 1412 848 1357 867 1037 1307 67 1217 1082 1681 1680 1386 289 1521 855 1429 787 757 373 1116 399 1648 652 743 2040 1298 1246 1929 1529 175...
result:
points 0.30
Test #51:
score: 9
Acceptable Answer
time: 5ms
memory: 27416kb
input:
5000 2500 4904 789 782 2415 4485 3389 4025 13 3774 3414 4459 1592 4290 1622 4903 1169 4845 3896 2258 467 3850 1180 1488 1200 4824 4428 2579 2543 2238 548 3214 182 4226 2995 3244 930 3142 3120 117 443 3161 456 1496 3217 1983 1218 221 1639 4069 928 1114 3667 1364 4576 3937 2162 2199 3087 4905 4466 314...
output:
536470 1336 439 2073 1486 1071 434 1998 43 1729 820 18 1117 1580 1206 1703 2470 2404 175 338 1062 804 2130 896 2196 536 2215 1415 2023 1063 1559 1664 803 2072 1144 2452 2367 809 112 1577 1242 2490 999 701 1216 2443 2386 1389 734 630 1403 82 1689 1877 1448 1398 331 2276 1663 1609 1797 1376 862 111 18...
result:
points 0.30
Test #52:
score: 9
Acceptable Answer
time: 0ms
memory: 28576kb
input:
5000 2300 2122 83 2044 425 278 1469 597 301 1767 454 1133 320 1724 32 2141 575 1094 355 661 747 1888 535 81 895 835 2233 1324 2111 2150 1599 1524 944 405 2061 444 817 2298 56 1271 873 938 2035 1480 1194 1880 679 876 1841 2124 66 149 1151 921 1343 1515 1209 1350 1847 293 923 1363 245 1142 1387 94 79 ...
output:
3739844 1689 1017 847 220 1027 1525 1530 2217 1961 2051 1865 596 2219 911 614 1781 1363 1273 168 1009 1939 61 1552 418 1457 1393 1934 1970 1009 1405 1992 1411 1864 667 1585 619 2177 2268 1169 1021 249 1801 1527 2266 227 1 256 1653 37 1647 894 1821 553 1939 2269 1065 1325 1729 976 1400 161 1791 133 1...
result:
points 0.30
Test #53:
score: 30
Accepted
time: 0ms
memory: 28820kb
input:
5000 2500 4930 2499 4460 2841 2694 3885 3013 2717 4183 2870 3549 2736 4140 2448 4557 2991 3510 2771 3077 3163 4304 2951 2497 3311 3251 4649 3740 4527 4566 4015 3940 3360 2821 4477 2860 3233 4714 2472 3687 3289 3354 4451 3896 3610 4296 3095 3292 4257 4540 2482 2565 3567 3337 3759 3931 3625 3766 4263 ...
output:
2368930 2233 1525 1879 2245 2309 1007 2099 1152 2077 585 506 1361 2354 851 2410 1974 1 1536 1077 1986 1249 1501 538 2246 595 1 2492 522 1519 563 782 1492 433 571 482 1839 1291 2345 1771 1504 1169 2353 159 1865 1387 2053 1325 2348 437 1437 1285 676 1177 2433 1381 403 1129 865 1992 974 1331 1956 2295 ...
result:
ok
Test #54:
score: 30
Accepted
time: 0ms
memory: 28652kb
input:
5000 2983 4252 1613 3574 1955 1808 2999 4454 1831 4480 4459 2663 1850 3254 1562 3671 2105 2624 1885 2191 2277 4395 2065 1611 2425 4210 3763 2854 3641 3680 3129 3054 2474 1935 3591 4476 2347 4421 1586 2801 2403 2468 3565 3010 2724 3410 2209 2406 3371 3654 1596 4418 2681 2451 2873 3045 2739 4260 3377 ...
output:
6670856 886 2585 1939 505 478 1949 2267 893 1438 1990 243 1839 958 898 505 529 2806 139 471 799 808 1744 1189 1365 200 727 1667 21 1016 1612 1348 1323 2041 2935 665 155 1903 1681 1411 877 2138 2034 2153 951 1495 694 766 1929 2740 1888 2895 1873 822 1304 2553 1617 1928 214 927 2956 2172 1682 2881 264...
result:
ok
Test #55:
score: 30
Accepted
time: 0ms
memory: 29144kb
input:
5000 1 1069 1069 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 ...
output:
2136 1 1
result:
ok
Test #56:
score: 30
Accepted
time: 5ms
memory: 27928kb
input:
5000 2 3970 1069 3970 1069 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...
output:
7938 1 1 2 2
result:
ok
Test #57:
score: 30
Accepted
time: 0ms
memory: 28872kb
input:
5000 7 4326 1069 2799 2836 1938 3733 3970 3733 1069 4326 2799 2836 3970 1938 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 ...
output:
8650 1 3 7 6 6 1 4 5 3 4 5 7 2 2
result:
ok
Test #58:
score: 30
Accepted
time: 0ms
memory: 29240kb
input:
5000 5000 4515 3663 433 838 3578 2695 87 3 1655 1357 4291 1493 1442 105 3550 2355 3554 1228 3846 347 602 375 3718 3013 2952 1510 3751 4679 1204 901 2415 211 2556 4947 3482 4411 4200 149 3211 573 3924 2557 3234 35 3868 3746 4950 4241 4426 1715 2494 2797 806 10 2976 2887 2636 1569 3508 733 3860 275 32...
output:
9998 646 4851 1816 661 4251 419 3357 2681 585 441 4081 2436 3067 1039 166 4126 2290 3011 3008 4311 4243 3709 2018 4618 3025 4129 495 1816 2633 4234 308 1841 2672 4376 1043 1 217 1227 2620 66 2201 3201 3345 4571 4884 3497 4063 163 637 1657 1995 4911 385 1651 3183 1619 3985 2713 2050 2134 1951 3693 22...
result:
ok
Test #59:
score: 30
Accepted
time: 0ms
memory: 28880kb
input:
5000 1 646 3293 4917 3679 2508 3024 2386 324 4051 248 2700 77 4812 964 3748 2267 2094 781 4378 2672 3461 3318 3563 1555 114 142 4506 3604 4962 4551 4047 1781 750 17 2438 863 1674 2638 4682 3804 4432 2651 4836 1606 4920 7 2065 3032 186 153 4660 522 4425 2053 3162 3141 2696 115 3599 1174 3596 276 3248...
output:
36 1 1
result:
ok
Test #60:
score: 9
Acceptable Answer
time: 2ms
memory: 27772kb
input:
5000 2500 4872 2598 2689 2 4901 5 4051 1628 2782 1479 4695 1090 674 4303 180 3977 3382 52 789 533 4897 4667 1659 16 1054 1101 4995 2967 1890 58 2296 669 3187 719 227 449 3621 797 2239 1152 3921 3216 420 2710 2616 1572 132 4762 2946 2701 548 1511 2704 403 4410 504 2952 4770 3962 688 1141 74 400 2386 ...
output:
11974 2023 248 1708 2284 1148 2148 903 598 82 1384 2413 673 633 2123 1183 2306 510 1479 733 296 588 1413 2457 2409 2315 1351 1097 876 1304 149 2215 118 818 2241 2163 2455 1173 1108 1586 1016 1518 722 474 53 982 2187 1039 337 1903 384 2174 1012 1517 1881 1189 1713 1262 1211 1865 912 2034 221 767 2416...
result:
points 0.30
Test #61:
score: 9
Acceptable Answer
time: 3ms
memory: 27752kb
input:
5000 4800 5000 28 4496 2208 1193 4359 2578 2446 1362 2916 1782 1496 4006 318 2592 2141 4049 1080 4765 690 3329 1330 597 3591 3821 394 4578 3057 1154 111 4823 26 4277 559 3545 612 4448 620 2752 3236 4576 23 3949 4036 3547 4295 4168 359 3344 669 555 518 3202 565 4465 4124 4686 3997 3919 1071 3861 302 ...
output:
10410 630 633 1928 2117 165 244 1209 4209 3799 2487 2274 2122 1654 4751 3072 1172 2736 130 152 2464 1138 4432 200 3040 718 3367 4656 1505 1993 1625 1431 2903 1123 3682 3166 4542 1561 1759 769 82 3890 4600 3411 46 2856 1901 2532 2800 2219 1531 3139 1640 572 444 170 3905 241 3831 1158 2391 1598 4355 3...
result:
points 0.30
Test #62:
score: 9
Acceptable Answer
time: 0ms
memory: 29008kb
input:
300 20 143 11 236 152 157 79 208 81 121 126 155 285 100 64 230 168 192 91 206 115 230 35 168 11 294 24 189 26 79 152 81 121 115 155 143 285 206 208 195 64 290 219 28 15 170 98 289 185 111 65 252 114 225 71 277 270 32 284 295 220 252 61 228 167 122 113 229 217 291 112 245 120 140 122 262 246 197 171 ...
output:
100 20 13 11 14 15 1 8 11 12 16 6 9 7 18 19 17 14 20 9 12 2 4 16 3 4 10 1 19 10 15 3 8 17 7 13 2 5 6 18 5
result:
points 0.30
Test #63:
score: 30
Accepted
time: 5ms
memory: 27324kb
input:
5000 200 3632 745 4635 1739 1420 4926 3792 1165 3018 3708 3805 1693 2894 305 238 4625 2190 367 4618 1113 3692 4073 3252 79 1863 4243 4261 2444 2085 2650 3016 620 555 1374 997 810 514 872 2611 3283 4972 533 1595 402 4925 2982 3052 1099 3017 2002 4539 3415 4140 2847 3623 2690 2884 800 2724 765 4080 32...
output:
5330 1 160 22 196 130 175 143 124 162 120 166 114 182 109 14 97 21 95 27 92 37 67 40 66 41 10 43 194 48 191 52 190 55 188 59 165 67 156 71 152 74 150 75 126 90 118 92 116 95 115 98 104 106 86 107 84 111 83 121 80 122 50 124 37 131 29 133 23 144 18 149 9 154 5 164 1 170 186 5 176 9 163 10 162 16 159 ...
result:
ok
Test #64:
score: 30
Accepted
time: 0ms
memory: 27276kb
input:
5000 500 4858 236 1752 4854 3170 1856 3193 409 1118 2052 1396 3905 3924 2904 75 2718 2478 136 1714 3029 4235 1497 1138 53 3223 3456 4203 4634 739 986 1970 219 4897 479 319 2858 185 282 3596 2958 1873 191 3937 4426 1853 2595 1125 3144 3162 712 3126 4936 3366 1060 1274 1016 3572 3102 1024 263 3696 273...
output:
13750 368 171 311 369 69 4 432 26 421 35 404 44 377 73 335 84 324 102 282 106 188 223 163 283 28 317 25 328 20 331 12 352 472 394 471 470 465 9 456 34 454 51 442 63 399 80 385 127 375 134 373 145 334 156 326 195 321 202 272 214 252 258 249 260 234 274 201 302 177 318 167 319 159 324 137 347 136 353 ...
result:
ok
Test #65:
score: 9
Acceptable Answer
time: 0ms
memory: 28848kb
input:
5000 2500 4737 67 1096 4229 2229 390 4952 4689 2584 3283 3364 2827 2611 582 4981 4087 514 2019 4129 1284 4916 2514 1124 10 4582 735 867 1855 2153 224 3739 56 1250 1033 2125 1148 3820 1161 1262 1624 1540 47 2050 895 4755 2984 255 663 4241 1255 1026 963 4784 1042 4701 3118 2263 4381 1022 2006 2621 556...
output:
37588 1735 1664 764 2342 2397 2278 108 459 1005 1658 497 793 2232 567 779 1305 236 864 143 2253 2225 526 364 846 781 100 601 1801 1560 1663 1482 1032 516 1330 30 1816 876 410 1475 2463 378 209 1193 809 2274 2413 1811 1086 55 987 1061 781 1928 1945 1825 2243 2136 274 161 1788 62 1877 2456 90 1213 429...
result:
points 0.30
Test #66:
score: 9
Acceptable Answer
time: 0ms
memory: 27344kb
input:
5000 4000 4967 39 692 2640 1408 244 3082 2924 1601 3505 2120 1767 4821 373 3101 2558 4871 1278 2580 807 4018 1569 703 4315 4595 463 3444 3685 1362 138 2355 36 3718 660 4264 722 2410 731 3297 3906 980 31 4749 4855 4267 4326 157 421 4035 783 656 609 3865 666 2927 4958 1425 4811 4711 1270 4638 354 2187...
output:
17378 3936 1107 1845 1140 2275 2636 3598 3238 1706 873 1354 2341 1891 3094 1236 3946 1343 3456 2114 3571 2970 1569 2181 1241 1881 1899 610 1218 2028 2849 1615 959 3471 588 3081 701 796 885 511 1151 2451 3915 922 270 1715 1719 2387 874 2545 3739 1805 2799 2736 3240 103 3480 2744 2890 1680 1562 1267 2...
result:
points 0.30
Test #67:
score: 9
Acceptable Answer
time: 0ms
memory: 28916kb
input:
5000 2500 4873 112 1170 4116 458 2694 3225 4409 4269 4285 3404 4861 4577 1126 3937 3463 2983 4323 973 754 4612 119 4857 649 2730 3540 3303 1316 2827 24 3177 2709 101 1707 4789 414 2059 473 2288 352 4548 18 1433 4683 2912 4445 4113 46 4717 4829 3248 96 4316 140 3016 605 4786 1299 2088 4615 4138 3957 ...
output:
24774 1399 727 1698 252 570 2283 1968 1469 1940 1401 863 1759 188 1513 375 1953 909 12 813 1551 639 86 2216 778 1803 66 402 2102 2255 2424 1472 2379 967 462 843 799 1606 342 1490 1317 664 1477 560 607 1620 271 1324 165 2397 1893 1441 1188 732 199 75 1855 1555 523 1666 1709 1661 1920 2206 515 2456 21...
result:
points 0.30
Test #68:
score: 30
Accepted
time: 0ms
memory: 28712kb
input:
5000 1 2001 2001 4995 3908 4646 2424 4464 325 4005 1479 1106 275 2756 2376 4165 1181 4206 1148 3407 2915 1633 3415 3041 547 3660 3451 3533 2614 1805 1150 3269 1174 3063 2165 2866 1782 3428 602 1699 1136 1499 1396 4920 2518 4468 627 3658 2737 1395 641 4992 3534 1765 3987 2995 2593 1952 1888 4650 2292...
output:
32 1 1
result:
ok
Test #69:
score: 30
Accepted
time: 2ms
memory: 27692kb
input:
5000 2 3708 2001 3708 2001 4988 4442 3520 1148 2121 539 4986 621 1370 40 4189 843 4969 3600 2804 2660 3546 3634 4961 738 102 993 2855 643 1563 1161 4563 3581 3719 4800 4374 846 1325 892 868 516 2580 2391 2384 736 4738 1153 4842 3491 4891 4020 4419 2887 4421 1664 4178 364 4111 638 4729 1178 4190 1693...
output:
44 1 1 2 2
result:
ok
Test #70:
score: 30
Accepted
time: 2ms
memory: 28756kb
input:
5000 2432 4275 4508 2376 1154 2212 5 4234 2385 4426 2691 4422 86 4587 1975 1625 2322 3312 549 2912 4602 4615 1428 3306 8 2963 853 647 4044 501 1143 2170 3 4832 1163 1069 3563 2253 358 4529 879 4946 1363 3028 18 1424 966 736 3031 2416 92 3662 4730 202 218 3708 691 2539 953 3226 3537 3262 3756 3135 21...
output:
6660 2416 1801 834 303 1374 2426 941 263 371 1405 1837 1442 1651 1235 1771 85 410 942 942 1428 1531 1028 1354 1691 113 788 1900 1167 546 1179 499 93 689 353 616 1894 1124 1429 106 208 163 973 865 1197 934 810 1193 402 1284 1941 1962 111 2309 2287 608 904 1033 1279 1793 1994 619 523 1490 2275 158 164...
result:
ok
Test #71:
score: 30
Accepted
time: 5ms
memory: 28188kb
input:
5000 5000 4989 4247 3823 2958 224 1343 3263 3353 2126 2137 1685 2431 2276 559 1964 1716 1489 2152 488 377 4820 3837 2428 331 4974 2923 1634 657 4258 20 1583 1349 58 846 2389 3937 1019 233 1137 179 4060 4651 714 4936 4117 2207 3742 31 2354 2408 2867 55 2149 79 1501 3581 4579 646 3070 2297 3270 1979 3...
output:
9998 4640 379 2095 2286 4898 4461 3766 4835 1739 4255 1186 3543 584 566 3679 4768 1356 2843 383 4088 1705 2469 2031 303 2463 3192 4391 4316 1345 820 727 909 3674 1692 2682 4116 4158 4742 3880 4224 2553 4090 4725 493 4867 3708 1652 1928 2701 3466 883 1471 788 193 3022 1095 4556 770 2585 3041 824 3510...
result:
ok
Test #72:
score: 9
Acceptable Answer
time: 4ms
memory: 27112kb
input:
128 64 90 119 39 77 84 28 88 70 127 111 37 26 35 49 46 52 19 6 78 123 36 94 8 56 12 100 7 20 63 75 54 108 5 2 67 73 18 21 102 66 51 104 97 120 117 48 110 47 107 95 89 69 93 81 1 98 61 27 91 116 125 85 30 86 10 99 4 68 118 87 34 9 82 62 40 71 79 112 53 55 122 103 105 42 32 58 50 60 101 41 128 31 22 1...
output:
344 28 1 46 19 24 26 15 60 27 62 39 57 57 46 44 13 64 42 37 12 52 34 45 36 38 56 30 18 2 39 17 25 33 7 7 53 22 11 25 37 21 21 36 48 19 27 56 64 20 61 12 51 41 2 48 38 62 17 16 52 4 50 23 23 58 58 59 16 61 31 35 35 8 47 9 6 29 43 63 5 3 14 14 54 51 59 34 22 32 44 50 32 13 30 40 4 47 24 10 40 53 3 42 ...
result:
points 0.30
Test #73:
score: 9
Acceptable Answer
time: 4ms
memory: 28536kb
input:
1792 896 387 884 1234 29 1049 730 1784 223 783 259 43 711 1066 1194 1408 1787 1777 965 1191 1530 982 546 620 1629 1562 1692 1668 343 1699 1719 1761 169 1245 1396 607 704 440 989 800 328 348 1734 1592 1520 600 1717 37 1263 1207 929 1422 1384 669 953 1095 1414 1624 1023 806 1032 970 663 1744 238 1466 ...
output:
5538 221 385 67 116 805 273 238 351 158 693 71 613 679 856 714 633 59 40 375 381 681 876 118 267 773 498 525 598 671 880 495 841 582 156 769 305 402 711 100 66 104 236 564 634 27 854 9 437 839 152 60 834 674 249 864 37 590 470 557 58 508 206 63 284 532 756 471 101 610 193 478 201 424 700 138 546 227...
result:
points 0.30
Test #74:
score: 9
Acceptable Answer
time: 0ms
memory: 28136kb
input:
4096 2048 193 608 1843 3135 3869 894 8 2468 45 1994 2718 1048 1700 1687 2162 554 2385 573 1540 20 950 1643 624 303 3026 816 1939 577 951 3045 464 29 1663 2166 899 772 1997 2986 2273 2968 2546 1498 1794 120 1601 2274 2178 2730 1935 2894 3951 1178 2578 832 3716 2668 1169 393 1867 1258 628 3321 2789 27...
output:
12518 1365 1605 1041 1687 1201 737 1687 1394 138 537 1198 1912 979 1859 1934 505 2022 211 927 121 921 1229 1508 1064 1314 271 581 443 1462 829 1841 1906 257 202 1038 311 155 62 745 611 1573 1154 1950 679 169 372 100 1149 1453 269 1333 1982 2008 157 1997 1 1424 517 1683 1396 891 633 1901 1336 1459 90...
result:
points 0.30
Test #75:
score: 9
Acceptable Answer
time: 0ms
memory: 28260kb
input:
4018 1258 3745 1722 1721 3 3737 324 275 530 2987 3944 2774 14 2204 1687 332 1620 468 3383 2453 238 3596 807 375 722 2808 156 3471 252 3178 1753 2773 2138 1119 2111 3422 506 755 1461 2735 696 3750 93 1603 1650 3946 3232 116 2207 2267 1432 2897 3572 3066 1668 2420 315 2616 3931 521 1004 3132 183 860 3...
output:
7764 266 1095 380 414 793 764 1116 242 920 303 36 398 656 316 1096 412 722 1051 413 1003 818 898 571 374 906 90 1057 837 784 131 619 446 958 840 645 1041 259 192 273 1081 502 259 813 969 326 1116 464 148 633 481 1044 188 1087 528 73 949 148 74 65 1002 860 933 185 273 607 1243 173 760 896 314 1174 21...
result:
points 0.30
Test #76:
score: 9
Acceptable Answer
time: 4ms
memory: 27316kb
input:
1181 667 1104 605 303 634 327 239 510 8 149 923 863 1143 809 295 170 668 739 61 1075 9 1001 202 842 287 525 331 48 1067 722 53 624 664 640 1085 666 141 588 962 4 1003 1136 1005 1171 1144 511 66 817 1032 667 128 1065 90 622 120 1080 370 520 194 172 815 419 47 152 452 359 356 183 259 1115 619 1048 348...
output:
2794 406 309 475 426 572 364 250 347 162 507 138 281 614 436 565 427 492 499 467 30 442 135 258 201 71 172 522 337 117 243 518 299 165 126 168 512 643 192 633 74 583 108 618 4 207 216 66 388 316 356 432 550 63 55 315 116 221 301 206 233 450 571 311 590 604 300 222 574 3 84 17 366 444 484 375 232 192...
result:
points 0.30
Test #77:
score: 9
Acceptable Answer
time: 0ms
memory: 27648kb
input:
3001 2298 2996 1 2566 522 583 2502 1796 1175 2547 27 2134 31 628 1504 73 102 2762 209 1552 239 1503 2864 1294 667 1386 2433 579 1025 2771 2724 1836 1717 928 1744 1958 974 1845 20 2857 2085 1253 1274 603 313 1801 2119 2577 158 2814 10 282 1985 2963 433 1018 404 1137 485 2216 1157 1230 2284 125 2294 1...
output:
7116 1136 1993 386 1463 352 1804 400 516 708 1789 94 24 2245 1059 1896 221 692 2052 1730 1978 1292 1506 1169 1261 2014 939 451 1621 1138 2157 616 282 836 2088 270 168 1384 862 349 2293 1189 1960 1841 2002 733 443 765 1245 719 622 549 2222 856 841 385 1957 133 1906 1423 172 1809 981 1762 940 989 826 ...
result:
points 0.30
Test #78:
score: 9
Acceptable Answer
time: 0ms
memory: 28012kb
input:
2792 1545 2590 1177 1749 435 1163 555 1372 2630 1101 74 574 2065 560 2300 814 1558 1993 533 1716 1236 1378 289 612 242 2644 443 1665 1645 2263 4 1811 370 575 1560 827 1042 1531 538 308 2058 2595 32 1199 496 1005 1422 2145 1330 1891 1622 1318 573 2350 220 2150 2592 702 94 143 2338 2137 86 117 2080 26...
output:
6518 561 1063 448 871 655 1058 865 517 1532 1250 234 599 149 145 2 657 110 788 1161 962 657 1111 191 777 797 1244 966 1144 1379 686 1350 1163 880 1030 150 1168 27 776 378 951 640 927 556 748 371 581 1059 929 1135 1002 1021 1228 1349 640 767 937 892 164 601 1360 552 1399 1229 1345 738 737 257 1361 29...
result:
points 0.30
Test #79:
score: 9
Acceptable Answer
time: 0ms
memory: 28712kb
input:
373 51 357 326 3 220 179 293 83 113 277 188 137 40 280 21 336 168 240 117 178 119 48 58 131 100 81 9 210 159 22 154 251 121 327 221 122 123 218 160 196 141 177 230 32 11 16 338 6 155 80 262 308 308 2 173 3 101 297 293 370 248 135 346 81 180 134 367 302 351 97 4 54 113 1 43 22 238 316 153 34 126 190 ...
output:
506 51 1 50 19 13 44 3 4 5 51 34 23 14 43 25 12 49 18 29 24 8 21 20 25 12 6 37 13 39 38 33 27 21 32 47 10 28 15 27 45 23 48 4 31 10 29 2 46 19 37 1 33 48 5 17 9 24 17 31 2 22 11 32 35 35 26 40 20 45 30 9 47 11 39 41 3 6 7 38 40 44 14 18 42 30 49 36 28 15 8 16 36 26 41 46 16 43 50 7 34 42 22
result:
points 0.30
Test #80:
score: 9
Acceptable Answer
time: 0ms
memory: 27172kb
input:
1651 348 1460 745 170 147 955 509 569 597 1627 41 958 942 800 1632 811 58 1584 862 939 64 747 903 523 83 1348 28 108 1067 1192 1469 1424 1094 1305 1335 1535 750 1432 1076 232 389 947 196 1393 126 1500 440 116 54 1357 1230 1300 761 803 317 664 208 441 1108 34 618 1450 21 469 937 613 30 643 187 1599 8...
output:
2730 283 252 326 169 119 321 344 151 161 229 251 26 238 342 117 265 19 255 186 40 64 269 216 5 27 6 113 24 29 196 224 283 163 160 262 311 196 18 287 171 244 58 259 193 252 280 206 93 189 214 7 124 150 147 129 187 201 303 34 268 226 337 105 102 288 1 86 118 151 267 130 290 335 44 214 110 114 51 33 73...
result:
points 0.30
Test #81:
score: 9
Acceptable Answer
time: 0ms
memory: 28976kb
input:
3198 2097 3098 1063 3067 148 1875 5 1669 996 1526 2326 946 581 1325 88 1424 1298 2160 1260 1989 1479 32 18 2134 20 2148 2445 338 2668 1602 579 1256 395 1123 28 412 2501 2460 1017 1317 187 1274 19 340 600 756 876 356 947 2559 813 1761 2121 3072 458 2376 647 742 3181 1280 454 3046 12 268 2194 1678 202...
output:
7756 533 1074 1632 2087 977 708 945 5 1398 1671 404 42 884 142 1885 320 1237 910 902 2090 1883 1854 1911 1106 1057 1421 1224 1185 1776 804 526 1135 1539 846 44 24 169 1817 1282 860 1455 1360 1968 697 1429 1425 1402 1138 929 1141 394 204 29 830 650 1003 1349 1634 1556 1592 228 588 1631 170 1801 1851 ...
result:
points 0.30
Test #82:
score: 9
Acceptable Answer
time: 3ms
memory: 29320kb
input:
4583 2824 4575 173 4502 20 446 1470 2805 2167 1870 1655 4034 3 3757 3247 1393 103 3006 3618 2852 2044 4023 252 4405 21 3341 2653 3336 912 2960 634 3578 87 3265 2118 4451 4388 2226 781 502 2827 2018 292 2563 2502 3646 438 1026 230 4456 3070 47 3520 794 1749 2072 1608 319 2954 1614 22 2916 170 1302 26...
output:
10930 896 1054 909 379 1101 1869 631 1936 1678 2473 151 185 2283 2260 763 2182 177 1912 1582 2817 1724 1497 2707 2483 636 2391 1658 57 2612 1324 2720 2289 1316 511 2260 1358 10 311 1983 2439 879 894 1834 2298 2058 1550 768 297 1783 167 2181 1558 2529 2814 1399 2179 2768 1634 2377 2313 1454 1311 813 ...
result:
points 0.30
Test #83:
score: 9
Acceptable Answer
time: 0ms
memory: 28828kb
input:
4096 2048 3542 1331 3164 4032 694 440 2121 1061 3102 869 1715 2222 1861 2645 2399 2971 2915 1818 393 3968 1317 3866 2682 1509 1760 1071 406 1860 1951 185 279 1553 2034 2483 1277 1047 3363 3763 2625 2258 221 814 1202 3128 484 315 3826 2491 1505 1998 3949 3994 1930 2517 489 2610 3213 1893 3934 2091 28...
output:
16444 823 1565 459 1102 451 1186 1693 1954 2003 853 1911 399 198 1688 951 869 661 1605 2015 1687 1041 1000 1121 1041 974 2007 1992 489 1054 41 817 511 1303 1356 1685 1021 1376 1298 2034 349 443 581 1628 1981 430 37 338 422 310 2042 1809 1450 1836 255 892 1661 1011 1372 1742 997 1800 1038 881 1284 41...
result:
points 0.30
Test #84:
score: 9
Acceptable Answer
time: 2ms
memory: 27584kb
input:
5000 2500 4873 112 1170 4116 458 2694 3225 4409 4269 4285 3404 4861 4577 1126 3937 3463 2983 4323 973 754 4612 119 4857 649 2730 3540 3303 1316 2827 24 3177 2709 101 1707 4789 414 2059 473 2288 352 4548 18 1433 4683 2912 4445 4113 46 4717 4829 3248 96 4316 140 3016 605 4786 1299 2088 4615 4138 3957 ...
output:
65030 1344 237 69 754 1181 1404 1871 818 813 2295 2392 12 14 157 1419 221 2255 2424 2418 708 915 1104 2322 344 911 689 1643 356 1778 113 1026 1302 1252 2475 256 659 893 1025 475 977 710 1893 1714 1245 2370 1188 1596 105 616 1117 13 1031 715 131 817 275 2397 2484 676 2351 1951 2009 1046 51 148 1374 4...
result:
points 0.30
Test #85:
score: 9
Acceptable Answer
time: 0ms
memory: 27484kb
input:
5000 2500 4961 12 3144 529 224 4446 2201 1452 3571 665 241 3608 2616 1533 3489 247 2384 110 1479 1072 2531 1502 1566 1697 1532 1242 1378 3408 4464 1477 3873 49 3987 923 327 1277 4180 4752 2135 988 4101 2283 4448 66 4157 3547 24 2389 2147 947 887 685 2962 4536 2507 456 3132 4033 41 4308 4719 719 4077...
output:
722280 564 387 372 2465 922 149 2356 1270 2426 663 1153 1322 2204 235 1246 2327 1216 1788 1513 1636 1654 13 1784 1265 502 1889 1978 344 1984 531 1089 1246 35 260 2271 1449 2249 428 230 2037 1644 1665 713 1230 477 1659 584 1762 1632 1269 1968 2217 1407 1070 251 1539 525 1704 2494 1340 27 2048 608 114...
result:
points 0.30
Test #86:
score: 9
Acceptable Answer
time: 0ms
memory: 29216kb
input:
4096 2048 1351 3562 2484 1169 139 3766 1978 658 3759 326 3946 3727 3985 2239 1008 2656 1629 973 675 78 1600 427 2888 1501 3258 1525 3664 2530 175 3020 976 634 2303 2257 4043 3036 3326 2555 816 3973 2227 2486 2124 2597 3053 2707 3217 400 2171 2699 118 3894 3657 2542 2411 3169 54 3219 2598 3609 366 16...
output:
14754 823 1565 811 203 71 1877 1851 67 1413 2032 606 1351 499 2036 73 428 1847 781 101 1430 1387 1016 1817 1705 1359 550 37 1576 661 1605 235 1173 1894 378 888 796 109 1591 475 506 2013 1024 784 1196 511 1920 2046 1687 1992 2007 526 691 21 1950 1653 1000 1394 1041 1121 1625 817 1021 1303 511 1685 13...
result:
points 0.30
Test #87:
score: 9
Acceptable Answer
time: 6ms
memory: 28776kb
input:
5000 2500 4873 112 1170 4116 458 2694 3225 4409 4269 4285 3404 4861 4577 1126 3937 3463 2983 4323 973 754 4612 119 4857 649 2730 3540 3303 1316 2827 24 3177 2709 101 1707 4789 414 2059 473 2288 352 4548 18 1433 4683 2912 4445 4113 46 4717 4829 3248 96 4316 140 3016 605 4786 1299 2088 4615 4138 3957 ...
output:
50276 1698 252 1260 2283 831 2353 1188 237 1878 2142 1100 1953 1360 2244 1502 2130 1350 573 476 1567 1664 477 503 2204 2426 2097 2392 818 2025 1058 1411 1428 2350 1575 937 2471 27 1979 133 2057 1505 2295 909 12 673 2211 1872 157 145 2088 2066 635 109 2227 850 1078 2423 876 460 2292 1778 689 911 2118...
result:
points 0.30
Test #88:
score: 9
Acceptable Answer
time: 6ms
memory: 28052kb
input:
5000 2500 4958 13 3215 528 198 4490 2284 1529 3628 683 211 3668 2675 1599 3569 215 2471 104 1556 1135 2606 1574 1641 1780 1598 1307 1467 3464 4505 1553 3911 45 4027 950 312 1337 4209 4766 2208 1011 4127 2373 4495 60 4186 3611 24 2476 2220 982 918 708 3023 4566 2588 449 3200 4072 37 4356 4739 731 411...
output:
668650 2292 1293 1632 1116 1003 2363 994 216 2406 2401 2222 413 185 1970 1968 1146 401 2397 320 2291 1955 2410 1603 1216 1039 2036 1296 835 1976 1570 2089 2206 1063 2237 101 949 2322 80 2184 1265 1368 1843 1344 738 1691 1117 1108 2278 1416 1058 2347 151 903 2020 712 1136 1848 783 169 1950 1942 1055 ...
result:
points 0.30
Test #89:
score: 9
Acceptable Answer
time: 2ms
memory: 28724kb
input:
4096 2048 3305 1273 2262 2873 448 2803 975 2861 4071 3581 1716 3727 3610 2491 2034 2068 325 3410 1139 686 1438 647 2838 532 1097 3058 2895 3616 2548 3364 2291 24 724 3655 3995 4068 2780 1982 3236 553 585 674 467 3937 2234 2472 223 235 1898 2839 2811 99 121 949 2580 3701 2783 1707 3143 2148 976 16 63...
output:
14990 823 1565 553 94 877 1495 1882 1729 919 1432 127 316 1062 63 177 1290 1746 1592 901 351 1515 1634 1660 681 247 949 1420 950 2003 853 1729 1886 800 1660 1920 1019 415 1341 1147 1887 1115 1644 1359 1576 951 869 1041 1687 888 1591 109 506 1894 1024 475 1196 1686 1466 655 1792 2013 1980 784 1173 23...
result:
points 0.30
Test #90:
score: 9
Acceptable Answer
time: 2ms
memory: 27388kb
input:
5000 2500 4873 112 1170 4116 458 2694 3225 4409 4269 4285 3404 4861 4577 1126 3937 3463 2983 4323 973 754 4612 119 4857 649 2730 3540 3303 1316 2827 24 3177 2709 101 1707 4789 414 2059 473 2288 352 4548 18 1433 4683 2912 4445 4113 46 4717 4829 3248 96 4316 140 3016 605 4786 1299 2088 4615 4138 3957 ...
output:
42188 193 1919 1940 1988 2240 1715 2497 871 551 1023 2253 1512 823 46 1188 2234 1344 1229 863 2402 1154 1513 1416 1759 1366 330 323 2304 1735 2130 555 1043 476 1567 503 2204 1719 1575 1663 2471 133 358 602 487 673 2211 1228 806 2066 635 460 2292 813 818 2392 2295 1871 12 1505 157 14 1471 1557 1498 9...
result:
points 0.30
Test #91:
score: 9
Acceptable Answer
time: 2ms
memory: 28948kb
input:
5000 2500 4960 15 3208 550 212 4468 2247 1484 3619 688 227 3658 2653 1569 3555 236 2425 107 1519 1116 2569 1541 1612 1745 1568 1276 1428 3466 4497 1514 3901 53 4005 977 335 1311 4200 4764 2172 1022 4114 2323 4471 69 4180 3603 26 2433 2183 991 928 718 3026 4567 2544 465 3197 4052 49 4335 4738 741 410...
output:
625734 2497 2154 213 355 1753 2327 491 587 1884 278 1975 2124 1010 2443 1315 2284 1579 1575 1154 1518 2115 1501 1500 2076 1504 767 768 493 1397 2404 1420 1465 968 239 645 2454 1693 2115 552 2471 128 1677 1842 946 209 84 2355 76 339 895 1557 449 509 1692 1287 131 1371 98 622 160 1893 2283 898 997 246...
result:
points 0.30
Test #92:
score: 9
Acceptable Answer
time: 2ms
memory: 27648kb
input:
4096 2048 1107 2568 1925 1194 2870 1314 2652 2605 1113 1055 1853 1617 1539 1145 1124 771 386 1702 676 524 1693 110 1847 3918 1588 1729 1902 558 2440 2318 800 3970 2383 2128 2686 1257 1109 4035 3561 494 3543 3246 3739 3403 3636 3985 3488 1489 2254 585 1834 2474 1764 2294 652 1723 2972 1285 3010 3322 ...
output:
13784 823 1565 1749 1519 2046 1687 2039 513 1676 2042 1643 1450 1966 1431 1006 1917 817 1021 1376 1298 1303 349 1628 37 443 581 2034 1981 1685 1138 1073 1121 430 1493 1409 367 1121 1041 1394 1262 1201 1625 1653 41 1054 737 1823 1356 310 1000 215 1081 841 114 679 511 853 2014 1809 1995 713 451 2044 1...
result:
points 0.30
Test #93:
score: 9
Acceptable Answer
time: 0ms
memory: 28540kb
input:
5000 2500 4873 112 1170 4116 458 2694 3225 4409 4269 4285 3404 4861 4577 1126 3937 3463 2983 4323 973 754 4612 119 4857 649 2730 3540 3303 1316 2827 24 3177 2709 101 1707 4789 414 2059 473 2288 352 4548 18 1433 4683 2912 4445 4113 46 4717 4829 3248 96 4316 140 3016 605 4786 1299 2088 4615 4138 3957 ...
output:
27604 1475 28 198 134 2391 2018 69 754 77 1666 937 2465 673 2211 1843 2136 1859 2412 1130 1899 402 2102 2347 1392 1129 380 1872 157 1718 1498 553 1471 2392 818 2422 2252 2092 2071 2245 484 476 1567 499 214 445 2142 375 1953 1878 2368 1502 2181 1963 1259 1350 573 2043 2430 589 1080 579 574 1607 1045 ...
result:
points 0.30
Test #94:
score: 9
Acceptable Answer
time: 2ms
memory: 27728kb
input:
5000 2500 4964 11 3297 582 236 4500 2305 1544 3686 724 248 3732 2726 1634 3619 252 2487 124 1577 1172 2637 1596 1674 1809 1631 1339 1490 3528 4518 1574 3946 59 4052 1011 365 1371 4253 4758 2250 1065 4177 2399 4503 74 4222 3666 30 2494 2260 1029 975 748 3087 4574 2611 510 3286 4113 53 4381 4735 776 4...
output:
270330 814 393 1598 1188 717 1546 495 2230 606 441 1503 1294 2266 276 23 2209 1050 37 515 1693 2368 1968 1699 2215 306 1974 1926 2019 1884 278 2398 1654 781 359 1641 2286 142 1027 2007 187 53 1803 782 2346 1397 1731 1620 1328 2359 67 2020 1635 140 1733 2116 1425 1331 2450 467 1290 2306 1872 1875 155...
result:
points 0.30
Test #95:
score: 9
Acceptable Answer
time: 2ms
memory: 28300kb
input:
4096 2048 970 3364 736 1975 1100 1477 4053 1646 3627 2478 3225 1617 4088 3157 3841 1584 349 3233 2477 2854 1696 3130 604 2396 2741 4015 3816 3191 286 620 1110 3497 2098 1958 1181 1006 2720 4065 1257 415 3761 622 1445 80 500 2780 2199 2175 1716 455 1656 2255 3038 1266 1246 1681 51 577 2639 1248 3488 ...
output:
13570 823 1565 811 203 71 1877 637 1099 1420 950 1041 1605 661 1687 1522 1925 30 719 276 1761 295 421 119 1137 641 1653 279 548 435 666 403 1324 1207 649 1965 897 833 871 1900 28 1371 707 1191 1111 1492 55 1045 637 730 1244 1970 631 1236 1001 1503 1418 1324 1717 244 1376 1919 844 1440 834 850 1956 3...
result:
points 0.30
Subtask #4:
score: 12
Acceptable Answer
Test #96:
score: 12
Acceptable Answer
time: 51ms
memory: 69652kb
input:
300000 100000 297688 58574 11154 227659 2832 4187 46902 30386 123954 297021 107275 50042 254278 246399 245777 174442 294196 213936 66372 33303 196079 68308 279926 155894 38996 65379 16366 236135 73779 90307 140452 79063 170940 175005 103283 242495 199312 112374 299718 3222 294033 126886 258651 54878...
output:
129389668 34195 61197 80956 59032 17929 42411 61894 45515 33497 66145 73557 2150 6789 45283 48322 1651 29193 9537 20402 26652 18316 35311 22007 72846 38921 42596 16592 33826 68491 13433 81636 64557 69169 16849 71525 68582 86512 87663 90116 82916 19381 50761 19535 30196 2197 13213 91185 46676 40558 7...
result:
points 0.30
Test #97:
score: 12
Acceptable Answer
time: 52ms
memory: 70656kb
input:
300000 200000 280782 16325 171906 51662 245114 202173 138437 225533 202918 140834 277080 171662 156708 218384 270721 221100 8753 41 184773 98826 283417 239730 68744 157634 186386 101007 107165 38330 150068 120744 213094 220042 74291 278298 19992 150808 233118 64116 122210 98049 104561 120466 219635 ...
output:
65347662 104401 134547 175785 197401 115325 8436 172942 154340 75667 87583 176566 97946 156045 28343 59136 70279 113638 182833 47554 144120 1233 20205 190135 163135 43717 51553 150319 118139 33243 143797 6303 120846 111477 22569 64144 114697 25031 72585 57638 172251 26632 179441 185424 121711 93883 ...
result:
points 0.30
Test #98:
score: 12
Acceptable Answer
time: 0ms
memory: 30772kb
input:
20480 10240 20072 5509 3628 19967 7855 4368 5621 460 5801 13197 4788 18694 6287 15047 19518 19543 1538 8089 7624 4693 9425 17961 15893 9376 8032 25 16738 12876 17999 13243 19559 13503 3162 8893 17132 12513 17842 17663 17791 9511 14790 10456 14782 3287 9718 14425 14241 153 14746 72 3055 3995 12798 63...
output:
77414 10177 3497 3133 3712 6825 5636 3065 7935 8705 8561 10225 991 8812 2799 479 6179 4225 4457 4199 7858 2683 9613 1655 5011 8386 1363 7521 855 9010 764 2026 2011 8733 4209 2917 6121 4103 791 5923 6562 2549 5161 1729 526 516 5783 5998 4830 3745 8177 1049 1123 5633 4993 4017 5409 5980 2170 3476 4147...
result:
points 0.30
Test #99:
score: 12
Acceptable Answer
time: 17ms
memory: 42152kb
input:
98304 49152 97153 7643 59051 79831 79742 72969 23358 8083 93930 34059 81070 53431 72262 22848 13022 66285 61268 563 96198 78922 8310 94217 51436 52307 89884 5151 12430 20579 59685 27046 68559 1405 58612 91363 53885 68662 59370 4586 2197 91467 76012 667 90577 2383 52923 53712 56229 491 78083 92363 70...
output:
400214 22201 4345 5293 31097 29881 29629 35929 3333 5911 44680 28434 23505 24354 16461 41221 39893 23689 2088 18808 38451 9913 41221 28797 46390 4077 24181 20765 33091 17018 39041 571 22486 12293 39364 14113 12776 22329 31647 23181 28170 40882 17971 11483 45550 24922 12718 42709 4081 34993 32610 409...
result:
points 0.30
Test #100:
score: 12
Acceptable Answer
time: 20ms
memory: 56808kb
input:
212992 106496 200187 128433 98173 121038 135533 24443 152445 457 155067 211244 31235 97373 169245 123056 108337 45064 84391 2828 211316 9844 163976 18726 130203 135430 66218 189123 152906 151367 191302 187933 158586 123169 89028 4392 160177 79379 63066 16608 207958 164190 180348 70823 172596 207 136...
output:
896526 80713 53249 8347 70987 69019 19971 10169 71785 57633 104905 46166 603 77905 52326 4901 41329 92357 105309 94537 45953 38766 9871 17176 23576 1797 61462 58469 22537 27717 48577 16647 30934 44644 10533 86067 3497 38563 39073 84841 27993 30115 52716 100955 28742 35341 46096 57316 30405 50977 231...
result:
points 0.30
Test #101:
score: 12
Acceptable Answer
time: 193ms
memory: 70132kb
input:
300000 150000 296298 181089 91330 183401 150320 35819 180655 175626 247475 72756 270994 170346 203848 257336 67026 241158 83007 63367 221731 76517 274119 182379 174810 6 242419 1375 122102 162780 206324 38502 30842 216581 187072 271076 40743 15974 141917 51765 239271 155238 102340 56664 275156 648 1...
output:
130965332 138977 113855 74761 39925 104444 15190 78411 50917 75141 34072 131298 53749 88001 77798 113276 47472 108087 145371 143013 56612 128615 105430 81994 116175 86690 74497 144443 76881 126517 12079 89893 27422 138306 108018 27563 78459 114189 141990 63703 36272 20772 136506 3554 36843 140230 63...
result:
points 0.30
Test #102:
score: 12
Acceptable Answer
time: 23ms
memory: 68384kb
input:
300000 15 186898 186885 186886 186889 186895 186888 186896 186890 186894 186892 186887 186891 186899 186893 186897 220382 220372 220371 220377 220374 220375 220373 220380 220383 220381 220376 220384 220385 220379 220378 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 1...
output:
1378348 13 13 1 12 15 9 7 1 5 10 9 8 14 14 10 15 12 4 8 11 4 6 6 5 11 7 3 2 2 3
result:
points 0.30
Test #103:
score: 12
Acceptable Answer
time: 51ms
memory: 71396kb
input:
300000 150000 168663 46327 39652 62227 66836 88475 62068 57901 132082 81367 60148 30873 106518 29774 98275 170939 135372 91597 63447 121715 155677 36423 29016 24852 64022 159234 106476 123081 146990 163631 165896 32919 123098 50211 35888 45455 104908 70541 88712 36828 134906 75390 157029 44349 13261...
output:
5074549668 88561 100501 20379 142111 58735 20125 40037 75292 81381 98433 39656 138772 111931 141883 108720 30267 2969 102689 116128 58216 99641 75521 8632 72323 17749 122131 35250 32513 90651 99519 93061 102709 121089 49165 108446 3010 53929 141679 121534 15861 66101 108467 122725 31864 88277 29045 ...
result:
points 0.30
Test #104:
score: 40
Accepted
time: 56ms
memory: 74332kb
input:
299999 299000 299314 92621 219988 265785 240963 296555 162274 110717 40154 167754 46122 291595 167093 84596 83041 56839 187563 17895 287200 37275 289964 34888 119133 192645 137310 189824 247772 35595 94578 128818 278923 156237 96957 10485 211716 137565 106990 46766 114122 169137 266604 123107 123738...
output:
93289088 196333 285753 14125 210675 195955 61837 57414 296940 99693 18361 118297 50731 76497 85487 37877 68048 221665 189793 137534 294176 175105 218331 178558 26587 222635 178689 236341 230486 75567 133815 128162 294766 184837 186737 18091 151291 199461 132243 185263 120715 32661 88021 38739 202809...
result:
ok
Test #105:
score: 40
Accepted
time: 17ms
memory: 45956kb
input:
129754 12863 115879 25189 27360 51814 77130 22618 47345 66655 53786 13420 90035 103230 126399 2173 39937 17826 44578 14285 86965 33374 70508 77711 105765 40523 54568 103260 6034 108632 44832 36376 119856 12779 72928 22750 127660 20844 90287 64774 79649 42014 31366 15176 2588 39725 73294 125004 32989...
output:
259470 9777 1883 2041 9579 7864 5086 997 7211 9303 7932 11479 12109 11123 3547 7089 4985 1621 1411 9987 3318 4203 2287 4132 8693 11967 5627 8193 7357 5695 1290 5795 12689 10334 9595 5871 3945 8696 6736 9801 7681 11365 8794 10539 7797 10128 10389 4561 3121 8625 8579 81 10245 1612 2815 173 1920 7362 6...
result:
ok
Test #106:
score: 40
Accepted
time: 12ms
memory: 68960kb
input:
300000 1 203701 203701 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 ...
output:
407400 1 1
result:
ok
Test #107:
score: 40
Accepted
time: 24ms
memory: 69176kb
input:
300000 2 173605 35414 35414 173605 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 ...
output:
347208 1 2 2 1
result:
ok
Test #108:
score: 40
Accepted
time: 54ms
memory: 73536kb
input:
300000 300000 297528 266491 85382 91083 59396 57565 276074 18731 48244 27283 214806 10417 238898 1247 282387 231981 89002 11769 257168 27787 120289 101982 220055 35065 173568 36935 46265 14094 130369 116665 114927 203485 38911 294767 7824 244076 273189 117161 56759 48531 120325 231757 151722 141247 ...
output:
599998 94267 38473 38011 172586 212127 174421 285889 9532 238181 137465 118651 44391 184619 18163 172478 193329 208125 119512 238321 50509 229217 249371 154633 278134 33451 233749 10289 232617 136402 239111 7216 29636 123661 217058 157749 29055 272327 213265 146906 215140 141441 208965 10387 173737 ...
result:
ok
Test #109:
score: 40
Accepted
time: 38ms
memory: 31332kb
input:
300000 1 83609 163429 298969 154188 647 431 297510 278049 39561 77579 118000 87823 234751 205012 284160 134554 106667 37407 245697 142810 126910 122996 290463 32922 112967 97395 228151 40539 150487 157962 51630 5582 267449 239292 219405 186244 122758 13742 215572 159935 70814 67091 264721 115002 236...
output:
42 1 1
result:
ok
Test #110:
score: 40
Accepted
time: 47ms
memory: 31628kb
input:
300000 2 98506 55236 115910 202295 299361 17046 152223 70660 160506 22044 60569 94991 111969 53898 281659 81807 250050 183106 17519 15951 214018 49802 297360 244660 149132 48110 23621 20527 251657 169949 231336 225327 193851 78811 225391 116566 238778 52328 196620 85254 151123 56483 216386 142155 26...
output:
104 1 2 2 1
result:
ok
Test #111:
score: 12
Acceptable Answer
time: 84ms
memory: 35732kb
input:
300000 150000 298794 33 249938 150150 94550 250974 81175 54104 278585 193821 152157 141665 49446 85583 80695 188000 68881 196258 247763 18522 127194 144241 34978 123921 283060 205063 272491 21322 268465 118834 167606 96808 170715 285351 136104 264425 224375 11214 287391 238816 150034 117894 164150 1...
output:
719372 141689 79199 129305 127176 91392 51497 9636 30248 120249 45546 53759 84133 53763 32942 19544 129660 111239 105899 55680 111225 55188 67588 137953 138265 106806 122964 33504 20352 105821 48111 149834 9309 5109 85178 23990 47950 93508 56430 38731 104097 118453 71784 130096 11347 123684 102616 1...
result:
points 0.30
Test #112:
score: 40
Accepted
time: 39ms
memory: 31680kb
input:
299997 10 260045 9793 98211 261252 268218 119118 199149 175812 160256 99106 297866 257047 29937 48445 255408 201119 269304 163835 233903 279443 299033 30560 175969 72005 191042 154484 283371 6895 31022 14463 82119 79335 85645 42275 119778 4612 213872 130451 16654 52813 196932 30837 29550 21105 97274...
output:
544 7 9 5 1 3 2 10 5 9 10 4 3 8 6 6 8 2 4 1 7
result:
ok
Test #113:
score: 40
Accepted
time: 39ms
memory: 31832kb
input:
300000 500 284850 65915 161453 115282 215685 100970 230162 111184 148099 4736 177558 104060 294008 163299 288739 89735 138554 6547 253644 90855 84566 247886 265226 72565 282324 131401 145749 177524 7117 133132 281742 177992 269011 274501 76767 13793 295135 13387 19284 17744 128702 79439 206107 24819...
output:
11950 61 402 158 285 2 245 29 408 110 287 159 216 188 304 218 121 301 355 307 286 326 282 342 118 430 91 6 368 10 288 15 247 22 493 44 316 81 140 93 308 375 82 364 164 310 192 306 220 200 262 133 290 76 15 52 17 485 39 481 42 444 52 433 61 428 73 419 108 415 123 355 134 273 144 272 146 222 157 182 1...
result:
ok
Test #114:
score: 40
Accepted
time: 48ms
memory: 35936kb
input:
300000 10000 295911 255588 106376 29165 131511 242498 241724 137348 111816 298128 115053 57873 32115 8168 142843 63413 24976 54074 249769 81381 42376 56934 209918 54652 256666 251866 227398 210202 272702 105376 299621 46052 87078 13974 163279 511 205269 23169 39878 26379 63582 78572 116984 39395 239...
output:
459926 1879 3376 9903 8067 9680 8141 9592 1674 6866 2832 6416 2931 5964 3200 3231 3337 1422 3400 1342 3585 1164 4090 949 4133 899 4178 212 5063 9772 5226 9681 5392 9676 5509 9603 5530 9280 6396 9211 6578 9053 7137 8819 7207 8769 7785 8754 7993 8632 8307 8499 8371 8380 8427 8302 9766 8274 25 7909 28 ...
result:
ok
Test #115:
score: 40
Accepted
time: 187ms
memory: 72068kb
input:
300000 100000 293572 190057 221651 199397 266954 12126 71459 1269 80152 163288 148964 106703 88193 31532 288482 204402 62481 98275 23018 108960 209060 79397 119975 1408 254806 194310 115298 91515 213346 197365 285301 38617 222766 205539 159090 184812 31929 129 69862 55605 57141 61274 219155 10865 16...
output:
4121800 3580 36927 25551 92361 41168 54040 49403 30776 94136 99865 436 97092 1011 93319 6828 92649 7801 88385 11746 87640 11767 83289 25063 78317 35235 73071 35659 67524 37298 66775 40518 63626 41111 60596 45792 57817 47430 51729 48114 41748 48206 37718 48321 32482 48966 28385 52789 25263 54010 2307...
result:
ok
Test #116:
score: 12
Acceptable Answer
time: 85ms
memory: 34936kb
input:
300000 250000 282077 76078 88525 79778 106699 4993 251016 291578 144516 216211 59544 42531 35252 12630 156543 277140 161523 121098 181477 147097 142536 201836 47792 171587 101834 77741 175330 130866 246484 78953 276085 15473 295999 213999 268997 138806 256233 272890 237467 298862 150888 207615 29685...
output:
679440 41276 164441 166146 145284 55011 153637 220447 219657 112808 5595 168202 182618 149470 113824 60318 157831 33705 228888 178950 159318 106647 214253 181868 166129 72947 113179 162618 120213 176088 129951 2748 149956 228495 114178 141781 114310 179059 63962 100524 167200 42718 27982 184544 7314...
result:
points 0.30
Test #117:
score: 40
Accepted
time: 38ms
memory: 31676kb
input:
300000 1 219841 219841 298654 69897 15542 23901 140333 34296 265380 118117 164542 185566 67024 231689 246052 58278 207525 60441 113360 25656 295128 286625 271621 264661 228825 178434 186870 297677 237744 93079 143056 184517 32556 27417 138106 123442 188595 60253 219172 223502 199037 113281 291781 65...
output:
36 1 1
result:
ok
Test #118:
score: 40
Accepted
time: 38ms
memory: 31744kb
input:
300000 2 93697 92961 93697 92961 292764 26321 238029 145542 259397 180884 157223 103172 280762 259780 262279 213807 134646 290031 165161 88771 96878 22863 73966 52299 22493 213897 264815 77941 289435 84377 254009 35497 177156 171480 234558 32570 257802 10580 39084 6022 5353 153374 63050 44232 230408...
output:
48 1 1 2 2
result:
ok
Test #119:
score: 40
Accepted
time: 29ms
memory: 31828kb
input:
300000 1000 268627 20257 45078 88250 80079 151814 265102 268838 64155 234001 107620 7341 277398 210303 75298 30828 109842 99073 41160 293954 119811 56707 200986 137148 180934 218387 249286 93828 170804 6862 189010 148682 191866 168320 115801 84750 105924 189318 277441 33408 134229 87837 236059 22354...
output:
10676 480 368 443 806 114 175 469 169 143 152 135 489 914 323 51 382 732 179 982 604 628 916 46 208 148 326 165 629 367 488 323 855 804 842 551 423 208 379 573 792 35 334 820 569 538 704 185 798 250 288 615 844 83 80 372 445 130 706 596 653 755 635 846 400 999 891 852 104 941 642 238 550 589 987 440...
result:
ok
Test #120:
score: 40
Accepted
time: 87ms
memory: 37432kb
input:
300000 300000 295213 14206 66883 135084 178484 245555 218932 60757 287509 182994 82255 133067 66450 32723 272027 70391 208752 87 262257 233657 254962 216335 267275 22 287047 61305 280312 288627 218233 4012 129339 244993 180188 157783 269348 148435 237716 188768 60397 108027 207464 245681 29201 41 38...
output:
599998 33496 151835 215019 32870 39410 1211 18959 129482 169972 2947 205084 157730 198668 169539 172677 132267 109976 286956 281173 3802 96885 245645 149059 66133 69460 126868 106789 228195 154821 280541 145775 153114 202710 161632 135330 56917 90698 183034 235214 256505 286048 4099 116060 281871 57...
result:
ok
Test #121:
score: 12
Acceptable Answer
time: 25ms
memory: 36260kb
input:
98304 49152 33794 93448 12291 36018 6319 21164 36744 8512 10944 36922 8126 16476 81356 9271 22060 56339 62479 41615 55555 65317 86158 21787 62415 28235 45365 85748 35544 22797 37433 16727 1701 2198 80943 36632 22332 84161 26907 65158 34466 30481 80060 43616 84964 29267 74418 78818 92002 60137 52851 ...
output:
446276 34656 180 16960 32122 8576 2792 15278 9014 31323 42386 44340 5471 7152 48718 178 2582 40567 3309 43437 36374 10928 12759 13954 21318 11312 30535 28597 28841 15395 33122 588 14519 9002 39414 25294 30572 47583 39881 3798 22410 19219 3698 38912 29792 19310 24829 13107 11122 36259 186 48786 23340...
result:
points 0.30
Test #122:
score: 12
Acceptable Answer
time: 20ms
memory: 33552kb
input:
98304 49152 58682 20019 11621 73141 66942 58481 77721 95219 28161 23749 52456 76873 7921 58384 58694 71741 21250 39294 60077 52190 22346 58352 36815 86595 27412 8250 9258 47989 53459 81394 6184 20637 42312 46731 4995 86798 69907 31318 96680 96762 60395 61015 81349 15786 50228 30700 40526 84453 51047...
output:
398650 25477 2932 43840 16061 42943 180 45144 2562 9854 25538 2084 48087 15278 9014 36038 42386 398 5471 31323 3798 3096 25926 4743 48718 13954 12759 42545 30535 14070 23493 188 9375 7798 44417 28597 28841 42996 26033 2448 2 25294 22410 9002 30572 47583 39881 19219 3698 3798 29792 19310 24829 6270 5...
result:
points 0.30
Test #123:
score: 12
Acceptable Answer
time: 19ms
memory: 30272kb
input:
84766 60811 84549 64556 26186 1488 55262 20045 72529 24072 38010 76958 75939 76224 60908 73302 67482 71996 31405 14591 55003 11567 38591 70564 64194 695 31716 59950 73582 9259 73955 50579 33899 3323 38244 55348 62427 17338 74879 8008 81361 67048 42797 83330 51397 52902 21306 24011 74388 27603 47172 ...
output:
211754 1696 47187 33542 43718 39400 21077 18816 56182 49357 9220 49440 47617 35551 14759 36681 19931 34207 54556 51985 10404 51763 7831 41973 43261 47370 46934 23481 41432 3955 1767 36240 19788 54572 24445 2813 45607 36346 28277 11600 54527 34852 23863 60231 37780 46238 44751 37043 47507 703 35361 6...
result:
points 0.30
Test #124:
score: 12
Acceptable Answer
time: 51ms
memory: 32100kb
input:
179507 76560 173708 2561 83891 108297 29410 28013 174844 122999 154142 174223 61099 52428 114506 114220 44062 91443 152768 2426 107167 22223 38288 7670 81723 608 43357 148146 15172 51561 113526 107706 98010 38923 150482 30621 166514 134573 106707 32589 2453 1085 166332 163618 95707 25528 128073 4169...
output:
410810 51948 62923 27176 2889 66183 53683 37960 22113 30388 58817 18606 48345 59273 58163 60018 47517 52996 34715 65000 612 42095 31882 29864 32718 40730 39405 56731 40926 32051 73097 10441 42579 70355 13250 66573 20544 12854 55055 12250 59855 8650 70051 28100 61334 8596 23890 14214 55944 46198 6959...
result:
points 0.30
Test #125:
score: 12
Acceptable Answer
time: 8ms
memory: 29320kb
input:
47890 18165 44079 18036 36501 46926 47635 41025 9102 4 16131 34498 17186 3793 9548 31825 28611 22023 16266 6963 44771 20384 13351 29868 13488 16974 34193 13453 18069 12024 23566 220 46655 1 45726 10700 20429 15003 18081 4041 19082 7262 45951 259 39116 153 8398 5488 11800 6349 32191 12398 46312 4246 ...
output:
104602 16652 1318 16220 16489 17528 574 16004 3913 14307 11485 12924 7212 8993 7807 2363 5471 1135 1796 15391 16595 12467 6444 4514 11532 14457 9851 7888 5084 16797 16701 1197 4144 11959 15873 11327 12728 3024 13785 1583 9545 11737 17067 17006 7685 12950 13888 3136 9593 9096 12413 3507 5783 15658 12...
result:
points 0.30
Test #126:
score: 12
Acceptable Answer
time: 19ms
memory: 30504kb
input:
91183 25100 86637 2826 89298 8590 78040 86369 51412 457 54357 2600 19817 62937 82772 8013 27059 46697 59018 12490 80359 46154 72877 7880 59489 61582 69572 50247 25763 6100 25566 32213 22486 71789 29495 58012 28296 17358 75365 22162 26953 36503 47219 21864 90823 15488 56606 31546 31676 1763 88955 103...
output:
172036 302 4257 6398 17277 19605 5405 1951 3402 18124 25018 7041 23375 24134 18980 21194 17276 21862 10255 8351 11378 122 24998 22794 17065 9235 3227 8855 16858 15282 20778 1515 4158 11893 19906 23052 1089 14263 10746 10911 2631 17647 20807 12294 3920 2616 17164 17012 13033 21449 4729 18514 15618 20...
result:
points 0.30
Test #127:
score: 12
Acceptable Answer
time: 14ms
memory: 29232kb
input:
115658 737 106821 3108 18419 56504 71243 73090 35778 7750 112767 102719 90065 78380 56470 25227 79179 105377 14174 75680 22465 26372 103318 111091 91075 13893 38909 17359 24926 92661 72077 8471 89179 47895 64218 86259 8125 16873 57923 1978 3207 31530 94989 21682 113511 97980 66804 112863 13000 6848 ...
output:
14680 697 508 232 506 513 656 535 305 465 20 352 85 213 251 671 407 619 401 625 95 366 203 622 647 702 551 281 190 202 52 463 229 104 458 275 125 687 544 670 159 137 80 620 109 19 265 29 361 292 456 138 409 179 709 544 176 148 365 184 282 498 645 736 258 237 538 212 98 333 396 522 285 217 130 370 31...
result:
points 0.30
Test #128:
score: 12
Acceptable Answer
time: 54ms
memory: 32608kb
input:
219691 72231 216628 21147 39181 4258 189368 54293 43485 217876 32035 187993 180543 154626 186089 96867 131281 24967 81769 156243 96948 172691 80739 59752 208935 5721 205571 75262 96310 162886 151489 57524 44132 102668 184461 171960 160758 64012 72496 32284 159185 133581 186186 15 179046 37732 149990...
output:
455486 23435 46640 44527 21235 48935 61223 14570 30451 14702 36748 37632 39144 57278 20019 46332 18338 5999 52159 49468 63826 16496 27208 65195 52353 31537 69741 36270 11561 23177 61347 9751 39356 4419 20239 71534 16023 21222 22529 23637 43353 11045 66603 45592 14869 66030 55675 27743 16397 56724 56...
result:
points 0.30
Test #129:
score: 12
Acceptable Answer
time: 36ms
memory: 31168kb
input:
204290 27042 203698 53585 152826 28340 199812 47331 155547 23180 88842 10447 73727 1513 204112 96608 77763 77387 25507 102643 118152 2462 155154 77551 105285 5086 162534 30069 135963 65436 29316 176892 70800 17682 24024 1724 141965 107177 185617 5059 176548 151147 21506 16772 192121 23338 140729 189...
output:
249948 7977 11957 5545 23777 11820 25819 25294 17599 4907 10926 2440 4004 16375 5177 23499 13091 24099 26736 18992 1620 16584 4464 12589 4967 24115 4157 23498 25062 4017 26722 7355 17566 794 2988 22682 20374 191 9174 12907 5339 9267 18828 5184 9572 22067 10128 2847 16304 23595 12763 24581 3203 26859...
result:
points 0.30
Test #130:
score: 12
Acceptable Answer
time: 5ms
memory: 28772kb
input:
17448 16850 16784 2373 3625 918 1539 4844 13513 12903 1237 16213 11736 3609 15494 113 1154 4227 9354 271 14824 6790 16417 4365 7169 469 10519 160 5185 301 14498 3081 3824 14124 4872 12107 875 4510 2591 13 10479 12974 13862 16005 13874 2466 15448 9009 8014 159 10733 16772 8247 8681 236 3204 15205 144...
output:
36776 624 12419 14253 15395 9499 4984 1455 9069 10711 10753 4219 9199 11239 3964 14185 6837 12982 1627 4596 11271 3448 3613 12386 10642 11095 16047 5915 10049 553 289 3327 7422 7748 16573 9590 2839 14594 7130 2833 5456 4013 4872 103 14514 6527 7115 10453 13428 6924 5422 10112 14228 13692 8457 8334 6...
result:
points 0.30
Test #131:
score: 12
Acceptable Answer
time: 51ms
memory: 33128kb
input:
197059 79837 195067 137598 55387 72099 170934 64759 86948 35345 183837 82827 152639 180917 157894 39775 96932 71589 62608 30612 40197 12951 65735 78858 72632 49712 173497 192075 169534 35213 187296 9173 148597 1786 82564 73423 125519 136473 43324 145743 136972 82054 55298 44 104556 88380 54808 99258...
output:
446188 22687 36747 17044 57791 15097 73911 62307 64289 47606 6056 67879 51354 2654 534 25304 76158 17585 11953 30127 47997 56996 27352 37790 9596 1614 4252 26447 53307 68154 53401 49253 18440 6278 16584 46309 2850 47364 13317 9694 5898 12862 43408 51845 48233 32582 77230 15990 34804 12391 20150 3503...
result:
points 0.30
Test #132:
score: 12
Acceptable Answer
time: 4ms
memory: 27868kb
input:
13906 11571 13409 2270 9462 862 12187 43 10121 523 5068 127 7897 2413 638 9552 6887 5692 11503 2501 11974 50 12824 10506 10071 3 9322 1290 1873 5898 13342 4796 12400 13 8691 3024 2582 4160 5726 1139 4045 5449 13306 9 13743 6844 8314 1948 13509 11471 12932 2495 2072 11771 399 6763 13126 6559 11439 13...
output:
32842 2079 8305 2243 496 702 505 2559 358 5734 11433 9071 9760 10645 2533 10807 3802 4845 5283 3674 8837 8631 6554 722 10466 5956 2006 7251 4317 1374 3997 667 9547 5744 10268 6425 1995 11077 6814 11552 1984 3710 2608 4315 467 5797 813 2586 5494 8233 8962 6421 6392 3752 8980 8403 730 4476 9152 4319 6...
result:
points 0.30
Test #133:
score: 12
Acceptable Answer
time: 66ms
memory: 43088kb
input:
212992 106496 162625 196607 126778 137965 70027 157817 180886 26833 153773 133888 71749 80539 134701 32436 112026 52352 110477 75979 123072 61065 54556 19168 40739 140219 176006 211773 121201 193172 73029 102758 166272 180573 72171 30744 15218 5871 43059 70791 120458 103615 144724 61301 165605 10859...
output:
1003098 4164 73425 14113 17255 47852 69637 104850 55673 17239 3755 104274 31237 23632 40484 105963 5250 91801 22507 45061 70508 65789 13360 53182 98639 29895 11926 57556 7042 7624 61669 11634 35117 93147 104826 33302 40671 50331 66100 104711 36301 96722 55170 9907 34520 89272 75447 63287 61374 92498...
result:
points 0.30
Test #134:
score: 12
Acceptable Answer
time: 88ms
memory: 52156kb
input:
300000 150000 294939 378 19602 3847 251993 971 259346 170245 237888 115034 140331 161477 191557 223703 227854 63918 143342 31463 244411 231753 211004 59405 211719 85153 273556 18895 55727 39700 287069 28945 44997 223316 221473 265870 50042 262885 194951 51403 297258 160931 190538 164684 196040 44888...
output:
22815292 60750 4928 4204 37528 74816 92817 89905 99607 39801 34048 123591 69520 126153 71407 149660 25903 138511 39182 54347 49869 64150 11212 130137 103552 5381 134840 545 147489 133433 36561 80066 96745 72503 56610 34058 79701 141295 87271 124800 35831 41236 142667 87807 70078 31501 97786 92538 13...
result:
points 0.30
Test #135:
score: 12
Acceptable Answer
time: 84ms
memory: 53356kb
input:
300000 150000 295511 57961 195666 108917 200113 95462 220697 64472 235119 17373 299559 38777 266923 8523 182082 126098 250451 59469 116744 147826 157457 256362 200441 127777 143676 8429 103102 26156 38671 60363 125044 260 265102 23426 91028 230645 226764 32825 80697 146228 296430 259975 247464 17567...
output:
4853531452 149539 124304 143024 54992 115787 107646 26879 43725 109584 115760 146565 60936 6943 67085 130366 8464 106695 111602 36141 128161 86345 386 77442 37645 50707 87150 67315 83025 53825 75873 100671 86074 110848 133523 64913 142705 60182 18002 50821 20092 88110 22213 72484 105959 35481 98672 ...
result:
points 0.30
Test #136:
score: 12
Acceptable Answer
time: 69ms
memory: 36284kb
input:
212992 106496 11607 162099 101705 36584 167967 24207 210628 103289 116411 165151 70915 92043 119098 4412 37941 133322 43386 160271 200058 112999 44 91780 106517 67787 24662 25492 174519 12510 69150 8929 143949 197724 95479 150808 30861 85423 77676 166476 7676 115491 49037 185333 96075 84208 205773 1...
output:
881026 62577 60026 97540 65134 8047 2887 25891 66958 71812 58231 58597 84675 76648 47418 44137 33078 43702 49172 102752 53759 92262 77036 64368 83136 44398 55998 105922 45213 27661 38309 56918 13813 11159 88237 87284 72967 25702 43669 40777 35365 26562 36893 84349 74105 47344 75529 96574 101622 6856...
result:
points 0.30
Test #137:
score: 12
Acceptable Answer
time: 96ms
memory: 42744kb
input:
300000 150000 299687 9248 260039 47457 165458 38447 258291 58147 198580 3365 212540 270151 227090 17859 167603 5593 255358 5010 90744 31 14517 22628 115609 192794 20585 204481 102587 15242 228784 93751 156699 81423 40398 222123 20831 283593 254172 184620 101939 213563 192191 45671 263754 53547 76753...
output:
48042942 15038 41848 33435 71075 10592 46552 126639 5654 52604 105746 47839 135931 35679 124036 23328 75515 19876 144458 33920 25602 32340 106422 49502 98653 41848 117452 55841 56007 59299 75856 111634 126710 70672 77541 47309 76554 29956 62599 35689 63204 143057 45926 129196 107619 60576 49470 2313...
result:
points 0.30
Test #138:
score: 12
Acceptable Answer
time: 119ms
memory: 54636kb
input:
300000 150000 288421 34834 115049 267225 71548 217010 169798 12321 41653 220459 258545 207472 129179 32700 61673 166162 198513 65796 275938 148517 87913 140911 55784 277431 280962 28563 155867 11556 113477 185015 97981 1039 247671 85075 192043 144087 161773 195941 22833 20213 97216 19877 287807 1976...
output:
10552215478 126019 85330 139301 51590 84055 122349 65548 57641 79486 103101 23020 13297 39253 54815 70627 47231 109035 80966 140714 103255 17191 111330 110336 53277 51529 34889 52940 121820 147897 36447 88940 91898 418 89549 47108 13078 17488 82708 26333 128564 13343 79695 28435 146095 11488 81286 5...
result:
points 0.30
Test #139:
score: 12
Acceptable Answer
time: 56ms
memory: 35496kb
input:
212992 106496 205314 193896 128571 81467 148520 62247 134727 14839 111705 120715 168557 128917 210025 136063 189511 146692 163030 27234 9098 22560 133956 197415 74844 111735 189445 149949 113023 92827 37295 120347 92923 119877 51374 123670 134306 106301 39252 148448 63252 168295 152105 161904 44969 ...
output:
802296 69407 18481 24109 70958 80805 79819 3469 74406 90254 14041 23255 27047 27793 90683 89036 89127 378 105277 27215 52647 89630 103822 61285 68275 101627 13157 81890 97976 19573 83732 26933 10742 54252 52170 49327 2746 61039 62228 34145 76130 91846 18343 33568 22661 95461 7693 86101 40393 34815 1...
result:
points 0.30
Test #140:
score: 12
Acceptable Answer
time: 90ms
memory: 37908kb
input:
300000 150000 292808 62686 258657 103989 254587 49571 185762 33638 96237 221966 124722 176 225523 262604 112550 181020 113202 65914 190610 26484 171742 285133 50089 102820 274661 35916 33618 258955 113828 2379 154238 2299 71215 196845 10374 265853 171667 119044 97955 277116 293834 1439 181381 274032...
output:
10783828 46631 122321 135660 26857 104383 64690 55606 68743 83877 132529 75021 33145 54034 12925 117727 58938 50120 106078 17707 42509 20616 94337 135027 116605 72123 8304 106301 137472 30289 3466 2651 132240 17183 49371 33407 144847 89391 55124 59966 50588 139164 48837 9314 119894 56065 39957 11607...
result:
points 0.30
Test #141:
score: 12
Acceptable Answer
time: 72ms
memory: 39860kb
input:
300000 150000 291233 8511 58814 43920 91275 151309 102485 201077 173103 121280 136353 281097 236719 20114 56657 173752 125110 264 196581 140032 22046 118201 251077 4208 171759 8610 29543 146759 59029 269161 126074 64446 42051 61225 85555 30593 161931 93127 360 183887 137869 111268 157269 58999 24304...
output:
589064296 128509 96162 133816 47435 80320 111762 137663 80767 100517 97050 26424 101172 58164 62667 141813 65232 113713 88420 104668 88013 147 1339 41468 28669 42668 133196 110557 79960 95800 47486 74373 51573 64510 144181 124035 86123 6126 142589 33135 122459 50264 72471 86937 84059 12381 67144 856...
result:
points 0.30
Test #142:
score: 12
Acceptable Answer
time: 58ms
memory: 32872kb
input:
212992 106496 132656 57183 81722 73973 174486 43462 45776 121938 75451 179775 54761 132365 55738 189283 95135 68965 164569 104566 149302 81084 153117 99505 114880 159925 210510 27086 184854 118520 34601 168615 78737 210995 164251 46886 161073 27535 109965 36937 46590 20384 85326 157697 137715 32639 ...
output:
767454 12477 98838 39842 69150 82160 64373 55353 37084 79612 98310 103857 56965 10323 77449 15000 21891 26031 33634 94129 16489 100107 103849 43324 79797 38459 70570 5611 70053 35469 58558 32586 1 9963 79606 105108 9262 24921 47659 99697 55933 4145 28801 98352 2963 12769 82114 22573 97910 87615 1169...
result:
points 0.30
Test #143:
score: 12
Acceptable Answer
time: 84ms
memory: 36152kb
input:
300000 150000 284817 246113 97625 126160 123617 51409 13830 93666 255846 190766 101955 156452 267269 26763 181700 65061 208840 71279 44479 128991 85110 54547 752 129211 287457 84195 244842 141351 184152 217683 278136 189719 282194 83167 199919 165578 275531 122920 264387 1180 33023 201832 99080 1134...
output:
3273878 109408 91717 148234 145119 8416 100147 7766 131837 103448 92871 10517 105123 67704 57399 48254 8729 66265 5394 136519 32221 142855 3685 11448 40206 121819 131103 119303 60151 80500 57699 75751 124589 101252 48954 77247 73801 114380 2750 99098 12989 71616 13156 28956 47666 13308 96967 12427 1...
result:
points 0.30
Test #144:
score: 12
Acceptable Answer
time: 121ms
memory: 55464kb
input:
300000 150000 287156 79903 210338 58616 246562 275279 117741 238895 173974 4245 59566 1074 144866 96220 194630 272635 176239 9387 286865 293292 35546 125419 52177 41 180615 19100 170597 44273 9775 6031 285190 34478 239091 159161 189587 83763 192278 227439 151798 151962 73064 219 281231 121824 129338...
output:
1040570122 140643 120442 49103 42967 112939 52470 146892 142086 63526 143479 11590 51837 88078 1329 53834 20089 14075 18006 65559 10134 134833 87932 50277 47508 95094 35336 121328 6696 14492 78372 68844 17349 64760 118012 14265 28204 90517 112522 73608 43170 116410 20282 105112 33880 41633 52070 249...
result:
points 0.30
Test #145:
score: 12
Acceptable Answer
time: 55ms
memory: 32408kb
input:
212992 106496 122573 170700 4074 16918 75609 168033 155105 182742 72345 66641 30089 205168 3147 173228 203082 139181 179666 138597 154440 211882 96819 93880 192808 54109 145311 28555 108529 66318 111674 79375 59802 132192 136476 52358 102919 129683 111231 143790 205730 202037 28610 155096 55947 1704...
output:
755168 14011 63577 36913 105447 74091 65421 92806 12961 80251 12729 57909 75621 85597 17182 9963 61423 58137 70865 40185 10553 75063 56365 65057 97241 106354 83236 83841 91565 83143 75856 34781 67263 83412 80491 83550 35888 17206 76481 95485 93296 54252 52759 101389 8444 73708 92169 60243 81207 4982...
result:
points 0.30
Test #146:
score: 12
Acceptable Answer
time: 85ms
memory: 35208kb
input:
300000 150000 299508 25020 246128 82243 35637 24355 122528 44180 266554 228070 179901 265542 251052 246241 157666 4894 124269 280274 247450 14499 95520 139376 280723 126549 134229 19123 188525 92497 179520 45695 243446 8391 295876 252069 241556 222089 239401 195586 177101 121862 101478 171431 213354...
output:
1838874 122870 51440 138849 40418 13961 77652 80571 132360 67946 33467 77155 97163 29740 51056 56949 10639 87755 67358 142080 117431 31639 13561 23448 95408 118624 79317 110615 22100 61152 100391 138681 44307 36200 26021 68821 4505 46272 114815 113683 42070 112489 134625 71880 47686 1246 132771 1289...
result:
points 0.30