QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#433355 | #8676. Three Kinds of Dice | grass8cow | AC ✓ | 59ms | 18196kb | C++17 | 1.9kb | 2024-06-08 10:35:05 | 2024-06-08 10:35:06 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define pi pair<int,int>
#define fi first
#define se second
#define db double
#define pb push_back
db ans1,ans2;
#define ll long long
ll cj(pi a,pi b){return 1ll*a.fi*b.se-1ll*a.se*b.fi;}
pi operator - (const pi &a,const pi &b){return {a.fi-b.fi,a.se-b.se};}
struct Qb{
pi sta[500100];int typ,top;
inline void clear(){top=0;}
inline void ins(pi e){
if(top&&sta[top].fi==e.fi){if(sta[top].se<=e.se)return;top--;}
while(top>1&&cj(sta[top]-sta[top-1],e-sta[top-1])<=0)top--;
sta[++top]=e;
}
inline db Ask(int X){
for(int i=1;i<=top;i++)if(sta[i].fi==X)return sta[i].se;
for(int i=1;i<top;i++)if(sta[i].fi<X&&X<sta[i+1].fi)
return sta[i].se+1.0*(sta[i+1].se-sta[i].se)*(X-sta[i].fi)/(sta[i+1].fi-sta[i].fi);
assert(0);return -1;
}
}T1,T2;
int n,m,a[100100],b[101000];
void Sol(){
T1.clear(),T2.clear();
T1.typ=1,T2.typ=0;
vector<pi>e;
e.pb({1,-1});
for(int i=1;i<=n;i++)e.pb({a[i],0}),e.pb({a[i]+1,0});
for(int i=1;i<=m;i++)e.pb({b[i],1}),e.pb({b[i]+1,1});
sort(e.begin(),e.end());
int s1=0,s2=0,Sz=e.size();
for(int i=0;i<Sz;i++){
int o=e[i].se;if(o==0)s1++;if(o==1)s2++;
if(i==Sz-1||e[i].fi!=e[i+1].fi)T1.ins({s1,s2}),T2.ins({s2,-s1});
}
ans1=min(ans1,1.0*T1.Ask(n)/m/2);
ans2=max(ans2,-1.0*T2.Ask(m)/n/2);
}
int main(){
ans1=1;
scanf("%d",&n);for(int i=1;i<=n;i++)scanf("%d",&a[i]);sort(a+1,a+n+1);
scanf("%d",&m);for(int i=1;i<=m;i++)scanf("%d",&b[i]);sort(b+1,b+m+1);
long long ss=0;
for(int i=1;i<=n;i++){
int t1=lower_bound(b+1,b+m+1,a[i])-b,t2=upper_bound(b+1,b+m+1,a[i])-b;
ss+=t1-1,ss-=m-t2+1;
}
if(ss<0){ss=-ss;swap(n,m);for(int i=1;i<=max(n,m);i++)swap(a[i],b[i]);}
Sol();
printf("%.12lf %.12lf\n",ans1,ans2);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 11728kb
input:
3 2 4 9 3 1 6 8
output:
0.291666666667 0.750000000000
result:
ok 2 numbers
Test #2:
score: 0
Accepted
time: 0ms
memory: 12132kb
input:
3 1 6 8 6 2 2 4 4 9 9
output:
0.291666666667 0.750000000000
result:
ok 2 numbers
Test #3:
score: 0
Accepted
time: 2ms
memory: 11724kb
input:
1 1 1 2
output:
0.750000000000 0.000000000000
result:
ok 2 numbers
Test #4:
score: 0
Accepted
time: 0ms
memory: 11644kb
input:
5 2 2 2 3 3 6 5 5 6 6 6 7
output:
0.500000000000 0.500000000000
result:
ok 2 numbers
Test #5:
score: 0
Accepted
time: 2ms
memory: 12080kb
input:
6 2 2 7 7 9 9 6 3 3 5 5 10 10
output:
0.250000000000 0.750000000000
result:
ok 2 numbers
Test #6:
score: 0
Accepted
time: 0ms
memory: 12280kb
input:
11 12 11 15 9 3 8 18 4 17 13 9 11 8 18 5 15 12 5 11 11 11 3 8
output:
0.473684210526 0.525000000000
result:
ok 2 numbers
Test #7:
score: 0
Accepted
time: 0ms
memory: 11752kb
input:
20 17 18 29 37 5 15 5 9 37 34 12 38 26 29 2 40 23 20 4 12 23 22 2 24 33 6 19 15 31 1 18 30 11 40 13 2 19 5 39 37 22 9 31 26
output:
0.440503432494 0.554166666667
result:
ok 2 numbers
Test #8:
score: 0
Accepted
time: 0ms
memory: 12252kb
input:
40 52 22 29 52 44 3 69 45 40 73 66 51 2 21 20 51 49 34 72 64 69 68 56 4 6 39 29 18 43 6 56 15 22 31 25 78 59 58 40 66 46 52 24 40 12 56 7 4 29 12 26 45 39 27 47 55 45 17 74 28 12 75 77 77 73 41 21 20 23 55 13 58 21 43 11 22 2 67 18 49 56 15 26 25 35 20 61
output:
0.433971447112 0.565224358974
result:
ok 2 numbers
Test #9:
score: 0
Accepted
time: 2ms
memory: 11804kb
input:
76 54 80 5 41 10 124 87 45 67 42 118 33 128 118 21 40 41 3 18 69 131 113 121 106 99 72 108 85 101 108 72 27 13 45 133 137 4 62 30 111 71 39 31 120 79 91 30 58 43 6 60 65 83 83 42 83 26 108 20 133 24 8 125 138 100 21 103 81 45 102 76 44 118 109 18 67 81 4 15 26 65 110 48 126 39 128 82 1 43 134 18 69 ...
output:
0.421188630491 0.573711063373
result:
ok 2 numbers
Test #10:
score: 0
Accepted
time: 0ms
memory: 11692kb
input:
96 11 1 23 7 6 41 8 11 40 5 24 32 40 40 24 24 24 23 17 21 27 21 21 42 1 29 15 45 24 44 50 1 34 11 7 1 12 45 15 3 14 9 25 5 5 20 31 1 41 44 7 27 28 11 24 37 50 7 7 48 1 22 4 5 40 32 33 32 18 18 26 49 28 34 42 29 15 18 4 42 12 21 17 10 47 2 44 40 8 15 7 44 25 5 13 19 88 16 30 20 24 2 26 39 28 1 16 10 ...
output:
0.481854838710 0.518595041322
result:
ok 2 numbers
Test #11:
score: 0
Accepted
time: 2ms
memory: 11724kb
input:
208 31 110 162 24 386 12 262 283 384 392 361 168 58 129 155 45 36 70 2 127 296 380 188 125 148 77 117 272 219 38 79 322 70 91 115 273 228 375 398 353 277 307 258 60 42 60 298 109 60 158 192 159 29 165 103 51 304 313 392 113 62 149 203 152 3 373 206 144 136 214 151 348 287 181 202 367 67 138 388 93 3...
output:
0.495587799090 0.504427083333
result:
ok 2 numbers
Test #12:
score: 0
Accepted
time: 2ms
memory: 12280kb
input:
1170 1311 1924 962 906 1767 1811 1941 1956 1311 364 371 1825 1155 918 1625 1882 1082 198 889 924 1830 244 589 1639 296 1326 1663 379 1479 1369 729 1698 870 1845 217 888 754 858 966 1887 61 1801 1002 1185 1848 610 1914 1742 409 648 781 445 1217 96 1639 1681 1028 923 123 1234 909 569 747 1182 1538 368...
output:
0.485542699331 0.514105003008
result:
ok 2 numbers
Test #13:
score: 0
Accepted
time: 16ms
memory: 12184kb
input:
22713 21796 19194 13993 27763 16658 14855 3720 21919 4029 27311 21879 4981 25538 24982 5230 7339 4299 26976 30753 39183 38686 25483 3489 12855 28134 34477 25105 39953 31801 23937 31229 26076 32962 33965 6078 33306 15915 21622 3643 29726 2542 27764 4554 17811 17329 10576 26448 24416 30696 3230 3730 1...
output:
0.499529338332 0.500470603064
result:
ok 2 numbers
Test #14:
score: 0
Accepted
time: 8ms
memory: 13820kb
input:
100000 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 1 1 1 1...
output:
0.750000000000 0.000000000000
result:
ok 2 numbers
Test #15:
score: 0
Accepted
time: 11ms
memory: 14060kb
input:
1 1 100000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100...
output:
0.750000000000 0.000000000000
result:
ok 2 numbers
Test #16:
score: 0
Accepted
time: 19ms
memory: 17432kb
input:
100000 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 1 1 1 1...
output:
0.750000000000 0.000000000000
result:
ok 2 numbers
Test #17:
score: 0
Accepted
time: 24ms
memory: 16640kb
input:
100000 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 1 1 1 1...
output:
0.500004999950 0.499995000000
result:
ok 2 numbers
Test #18:
score: 0
Accepted
time: 27ms
memory: 16612kb
input:
100000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 1000000000 1 10000...
output:
0.500000000000 0.500000000000
result:
ok 2 numbers
Test #19:
score: 0
Accepted
time: 51ms
memory: 17236kb
input:
100000 100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 9995...
output:
0.500000000025 0.499999999975
result:
ok 2 numbers
Test #20:
score: 0
Accepted
time: 59ms
memory: 16376kb
input:
100000 100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 9995...
output:
0.500000000000 0.500000000000
result:
ok 2 numbers
Test #21:
score: 0
Accepted
time: 32ms
memory: 18196kb
input:
99818 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
0.212675039006 0.787320894634
result:
ok 2 numbers
Test #22:
score: 0
Accepted
time: 23ms
memory: 16948kb
input:
99536 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
0.009384890327 0.747631549773
result:
ok 2 numbers
Test #23:
score: 0
Accepted
time: 29ms
memory: 17164kb
input:
99536 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
0.009384890327 0.747631549773
result:
ok 2 numbers
Test #24:
score: 0
Accepted
time: 0ms
memory: 12224kb
input:
77 171374872 241639648 194650219 785923176 44879978 171374872 572364662 194650219 622176869 572364662 44879978 637973696 629927342 629927342 802671596 241639648 44879978 802671596 194650219 572364662 629927342 629927342 629927342 637973696 171374872 701867938 171374872 572364662 44879978 785923176 7...
output:
0.343228200371 0.645773433007
result:
ok 2 numbers
Test #25:
score: 0
Accepted
time: 4ms
memory: 11744kb
input:
71 994336085 876792083 994336085 160929533 877689188 397904084 101727523 406590565 493888134 312276650 406590565 493888134 771053239 312276650 877689188 110667814 160929533 233410550 876792083 101727523 160929533 101727523 160929533 493888134 397904084 493888134 994336085 406590565 233410550 8776891...
output:
0.389803610395 0.612666058209
result:
ok 2 numbers
Test #26:
score: 0
Accepted
time: 7ms
memory: 12428kb
input:
35 15837610 920080997 354969432 354969432 497062046 15837610 760117651 489477657 489477657 760117651 489477657 979864980 15837610 15837610 507580448 152986375 15837610 760117651 920080997 354969432 354969432 507580448 15837610 760117651 760117651 354969432 15837610 760117651 152986375 489477657 4970...
output:
0.467738840183 0.531027764632
result:
ok 2 numbers
Test #27:
score: 0
Accepted
time: 3ms
memory: 11984kb
input:
2181 930742488 605254549 227347170 849138290 346631813 802467319 936261443 383148418 167959513 963169213 940822713 188586631 497851967 827948544 420567968 854453419 10501697 289511989 426024243 791096563 814235362 13163749 165143406 540804386 639351196 68295337 929900042 346631813 432357821 93267368...
output:
0.443814834025 0.550509407129
result:
ok 2 numbers
Test #28:
score: 0
Accepted
time: 3ms
memory: 11788kb
input:
1051 564651099 927158620 6969288 272869441 588814782 222044713 638552227 959439282 699532682 720742825 806482195 770842015 133159188 355836836 745655381 609834202 787721335 317953129 941941289 656418022 424020728 511373124 787721335 169069072 371453642 787721335 148238546 997784005 699532682 1954672...
output:
0.466695630020 0.532680314047
result:
ok 2 numbers
Test #29:
score: 0
Accepted
time: 23ms
memory: 13736kb
input:
6293 276019022 202577503 885332852 259073186 583837171 920579975 438781137 269184415 976158564 21539650 829800174 243863931 789527717 777491695 564443776 107420560 562038251 368127224 785383940 660506217 527595923 564443776 454698153 417902647 409053754 989888849 197612182 949291061 168006031 963900...
output:
0.490003682842 0.510137214546
result:
ok 2 numbers
Test #30:
score: 0
Accepted
time: 17ms
memory: 12472kb
input:
62218 6290188 133358709 111129067 409631445 587348591 758380422 950997337 987021454 812860750 455952995 293615987 612396152 419518364 860403854 665763449 766279042 810511873 517560669 433073561 89551864 576952213 267579126 5603164 423732182 586058310 203365873 654778645 497048751 431767549 567294264...
output:
0.398469896172 0.627399967732
result:
ok 2 numbers
Test #31:
score: 0
Accepted
time: 14ms
memory: 12376kb
input:
48054 451017488 35089153 550747055 860805438 678739246 188439987 489531317 700831386 875351687 369100616 710176105 464836906 229577124 411397767 215445791 430956048 553893042 360795182 563129429 74577288 887404954 595304660 455501492 389249356 307197214 427273678 285053275 872457725 373526566 730250...
output:
0.480051582697 0.519183073397
result:
ok 2 numbers
Test #32:
score: 0
Accepted
time: 18ms
memory: 13436kb
input:
70100 66810131 849112639 33917204 939851538 473249097 379695721 772679455 223390093 229236901 43984944 513003857 678742317 503368062 258410294 39241799 760096011 94884214 697944233 441011241 476713871 551573741 908655478 819602653 630809100 554712162 470143389 828101791 38003858 557860049 577973507 ...
output:
0.490275812015 0.509685856493
result:
ok 2 numbers
Test #33:
score: 0
Accepted
time: 0ms
memory: 11620kb
input:
76 133648179 133648179 737496437 22843180 344981651 387182456 834491544 544366644 733872112 588464033 169573457 669737160 169573457 134587619 935496442 133648179 387182456 834491544 935496442 169573457 387182456 935496442 737496437 582828803 544366644 588464033 588464033 834491544 134587619 54436664...
output:
0.403663500678 0.609907120743
result:
ok 2 numbers
Test #34:
score: 0
Accepted
time: 2ms
memory: 11684kb
input:
85 970646301 445314182 948822838 885181378 715470181 452386412 445314182 933310806 791126667 346245334 948822838 106481670 167816986 885181378 933310806 760037860 715470181 970646301 948822838 452386412 885181378 715470181 948822838 791726901 167816986 632744833 167816986 337316222 167816986 6327448...
output:
0.488455414013 0.511817440913
result:
ok 2 numbers
Test #35:
score: 0
Accepted
time: 10ms
memory: 12152kb
input:
53 550472882 127704353 701365705 701365705 739984829 701365705 701365705 181915987 516588862 516588862 516588862 127704353 554726396 550472882 550472882 934704313 934704313 739984829 516588862 550472882 701365705 934704313 181915987 934704313 739984829 701365705 701365705 516588862 181915987 1819159...
output:
0.434555122179 0.575301008412
result:
ok 2 numbers
Test #36:
score: 0
Accepted
time: 0ms
memory: 11920kb
input:
9053 451424369 772854729 60732795 690622643 543663691 638676859 474481609 870296979 899986760 276131912 965724909 955234204 187334350 360110716 995298056 809604608 358851316 203076424 975942094 581296745 147981067 643083297 998721114 628666666 591305805 453563584 473998500 231485959 852562799 947729...
output:
0.422674803932 0.579773565124
result:
ok 2 numbers
Test #37:
score: 0
Accepted
time: 4ms
memory: 12072kb
input:
3696 404207935 132347845 404103267 484781541 284987395 265495792 535804729 864128923 806931511 164564843 32710563 675896390 512949253 991583615 431713 581438461 661380384 977577563 148274567 391840897 882430549 220957527 568719450 483574376 98140729 991583615 803746596 954808735 585666177 514647602 ...
output:
0.485685503960 0.514421852657
result:
ok 2 numbers
Test #38:
score: 0
Accepted
time: 6ms
memory: 11832kb
input:
6067 204818503 445391312 272090898 551255431 810981057 559164817 472204665 650008188 232584178 122917404 347240494 205564144 203912222 692648530 7733647 978569444 449639547 639272227 235873385 573245887 628506177 131318102 800978529 837048460 747631896 508435134 661816109 536083815 413778789 9121656...
output:
0.493353956320 0.506686648786
result:
ok 2 numbers
Test #39:
score: 0
Accepted
time: 11ms
memory: 12100kb
input:
31622 155887489 804688272 913936619 265181319 539022812 189438924 355429964 561944780 601600489 48555214 174772611 259472750 515552412 319036746 295705217 792112618 535677516 731074044 933007726 638807202 82947203 823865643 844711300 221588943 550352183 260685546 513764853 942090870 489087786 978427...
output:
0.434027777778 0.558282208589
result:
ok 2 numbers
Test #40:
score: 0
Accepted
time: 16ms
memory: 12440kb
input:
41458 429107024 316876766 456208392 677697380 706761505 619631255 828793542 313201633 976600157 317875896 18220071 225591292 853310420 477302187 823457932 421235339 77480420 138399607 85571531 68297762 27660275 672946976 569516356 50831019 378954837 215318040 479005088 57248267 877574185 896121137 2...
output:
0.491936143286 0.508172092897
result:
ok 2 numbers
Test #41:
score: 0
Accepted
time: 26ms
memory: 17208kb
input:
58105 608225036 800122832 425309028 838841636 538774141 10971609 710578824 381583350 665277539 656582490 875117141 22050662 423155179 137236288 338694554 840903712 330004709 920412465 32914369 938771861 718624436 391431029 880746987 686819209 131701154 125389057 436549159 789125518 317508612 8867113...
output:
0.497260975544 0.502752554241
result:
ok 2 numbers
Test #42:
score: 0
Accepted
time: 0ms
memory: 11748kb
input:
2 1 2 1 1
output:
0.666666666667 0.250000000000
result:
ok 2 numbers
Test #43:
score: 0
Accepted
time: 0ms
memory: 11692kb
input:
3 2 3 4 3 2 2 5
output:
0.400000000000 0.625000000000
result:
ok 2 numbers
Test #44:
score: 0
Accepted
time: 2ms
memory: 11880kb
input:
3 2 3 5 3 3 3 4
output:
0.400000000000 0.625000000000
result:
ok 2 numbers
Test #45:
score: 0
Accepted
time: 2ms
memory: 11620kb
input:
3 2 4 5 3 3 3 4
output:
0.400000000000 0.583333333333
result:
ok 2 numbers
Test #46:
score: 0
Accepted
time: 0ms
memory: 12400kb
input:
3 2 3 4 3 3 3 5
output:
0.500000000000 0.500000000000
result:
ok 2 numbers
Test #47:
score: 0
Accepted
time: 2ms
memory: 12376kb
input:
3 2 3 5 3 3 3 5
output:
0.500000000000 0.500000000000
result:
ok 2 numbers
Test #48:
score: 0
Accepted
time: 2ms
memory: 11756kb
input:
4 1 2 3 4 3 1 2 4
output:
0.500000000000 0.500000000000
result:
ok 2 numbers
Test #49:
score: 0
Accepted
time: 2ms
memory: 11704kb
input:
4 1 2 3 4 3 1 3 4
output:
0.475000000000 0.523809523810
result:
ok 2 numbers
Test #50:
score: 0
Accepted
time: 0ms
memory: 11624kb
input:
5 2 4 6 8 9 5 2 4 6 8 8
output:
0.500000000000 0.500000000000
result:
ok 2 numbers
Test #51:
score: 0
Accepted
time: 2ms
memory: 11708kb
input:
20 2 12 2 12 2 12 2 12 2 12 2 12 2 12 2 12 2 12 2 12 10 2 3 4 5 6 7 8 9 10 11
output:
0.150000000000 0.705882352941
result:
ok 2 numbers
Test #52:
score: 0
Accepted
time: 0ms
memory: 12064kb
input:
20 1 2 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
output:
0.500000000000 0.500000000000
result:
ok 2 numbers
Test #53:
score: 0
Accepted
time: 1ms
memory: 11572kb
input:
1 1 1 1000000000
output:
0.750000000000 0.000000000000
result:
ok 2 numbers
Test #54:
score: 0
Accepted
time: 1ms
memory: 12316kb
input:
1 1000000000 1 1
output:
0.750000000000 0.000000000000
result:
ok 2 numbers
Test #55:
score: 0
Accepted
time: 2ms
memory: 11624kb
input:
1 999999999 1 1000000000
output:
0.500000000000 0.500000000000
result:
ok 2 numbers
Test #56:
score: 0
Accepted
time: 0ms
memory: 11852kb
input:
1 1000000000 1 999999999
output:
0.500000000000 0.500000000000
result:
ok 2 numbers
Test #57:
score: 0
Accepted
time: 0ms
memory: 11724kb
input:
1 1 2 1 2
output:
0.666666666667 0.250000000000
result:
ok 2 numbers
Test #58:
score: 0
Accepted
time: 2ms
memory: 11692kb
input:
1 1 2 1 1000000000
output:
0.666666666667 0.250000000000
result:
ok 2 numbers
Test #59:
score: 0
Accepted
time: 0ms
memory: 11628kb
input:
2 1 1 2 2 1
output:
0.666666666667 0.250000000000
result:
ok 2 numbers
Test #60:
score: 0
Accepted
time: 2ms
memory: 11896kb
input:
9 1 1 1 1 1 1 1 1 1 2 2 1
output:
0.666666666667 0.250000000000
result:
ok 2 numbers
Test #61:
score: 0
Accepted
time: 2ms
memory: 11916kb
input:
1 1000000000 2 1000000000 1
output:
0.625000000000 0.333333333333
result:
ok 2 numbers
Test #62:
score: 0
Accepted
time: 0ms
memory: 12332kb
input:
2 1000000000 999999999 1 1000000000
output:
0.500000000000 0.500000000000
result:
ok 2 numbers
Test #63:
score: 0
Accepted
time: 0ms
memory: 11632kb
input:
2 1000000000 999999999 1 999999999
output:
0.500000000000 0.500000000000
result:
ok 2 numbers
Test #64:
score: 0
Accepted
time: 2ms
memory: 11588kb
input:
1 500000000 3 1000000000 1 1
output:
0.500000000000 0.500000000000
result:
ok 2 numbers
Test #65:
score: 0
Accepted
time: 2ms
memory: 11692kb
input:
3 1 1 1 4 1 2 1 1
output:
0.600000000000 0.375000000000
result:
ok 2 numbers
Test #66:
score: 0
Accepted
time: 0ms
memory: 11624kb
input:
3 1 1 1 4 1 2 1 2
output:
0.666666666667 0.250000000000
result:
ok 2 numbers
Test #67:
score: 0
Accepted
time: 2ms
memory: 11712kb
input:
3 1 1 1 4 2 2 1 2
output:
0.714285714286 0.125000000000
result:
ok 2 numbers
Test #68:
score: 0
Accepted
time: 2ms
memory: 11624kb
input:
3 1 2 1 4 1 2 1 1
output:
0.531250000000 0.466666666667
result:
ok 2 numbers
Test #69:
score: 0
Accepted
time: 0ms
memory: 11936kb
input:
3 1 2 1 4 1 2 1 2
output:
0.555555555556 0.437500000000
result:
ok 2 numbers
Test #70:
score: 0
Accepted
time: 0ms
memory: 11620kb
input:
3 1 2 1 4 2 2 1 2
output:
0.619047619048 0.343750000000
result:
ok 2 numbers
Test #71:
score: 0
Accepted
time: 2ms
memory: 11708kb
input:
3 2 2 1 4 1 2 1 1
output:
0.625000000000 0.333333333333
result:
ok 2 numbers
Test #72:
score: 0
Accepted
time: 2ms
memory: 11692kb
input:
3 2 2 1 4 1 2 1 2
output:
0.550000000000 0.444444444444
result:
ok 2 numbers
Test #73:
score: 0
Accepted
time: 2ms
memory: 11916kb
input:
3 2 2 1 4 2 2 1 2
output:
0.523809523810 0.475000000000
result:
ok 2 numbers
Test #74:
score: 0
Accepted
time: 0ms
memory: 12048kb
input:
3 2 2 2 4 1 2 1 1
output:
0.687500000000 0.200000000000
result:
ok 2 numbers
Test #75:
score: 0
Accepted
time: 0ms
memory: 12080kb
input:
3 2 2 2 4 1 2 1 2
output:
0.625000000000 0.333333333333
result:
ok 2 numbers
Test #76:
score: 0
Accepted
time: 2ms
memory: 11884kb
input:
3 2 2 2 4 2 2 1 2
output:
0.562500000000 0.428571428571
result:
ok 2 numbers
Extra Test:
score: 0
Extra Test Passed