QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#149553#5713. Eggscavationlmeowdn25 ✓433ms91244kbC++143.6kb2023-08-24 20:50:152023-08-24 20:50:16

Judging History

你现在查看的是最新测评结果

  • [2023-08-24 20:50:16]
  • 评测
  • 测评结果:25
  • 用时:433ms
  • 内存:91244kb
  • [2023-08-24 20:50:15]
  • 提交

answer

#include<bits/stdc++.h>
#define fi first
#define se second
#define eb emplace_back
#define mp make_pair
using namespace std;
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
template<typename T,typename U> T ceil(T x, U y) {return (x>0?(x+y-1)/y:x/y);}
template<typename T,typename U> T floor(T x, U y) {return (x>0?x/y:(x-y+1)/y);}
template<class T,class S> bool chmax(T &a,const S b) {return (a<b?a=b,1:0);}
template<class T,class S> bool chmin(T &a,const S b) {return (a>b?a=b,1:0);}
int popcnt(int x) {return __builtin_popcount(x);}
int popcnt(ll x)  {return __builtin_popcountll(x);}
int topbit(int x) {return (x==0?-1:31-__builtin_clz(x));}
int topbit(ll x)  {return (x==0?-1:63-__builtin_clzll(x));}
int lowbit(int x) {return (x==0?-1:__builtin_ctz(x));}
int lowbit(ll x)  {return (x==0?-1:__builtin_ctzll(x));}
 
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
typedef pair<int,int> pii; 
typedef vector<int> vi;
typedef vector<pii> vp;
int read() {
  int x=0,w=1; char c=getchar(); 
  while(!isdigit(c)) {if(c=='-') w=-1; c=getchar();}
  while(isdigit(c)) {x=x*10+(c-'0'); c=getchar();}
  return x*w;
}

const int N=2505,M=1e5+5,inf=0x3f3f3f3f;
int T,n,m,k,f[N][N],t[N][N],s[M],v[M];
vp ve[M];
vi vd[M];

void add(int l,int r,int u,int d,int w) {
  f[l][u]+=w, f[r+1][d+1]+=w;
  f[l][d+1]-=w, f[r+1][u]-=w;
}
int lb(int x) {return x&-x;}
void sadd(int x) {for(;x;x-=lb(x)) s[x]++;}
void sdel(int x) {for(;x;x-=lb(x)) s[x]--;}
int qry(int x,int y=0) {for(;x<=m;x+=lb(x)) y+=s[x]; return y;}

namespace SegT {
  int ls[N<<1],rs[N<<1],s[N<<1],tot=1;
  multiset<int> f[N<<1];
  void mdf(int p,int l,int r,int x,int y) {
    if(l==r) {
      if(y>0) f[p].insert(y);
      else f[p].erase(f[p].find(-y));
      s[p]=(f[p].size()?(*f[p].begin()):inf);
      return;
    } int mid=l+r>>1;
    if(x<=mid) mdf(ls[p],l,mid,x,y);
    else if(x>mid) mdf(rs[p],mid+1,r,x,y);
    s[p]=min(s[ls[p]],s[rs[p]]);
  }
  int qry(int p,int l,int r,int x,int y) {
    if(l==x&&r==y) return s[p]; int mid=l+r>>1;
    if(y<=mid) return qry(ls[p],l,mid,x,y);
    else if(x>mid) return qry(rs[p],mid+1,r,x,y);
    else return min(qry(ls[p],l,mid,x,mid),qry(rs[p],mid+1,r,mid+1,y));
  }
  void init(int p,int l,int r) {
    s[p]=inf; if(l==r) return; int mid=l+r>>1;
    init(ls[p]=++tot,l,mid), init(rs[p]=++tot,mid+1,r);
  }
}

signed main() {
  n=read(), k=read(), m=read();
  rep(i,1,m) {
    int K=read(); vp p;
    rep(i,1,K) {
      int x=read(), y=read();
      p.eb(pii(x,y));
    }
    rep(s,1,(1<<K)-1) {
      int l=1,r=N,u=1,d=N,w=popcnt(s)&1?1:-1;
      rep(i,0,K-1) if(s&(1<<i)) {
        chmin(r,p[i].fi), chmax(l,p[i].fi-k+1);
        chmin(d,p[i].se), chmax(u,p[i].se-k+1);
      }
      if(l<=r&&u<=d) add(l,r,u,d,w);
    }
  }
  rep(i,1,n) rep(j,1,n) f[i][j]+=f[i-1][j];
  rep(i,1,n) rep(j,1,n) f[i][j]+=f[i][j-1];
  T=read();
  rep(i,1,T) {
    int opt=read();
    if(opt==1) {
      int x=read(), y=read();
      ve[max(1,x-k+1)].eb(y,i);
      ve[x+1].eb(y,-i);
    } else v[i]=read();
  }
  SegT::init(1,1,n);
  rep(i,1,n-k+1) {
    for(auto [x,y]:ve[i]) SegT::mdf(1,1,n,x,y);
    rep(j,1,n-k+1) t[i][j]=SegT::qry(1,1,n,j,j+k-1);
  }
  rep(i,1,n-k+1) rep(j,1,n-k+1) {
    if(f[i][j]) {
      if(t[i][j]>T) t[i][j]=T+1;
      vd[t[i][j]].eb(f[i][j]);
      sadd(f[i][j]);
    }
  }
  rep(i,1,T) {
    for(int x:vd[i]) sdel(x);
    if(v[i]) {
      int tot=(n-k+1)*(n-k+1);
      int cnt=qry(v[i]);
      printf("%.5lf\n",1.*cnt/tot);
    }
  }
  return 0;
}

詳細信息

Subtask #1:

score: 3.75
Accepted

Test #1:

score: 3.75
Accepted
time: 3ms
memory: 11868kb

input:

40 5
200
4 25 33 8 25 39 17 7 5
2 25 11 25 17
3 1 21 1 1 25 40
1 1 1
4 25 11 25 18 35 25 16 1
3 6 9 39 1 1 33
1 1 27
1 37 21
3 1 31 25 1 40 13
3 11 33 31 1 21 39
4 36 16 31 17 16 5 31 22
2 3 9 36 19
1 39 25
2 7 11 17 23
2 25 11 3 15
1 29 12
1 37 21
2 1 26 7 36
3 27 5 1 26 35 33
1 37 36
3 15 31 4 1 3...

output:

0.90509
0.88272
0.82330
0.70756
0.58025
0.42978
0.29784
0.20602
0.14043
0.08102
0.04707
0.02315
0.01235
0.00617
0.00540
0.00386
0.00154
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00...

result:

ok 202 numbers

Test #2:

score: 0
Accepted
time: 4ms
memory: 13828kb

input:

40 4
500
1 1 17
3 5 34 21 25 6 39
4 39 31 15 1 3 11 21 21
1 37 21
3 16 2 33 29 36 19
3 12 25 1 5 32 1
3 15 16 31 5 21 11
2 11 19 13 17
1 3 13
1 2 21
1 1 13
1 30 36
1 21 1
1 25 23
3 19 25 37 23 25 9
1 14 1
4 13 33 3 23 2 13 11 6
1 21 3
1 9 25
2 29 11 31 23
1 16 33
1 1 19
4 1 11 17 39 36 37 16 1
1 1 2...

output:

0.90869
0.90358
0.89043
0.85756
0.81300
0.73192
0.63988
0.53470
0.44193
0.32725
0.24982
0.18188
0.12856
0.09131
0.06574
0.05040
0.03798
0.02264
0.01607
0.01096
0.00657
0.00511
0.00438
0.00438
0.00219
0.00073
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00...

result:

ok 502 numbers

Test #3:

score: 0
Accepted
time: 1ms
memory: 12320kb

input:

20 3
300
3 9 6 6 19 13 5
2 2 5 1 1
3 9 9 15 3 20 16
1 4 19
3 16 5 9 13 11 16
1 9 7
4 1 7 4 3 1 17 20 1
1 13 1
1 1 7
1 11 6
2 13 17 6 2
2 20 17 6 1
1 18 6
3 2 7 11 12 3 13
2 11 14 18 7
3 6 7 1 1 3 1
1 17 5
1 1 14
2 6 1 11 5
1 17 14
1 9 13
3 13 19 15 2 1 9
2 12 11 1 11
2 7 5 17 19
1 17 18
3 13 20 2 2 ...

output:

0.94136
0.94136
0.93519
0.91358
0.87654
0.83951
0.78395
0.71914
0.63272
0.55247
0.45988
0.40741
0.34877
0.30247
0.23457
0.19136
0.14506
0.11111
0.08025
0.05556
0.03395
0.03086
0.02469
0.01543
0.00617
0.00617
0.00309
0.00309
0.00309
0.00309
0.00309
0.00309
0.00309
0.00000
0.00000
0.00000
0.00000
0.00...

result:

ok 302 numbers

Test #4:

score: 0
Accepted
time: 18ms
memory: 13000kb

input:

40 1
100000
2 15 39 9 23
3 23 38 33 30 35 1
2 9 1 13 11
4 9 29 39 33 25 29 39 11
3 10 25 17 3 4 5
3 1 17 10 3 13 24
3 27 1 19 21 34 15
3 11 26 23 1 19 25
1 5 1
1 24 17
1 39 5
3 1 39 15 40 7 19
1 15 21
2 14 4 12 33
1 33 31
1 21 25
3 25 5 31 19 1 28
4 37 23 3 25 39 11 26 33
2 37 22 4 18
3 39 31 2 23 3...

output:

0.99375
0.99375
0.99375
0.99375
0.99375
0.99375
0.99375
0.99375
0.99375
0.99313
0.99062
0.98875
0.98500
0.97875
0.97625
0.96625
0.95688
0.94188
0.92688
0.91125
0.89500
0.88125
0.86750
0.86187
0.85125
0.84625
0.84000
0.83437
0.83188
0.82812
0.82563
0.82000
0.81625
0.81250
0.80437
0.79563
0.78312
0.77...

result:

ok 9990 numbers

Test #5:

score: 0
Accepted
time: 16ms
memory: 11872kb

input:

40 39
100000
1 33 16
1 1 11
2 21 17 19 35
3 25 30 38 34 4 24
3 6 1 9 35 14 25
3 1 9 11 29 25 38
1 21 29
1 35 26
2 7 25 25 36
1 16 14
3 21 19 7 29 1 9
3 11 31 29 29 17 31
4 6 19 21 1 11 37 1 29
4 7 21 25 33 38 33 13 20
3 25 7 1 9 22 33
1 21 1
4 11 31 4 22 1 13 5 25
3 26 36 8 5 28 40
1 17 37
2 31 1 4 ...

output:

1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00...

result:

ok 10000 numbers

Subtask #2:

score: 6.25
Accepted

Test #6:

score: 6.25
Accepted
time: 40ms
memory: 25600kb

input:

999 300
10000
1 667 804
3 769 412 909 315 471 651
1 869 932
4 404 590 541 271 36 897 244 108
1 963 94
1 269 811
1 595 213
1 25 284
3 439 438 295 715 279 962
1 216 784
1 568 255
3 2 597 406 118 298 177
1 936 559
1 976 187
2 989 163 306 923
3 391 211 513 163 968 193
2 22 670 524 543
1 65 371
3 7 619 8...

output:

0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33617
0.33...

result:

ok 9990 numbers

Test #7:

score: 0
Accepted
time: 433ms
memory: 91244kb

input:

2500 50
100000
1 1525 336
1 1493 1542
3 1097 468 337 2479 1525 2037
3 405 361 2293 1705 1482 1336
1 228 1541
1 1491 741
1 2218 2429
3 241 893 1979 1436 753 1011
4 980 1191 393 1401 1116 470 742 301
3 532 539 434 481 101 278
2 1724 2021 977 2186
1 1695 2385
1 2241 1549
1 2358 83
4 457 1001 531 795 17...

output:

0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96012
0.96...

result:

ok 9900 numbers

Test #8:

score: 0
Accepted
time: 197ms
memory: 54796kb

input:

2500 1200
100000
1 651 585
4 1185 627 1696 1895 1851 930 478 531
3 401 585 1037 1451 2256 2
4 223 2201 751 1817 2219 960 2237 926
4 413 1715 696 2091 251 726 1077 189
3 693 1223 1618 419 985 2116
3 291 1 2219 2461 1993 1742
1 321 209
4 988 1051 637 2257 1853 1171 569 362
3 1938 2164 1538 2250 1451 2...

output:

0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44539
0.44...

result:

ok 9998 numbers

Test #9:

score: 0
Accepted
time: 25ms
memory: 35980kb

input:

2500 2500
100000
1 291 1635
1 1676 876
2 837 2076 2313 2317
4 1021 416 575 1773 1077 891 349 1141
2 745 1365 2349 1695
1 1321 281
1 259 1681
2 1341 329 931 105
1 1092 1909
3 146 1463 1781 1641 2103 469
1 1306 201
1 257 2255
3 2451 1473 751 2001 2227 645
3 2016 2489 101 1313 2325 1389
4 631 331 145 1...

output:

1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00...

result:

ok 10000 numbers

Test #10:

score: 0
Accepted
time: 384ms
memory: 67872kb

input:

2499 600
98765
3 1996 16 1592 999 292 1585
1 9 2307
1 1926 1136
1 1852 2389
1 393 2441
4 1264 2078 1163 1783 795 929 2413 971
1 1870 934
1 1723 1093
1 887 357
1 1225 676
1 2341 1303
1 1118 685
4 1392 558 337 331 1324 495 2066 2248
3 1968 273 337 1204 811 1594
3 829 1786 2241 95 1501 1429
1 1356 2389...

output:

0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28661
0.28...

result:

ok 9980 numbers

Test #11:

score: 0
Accepted
time: 233ms
memory: 57672kb

input:

2500 1105
100000
1 751 1336
2 1077 2296 1305 1997
1 161 2337
3 75 720 1197 1725 2311 1609
1 2149 1221
3 105 1711 1961 1727 1181 2055
1 1913 871
2 1164 924 783 486
3 215 1722 1621 1807 1638 1176
4 801 1989 483 1149 561 878 261 2245
4 839 2247 526 2413 573 2431 1218 775
3 2201 909 1002 197 778 2451
1 ...

output:

0.06841
0.06837
0.06834
0.06829
0.06826
0.06822
0.06819
0.06815
0.06811
0.06807
0.06803
0.06799
0.06794
0.06790
0.06786
0.06782
0.06777
0.06772
0.06768
0.06764
0.06759
0.06755
0.06751
0.06746
0.06742
0.06738
0.06733
0.06728
0.06724
0.06719
0.06714
0.06710
0.06706
0.06701
0.06697
0.06693
0.06689
0.06...

result:

ok 99 numbers

Test #12:

score: 0
Accepted
time: 283ms
memory: 59272kb

input:

2500 1007
100000
3 751 1336 2296 1962 1997 1077
3 2337 1229 1063 161 75 720
3 1609 1197 901 2311 2149 1221
3 105 1711 1961 1727 1181 2055
3 1913 871 924 514 486 1164
3 1722 1431 1807 215 1176 1621
4 1989 1560 1149 801 878 483 2245 561
3 2247 856 2413 839 2431 526
3 1218 775 909 2195 197 2201
4 778 2...

output:

0.00516
0.00508
0.00499
0.00491
0.00482
0.00473
0.00465
0.00457
0.00449
0.00440
0.00433
0.00426
0.00419
0.00412
0.00406
0.00398
0.00391
0.00384
0.00377
0.00370
0.00364
0.00358
0.00352
0.00345
0.00340
0.00335
0.00330
0.00324
0.00317
0.00313
0.00307
0.00302
0.00297
0.00291
0.00286
0.00281
0.00276
0.00...

result:

ok 59 numbers

Subtask #3:

score: 15
Accepted

Test #13:

score: 15
Accepted
time: 187ms
memory: 58060kb

input:

2500 1111
4000
1 751 1336
2 1077 2296 1305 1997
1 161 2337
3 75 720 1197 1725 2311 1609
1 2149 1221
3 105 1711 1961 1727 1181 2055
1 1913 871
2 1164 924 783 486
3 215 1722 1621 1807 1638 1176
4 801 1989 483 1149 561 878 261 2245
4 839 2247 526 2413 573 2431 1218 775
3 2201 909 1002 197 778 2451
1 40...

output:

0.38532
0.38490
0.33532
0.30625
0.38076
0.37907
0.37672
0.37211
0.37080
0.37608
0.37486
0.37425
0.37332
0.35911
0.37178
0.36466
0.35788
0.37055
0.37055
0.36997
0.36587
0.27618
0.36749
0.35913
0.32173
0.28209
0.36315
0.36341
0.36501
0.17947
0.28929
0.36500
0.34149
0.36500
0.33245
0.36500
0.36500
0.33...

result:

ok 660 numbers

Test #14:

score: 0
Accepted
time: 189ms
memory: 54208kb

input:

2500 1180
5500
1 1531 472
4 1005 869 1961 351 2377 1181 1199 1485
2 859 587 1789 45
3 914 789 1821 2060 251 896
1 613 1031
1 1001 1515
1 785 2265
2 1706 2121 1625 842
4 717 1421 1313 1411 1471 2026 441 2427
1 2274 136
1 1905 681
4 1985 1374 585 73 2001 941 669 1597
3 1956 893 771 1401 817 966
1 248 ...

output:

0.27624
0.22630
0.27315
0.27480
0.27479
0.25115
0.27407
0.27120
0.25365
0.19365
0.25915
0.26843
0.26545
0.26753
0.26699
0.25390
0.26627
0.24307
0.26483
0.26341
0.24832
0.26084
0.23420
0.26122
0.26036
0.26122
0.26009
0.25977
0.25927
0.19899
0.25909
0.25896
0.25842
0.24479
0.25837
0.25833
0.23284
0.25...

result:

ok 630 numbers

Test #15:

score: 0
Accepted
time: 310ms
memory: 63816kb

input:

2500 900
100000
2 1475 1106 326 2167
1 1157 1154
3 350 1063 1675 1926 40 1157
1 1557 713
2 1737 409 1525 1935
3 1891 1621 2477 1799 791 41
3 575 1201 1979 2069 931 1531
1 1451 416
3 161 344 1057 1935 969 1725
1 1991 1123
2 1701 825 408 1753
3 537 966 2461 1221 1601 703
1 1706 1132
1 403 1016
1 2265 ...

output:

0.58575
0.27773
0.29519
0.40304
0.03312
1.00000
1.00000
0.00443
0.39951
0.05185
1.00000
0.97310
0.04134
1.00000
0.95814
0.17103
0.02154
1.00000
0.87777
1.00000
1.00000
0.99228
0.47131
0.99489
0.62868
0.63522
1.00000
1.00000
0.76560
0.10078
0.99948
0.43595
0.60239
1.00000
0.93498
0.98996
1.00000
0.23...

result:

ok 9850 numbers

Test #16:

score: 0
Accepted
time: 412ms
memory: 75256kb

input:

2500 511
100000
3 461 2321 373 1079 2242 409
2 209 1426 333 1981
3 121 733 791 1597 1696 833
4 2301 191 2109 1925 953 79 939 543
1 297 983
1 58 677
1 1925 153
2 2121 2087 1381 1581
2 2196 1745 1257 1201
1 916 2356
1 1769 1489
3 321 1387 1731 243 1137 394
3 1681 313 195 1733 1034 701
2 1217 661 153 1...

output:

0.80920
1.00000
0.05177
1.00000
0.93406
0.34881
0.93406
0.37486
0.89730
0.05425
0.90057
0.46165
0.85676
0.85676
0.11078
0.85676
0.85676
0.85676
0.85676
0.85347
0.85347
0.83303
0.85347
0.85347
0.53962
0.85347
0.85347
0.85347
0.47316
0.85347
0.85347
0.04108
0.85346
0.20290
0.85313
0.85347
0.85347
0.77...

result:

ok 9393 numbers

Test #17:

score: 0
Accepted
time: 320ms
memory: 65012kb

input:

2500 800
100000
1 1374 381
1 489 659
1 1801 325
4 1415 2358 653 1993 113 2217 1391 1241
1 1551 2238
3 353 1547 1433 2444 2341 961
2 773 1425 617 549
1 1957 1101
3 677 468 1801 1302 2197 311
4 1561 582 2091 1241 321 1525 1537 781
1 413 705
2 403 1115 1229 1034
1 235 1178
1 376 955
4 2180 2172 2211 33...

output:

1.00000
0.27870
1.00000
0.77881
0.55179
0.51179
0.71088
0.43668
0.73731
0.67179
0.35624
0.30385
0.67179
0.64869
0.67179
0.67179
0.67142
0.63981
0.09056
0.64022
0.64022
0.59060
0.37889
0.56294
0.63325
0.63984
0.61675
0.63984
0.15778
0.61073
0.46778
0.63665
0.63665
0.27894
0.63502
0.07170
0.63502
0.63...

result:

ok 8758 numbers

Test #18:

score: 0
Accepted
time: 264ms
memory: 60800kb

input:

2500 1001
100000
3 2381 2146 1709 1753 909 543
1 1644 2219
1 1076 2466
2 1401 1761 1 1596
3 1689 388 1763 69 1782 2023
1 2045 2293
1 1568 822
1 1927 625
3 2221 1421 781 437 2341 501
4 1368 781 369 1365 1417 901 781 197
1 291 2391
3 1974 2456 1876 837 1 1689
1 1052 2417
1 1121 211
3 861 995 1037 1101...

output:

0.30659
0.26751
0.24901
0.28803
0.23760
0.27268
0.28691
0.21782
0.22406
0.24412
0.28878
0.20668
0.24918
0.21333
0.23709
0.19509
0.19060
0.22477
0.12689
0.14653
0.14443
0.10234
0.19862
0.20386
0.19637
0.08421
0.18803
0.11899
0.12954
0.09035
0.17430
0.09033
0.17300
0.12948
0.14087
0.12947
0.07452
0.11...

result:

ok 689 numbers

Test #19:

score: 0
Accepted
time: 258ms
memory: 57496kb

input:

2499 1003
100000
2 2245 118 747 820
1 781 235
2 64 1015 91 1471
4 662 133 2308 474 2344 2083 1636 1270
3 469 1536 937 1735 1429 1126
1 1975 1337
2 1069 1355 1973 1228
1 370 1324
4 820 1174 1639 847 134 817 712 782
4 1076 993 211 1840 498 484 1294 722
1 1262 847
3 1672 1727 2062 2388 264 1054
2 2339 ...

output:

0.54080
0.39756
0.51086
0.52289
0.19274
0.01185
0.06099
0.50677
0.41708
0.00234
0.49470
0.00068
0.08874
0.25315
0.48394
0.47948
0.08182
0.47814
0.47814
0.00327
0.46963
0.46256
0.37755
0.45934
0.41721
0.42706
0.00047
0.41593
0.41447
0.01556
0.17548
0.05439
0.38191
0.28761
0.08181
0.26828
0.34766
0.08...

result:

ok 697 numbers

Test #20:

score: 0
Accepted
time: 56ms
memory: 37812kb

input:

2500 2000
100000
1 751 1336
2 1077 2296 1305 1997
1 161 2337
3 75 720 1197 1725 2311 1609
1 2149 1221
3 105 1711 1961 1727 1181 2055
1 1913 871
2 1164 924 783 486
3 215 1722 1621 1807 1638 1176
4 801 1989 483 1149 561 878 261 2245
4 839 2247 526 2413 573 2431 1218 775
3 2201 909 1002 197 778 2451
1 ...

output:

0.82352
0.81903
0.81445
0.80978
0.80516
0.80032
0.79583
0.79124
0.78620
0.78100
0.77608
0.77093
0.76607
0.76136
0.75646
0.75154
0.74667
0.74187
0.73704
0.82271
0.81821
0.81363
0.80896
0.80434
0.79950
0.79502
0.79043
0.81361
0.80934
0.80491
0.80047
0.79603
0.81361
0.80934
0.80491
0.80047
0.79603
0.79...

result:

ok 9698 numbers