QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#149475 | #5712. Timpanist | lmeowdn | 25 ✓ | 13ms | 5164kb | C++14 | 2.0kb | 2023-08-24 17:49:27 | 2023-08-24 17:49:28 |
Judging History
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=505;
const double inf=2e9;
int e[N][N],n,m,p[N],t[N],tot;
vi a[N];
double f[N][N],ans;
void dfs(int x,vi y,int pos) {
if(pos==m) {a[++tot]=y; return;}
rep(i,x+1,12) {
vi s=y; s.eb(i);
dfs(i,s,pos+1);
}
}
signed main() {
n=read(), m=read();
rep(i,1,n) t[i]=read(), p[i]=read();
vi y; dfs(0,y,0);
rep(i,1,tot) rep(j,1,tot) {
rep(k,0,m-1) e[i][j]+=(a[i][k]!=a[j][k]);
}
rep(i,1,tot) f[0][i]=inf;
rep(i,1,n) {
rep(j,1,tot) {
f[i][j]=0;
bool flag=0; double d=t[i]-t[i-1];
rep(k,0,m-1) flag|=(a[j][k]==p[i]);
if(flag) {
rep(k,1,tot) chmax(f[i][j],min(f[i-1][k],d/e[j][k]));
}
if(i==n) chmax(ans,f[i][j]);
}
}
if(ans==inf) puts("0.00");
else printf("%.2lf\n",ans);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 15
Accepted
Test #1:
score: 15
Accepted
time: 1ms
memory: 3772kb
input:
24 1 2 1 6 1 10 2 13 2 16 3 20 3 24 4 28 4 31 5 34 5 39 6 43 6 49 7 52 7 56 6 60 6 63 5 66 5 70 4 72 4 75 3 78 3 81 2 84 2
output:
3.00
result:
ok single line: '3.00'
Test #2:
score: 0
Accepted
time: 1ms
memory: 4004kb
input:
24 2 2 1 6 1 10 2 13 2 16 3 20 3 24 4 28 4 31 5 34 5 39 6 43 6 49 7 52 7 56 6 60 6 63 5 66 5 70 4 72 4 75 3 78 3 81 2 84 2
output:
3.00
result:
ok single line: '3.00'
Test #3:
score: 0
Accepted
time: 0ms
memory: 4324kb
input:
24 3 2 1 6 1 10 2 13 2 16 3 20 3 24 4 28 4 31 5 34 5 39 6 43 6 49 7 52 7 56 6 60 6 63 5 66 5 70 4 72 4 75 3 78 3 81 2 84 2
output:
3.00
result:
ok single line: '3.00'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3992kb
input:
48 1 2081 1 4163 1 6245 1 8327 1 10408 2 12491 2 14573 2 16656 2 18739 3 20822 3 22904 3 24988 3 27072 4 29155 4 31239 4 33321 4 35404 5 37487 5 39568 5 41651 5 43733 6 45816 6 47900 6 49983 6 52065 7 54147 7 56228 7 58310 7 60390 8 62472 8 64555 8 66637 8 68720 9 70802 9 72884 9 74967 9 77050 10 79...
output:
2080.00
result:
ok single line: '2080.00'
Test #5:
score: 0
Accepted
time: 0ms
memory: 4052kb
input:
48 2 2081 1 4163 1 6245 1 8327 1 10408 2 12491 2 14573 2 16656 2 18739 3 20822 3 22904 3 24988 3 27072 4 29155 4 31239 4 33321 4 35404 5 37487 5 39568 5 41651 5 43733 6 45816 6 47900 6 49983 6 52065 7 54147 7 56228 7 58310 7 60390 8 62472 8 64555 8 66637 8 68720 9 70802 9 72884 9 74967 9 77050 10 79...
output:
2081.00
result:
ok single line: '2081.00'
Test #6:
score: 0
Accepted
time: 2ms
memory: 4416kb
input:
48 3 2081 1 4163 1 6245 1 8327 1 10408 2 12491 2 14573 2 16656 2 18739 3 20822 3 22904 3 24988 3 27072 4 29155 4 31239 4 33321 4 35404 5 37487 5 39568 5 41651 5 43733 6 45816 6 47900 6 49983 6 52065 7 54147 7 56228 7 58310 7 60390 8 62472 8 64555 8 66637 8 68720 9 70802 9 72884 9 74967 9 77050 10 79...
output:
2082.00
result:
ok single line: '2082.00'
Test #7:
score: 0
Accepted
time: 1ms
memory: 3952kb
input:
20 1 100 4 101 5 102 8 103 9 200 4 201 5 202 9 300 4 301 5 302 6 400 1 401 5 402 6 500 1 501 2 502 6 600 1 601 2 602 3 603 6
output:
1.00
result:
ok single line: '1.00'
Test #8:
score: 0
Accepted
time: 2ms
memory: 3960kb
input:
20 2 100 4 101 5 102 8 103 9 200 4 201 5 202 9 300 4 301 5 302 6 400 1 401 5 402 6 500 1 501 2 502 6 600 1 601 2 602 3 603 6
output:
1.00
result:
ok single line: '1.00'
Test #9:
score: 0
Accepted
time: 2ms
memory: 4284kb
input:
20 3 100 4 101 5 102 8 103 9 200 4 201 5 202 9 300 4 301 5 302 6 400 1 401 5 402 6 500 1 501 2 502 6 600 1 601 2 602 3 603 6
output:
1.00
result:
ok single line: '1.00'
Test #10:
score: 0
Accepted
time: 1ms
memory: 3948kb
input:
48 1 2081 12 4163 12 6245 12 8327 12 10410 11 12492 11 14574 11 16655 11 18739 10 20821 10 22904 10 24988 10 27069 9 29152 9 31234 9 33318 9 35402 8 37483 8 39565 8 41647 8 43730 7 45812 7 47896 7 49980 7 52062 6 54145 6 56230 6 58313 6 60395 5 62476 5 64559 5 66641 5 68722 4 70805 4 72886 4 74968 4...
output:
2081.00
result:
ok single line: '2081.00'
Test #11:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
48 2 2081 12 4163 12 6245 12 8327 12 10410 11 12492 11 14574 11 16655 11 18739 10 20821 10 22904 10 24988 10 27069 9 29152 9 31234 9 33318 9 35402 8 37483 8 39565 8 41647 8 43730 7 45812 7 47896 7 49980 7 52062 6 54145 6 56230 6 58313 6 60395 5 62476 5 64559 5 66641 5 68722 4 70805 4 72886 4 74968 4...
output:
2081.00
result:
ok single line: '2081.00'
Test #12:
score: 0
Accepted
time: 2ms
memory: 4388kb
input:
48 3 2081 12 4163 12 6245 12 8327 12 10410 11 12492 11 14574 11 16655 11 18739 10 20821 10 22904 10 24988 10 27069 9 29152 9 31234 9 33318 9 35402 8 37483 8 39565 8 41647 8 43730 7 45812 7 47896 7 49980 7 52062 6 54145 6 56230 6 58313 6 60395 5 62476 5 64559 5 66641 5 68722 4 70805 4 72886 4 74968 4...
output:
2082.00
result:
ok single line: '2082.00'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3928kb
input:
4 2 1 1 2 2 21 4 22 5
output:
9.50
result:
ok single line: '9.50'
Test #14:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
6 3 1 1 2 2 3 3 20 4 21 5 22 6
output:
5.67
result:
ok single line: '5.67'
Test #15:
score: 0
Accepted
time: 1ms
memory: 3988kb
input:
45 1 1 1 2 3 3 1 4 3 5 3 6 2 7 3 8 1 9 3 10 1 11 3 12 1 13 1 14 1 15 2 16 2 17 2 18 2 19 1 20 2 21 2 22 3 23 3 24 2 25 1 26 2 27 2 28 2 29 1 30 3 31 2 32 1 33 1 333 7 334 8 335 9 336 8 337 9 338 8 339 8 340 8 341 7 342 9 343 7 344 9
output:
1.00
result:
ok single line: '1.00'
Test #16:
score: 0
Accepted
time: 1ms
memory: 3956kb
input:
45 2 1 1 2 3 3 1 4 3 5 3 6 2 7 3 8 1 9 3 10 1 11 3 12 1 13 1 14 1 15 2 16 2 17 2 18 2 19 1 20 2 21 2 22 3 23 3 24 2 25 1 26 2 27 2 28 2 29 1 30 3 31 2 32 1 33 1 333 7 334 8 335 9 336 8 337 9 338 8 339 8 340 8 341 7 342 9 343 7 344 9
output:
1.00
result:
ok single line: '1.00'
Test #17:
score: 0
Accepted
time: 1ms
memory: 4396kb
input:
45 3 1 1 2 3 3 1 4 3 5 3 6 2 7 3 8 1 9 3 10 1 11 3 12 1 13 1 14 1 15 2 16 2 17 2 18 2 19 1 20 2 21 2 22 3 23 3 24 2 25 1 26 2 27 2 28 2 29 1 30 3 31 2 32 1 33 1 333 7 334 8 335 9 336 8 337 9 338 8 339 8 340 8 341 7 342 9 343 7 344 9
output:
100.00
result:
ok single line: '100.00'
Test #18:
score: 0
Accepted
time: 1ms
memory: 3600kb
input:
20 1 42 7 88 7 138 7 194 7 241 7 300 7 354 7 412 7 462 7 516 7 556 7 600 7 648 7 703 7 763 7 813 7 862 7 908 7 962 7 1007 7
output:
0.00
result:
ok single line: '0.00'
Test #19:
score: 0
Accepted
time: 1ms
memory: 3896kb
input:
7 1 100 1 120 3 130 5 140 6 150 8 165 10 170 12
output:
5.00
result:
ok single line: '5.00'
Test #20:
score: 0
Accepted
time: 1ms
memory: 3992kb
input:
48 1 20 6 39 12 62 10 85 5 104 2 124 3 143 2 159 4 179 4 198 7 218 5 237 5 259 7 282 8 301 10 322 9 345 4 363 2 381 10 402 12 422 12 444 3 464 4 484 5 503 6 522 8 541 9 555 12 572 5 595 8 617 4 636 9 656 1 676 4 694 3 713 8 733 9 752 6 772 4 791 9 808 4 825 1 843 4 860 10 883 12 902 11 924 7 942 10
output:
14.00
result:
ok single line: '14.00'
Test #21:
score: 0
Accepted
time: 1ms
memory: 4168kb
input:
48 2 20 6 39 12 62 10 85 5 104 2 124 3 143 2 159 4 179 4 198 7 218 5 237 5 259 7 282 8 301 10 322 9 345 4 363 2 381 10 402 12 422 12 444 3 464 4 484 5 503 6 522 8 541 9 555 12 572 5 595 8 617 4 636 9 656 1 676 4 694 3 713 8 733 9 752 6 772 4 791 9 808 4 825 1 843 4 860 10 883 12 902 11 924 7 942 10
output:
17.00
result:
ok single line: '17.00'
Test #22:
score: 0
Accepted
time: 2ms
memory: 4364kb
input:
48 3 20 6 39 12 62 10 85 5 104 2 124 3 143 2 159 4 179 4 198 7 218 5 237 5 259 7 282 8 301 10 322 9 345 4 363 2 381 10 402 12 422 12 444 3 464 4 484 5 503 6 522 8 541 9 555 12 572 5 595 8 617 4 636 9 656 1 676 4 694 3 713 8 733 9 752 6 772 4 791 9 808 4 825 1 843 4 860 10 883 12 902 11 924 7 942 10
output:
18.00
result:
ok single line: '18.00'
Test #23:
score: 0
Accepted
time: 0ms
memory: 3864kb
input:
48 1 21 9 45 2 63 1 87 12 109 5 128 9 145 10 167 4 186 11 206 7 227 12 247 2 264 8 282 3 301 11 318 9 338 3 361 6 382 2 404 11 422 5 438 6 454 10 476 6 494 1 517 7 534 8 551 12 569 6 591 2 612 2 629 8 653 2 675 4 697 4 717 8 735 5 754 5 775 12 799 1 816 12 835 11 851 10 871 4 892 3 911 2 933 2 949 7
output:
16.00
result:
ok single line: '16.00'
Test #24:
score: 0
Accepted
time: 1ms
memory: 4084kb
input:
48 2 21 9 45 2 63 1 87 12 109 5 128 9 145 10 167 4 186 11 206 7 227 12 247 2 264 8 282 3 301 11 318 9 338 3 361 6 382 2 404 11 422 5 438 6 454 10 476 6 494 1 517 7 534 8 551 12 569 6 591 2 612 2 629 8 653 2 675 4 697 4 717 8 735 5 754 5 775 12 799 1 816 12 835 11 851 10 871 4 892 3 911 2 933 2 949 7
output:
16.00
result:
ok single line: '16.00'
Test #25:
score: 0
Accepted
time: 2ms
memory: 4392kb
input:
48 3 21 9 45 2 63 1 87 12 109 5 128 9 145 10 167 4 186 11 206 7 227 12 247 2 264 8 282 3 301 11 318 9 338 3 361 6 382 2 404 11 422 5 438 6 454 10 476 6 494 1 517 7 534 8 551 12 569 6 591 2 612 2 629 8 653 2 675 4 697 4 717 8 735 5 754 5 775 12 799 1 816 12 835 11 851 10 871 4 892 3 911 2 933 2 949 7
output:
17.00
result:
ok single line: '17.00'
Test #26:
score: 0
Accepted
time: 1ms
memory: 3948kb
input:
48 1 21 12 43 8 62 6 82 2 101 10 122 12 140 3 162 11 184 2 205 8 222 4 243 8 263 6 283 5 307 7 324 6 344 8 361 7 379 1 403 4 420 9 442 9 463 6 483 10 503 3 519 7 539 5 561 6 584 2 601 8 618 10 638 10 660 7 677 11 696 10 713 7 733 10 753 4 769 2 790 6 810 3 831 10 854 5 875 9 897 7 916 8 937 8 957 3
output:
16.00
result:
ok single line: '16.00'
Test #27:
score: 0
Accepted
time: 1ms
memory: 4068kb
input:
48 2 21 12 43 8 62 6 82 2 101 10 122 12 140 3 162 11 184 2 205 8 222 4 243 8 263 6 283 5 307 7 324 6 344 8 361 7 379 1 403 4 420 9 442 9 463 6 483 10 503 3 519 7 539 5 561 6 584 2 601 8 618 10 638 10 660 7 677 11 696 10 713 7 733 10 753 4 769 2 790 6 810 3 831 10 854 5 875 9 897 7 916 8 937 8 957 3
output:
17.00
result:
ok single line: '17.00'
Test #28:
score: 0
Accepted
time: 2ms
memory: 4404kb
input:
48 3 21 12 43 8 62 6 82 2 101 10 122 12 140 3 162 11 184 2 205 8 222 4 243 8 263 6 283 5 307 7 324 6 344 8 361 7 379 1 403 4 420 9 442 9 463 6 483 10 503 3 519 7 539 5 561 6 584 2 601 8 618 10 638 10 660 7 677 11 696 10 713 7 733 10 753 4 769 2 790 6 810 3 831 10 854 5 875 9 897 7 916 8 937 8 957 3
output:
17.00
result:
ok single line: '17.00'
Test #29:
score: 0
Accepted
time: 1ms
memory: 3824kb
input:
40 1 24999996 7 49999991 1 74999990 1 99999971 10 124999990 8 149999992 10 174999966 1 199999964 6 224999971 11 249999984 1 274999977 8 299999976 3 324999975 5 349999970 9 374999990 2 399999983 6 424999994 12 450000000 4 475000014 8 499999980 5 524999990 8 550000002 7 575000012 7 599999994 9 6250000...
output:
24999944.00
result:
ok single line: '24999944.00'
Test #30:
score: 0
Accepted
time: 1ms
memory: 4064kb
input:
40 2 24999996 7 49999991 1 74999990 1 99999971 10 124999990 8 149999992 10 174999966 1 199999964 6 224999971 11 249999984 1 274999977 8 299999976 3 324999975 5 349999970 9 374999990 2 399999983 6 424999994 12 450000000 4 475000014 8 499999980 5 524999990 8 550000002 7 575000012 7 599999994 9 6250000...
output:
24999992.00
result:
ok single line: '24999992.00'
Test #31:
score: 0
Accepted
time: 0ms
memory: 4248kb
input:
40 3 24999996 7 49999991 1 74999990 1 99999971 10 124999990 8 149999992 10 174999966 1 199999964 6 224999971 11 249999984 1 274999977 8 299999976 3 324999975 5 349999970 9 374999990 2 399999983 6 424999994 12 450000000 4 475000014 8 499999980 5 524999990 8 550000002 7 575000012 7 599999994 9 6250000...
output:
24999995.00
result:
ok single line: '24999995.00'
Test #32:
score: 0
Accepted
time: 2ms
memory: 3976kb
input:
20 3 39 2 75 2 111 3 156 3 209 1 252 2 303 2 347 2 396 1 442 1 492 3 540 3 589 3 642 3 698 2 746 2 797 2 835 3 886 2 932 3
output:
0.00
result:
ok single line: '0.00'
Test #33:
score: 0
Accepted
time: 1ms
memory: 3864kb
input:
48 1 20841 1 41671 1 62502 1 83336 1 104168 2 124998 2 145826 2 166661 2 187493 3 208326 3 229156 3 249994 3 270818 4 291647 4 312474 4 333311 4 354144 5 374987 5 395812 5 416638 5 437468 6 458294 6 479134 6 499975 6 520808 7 541641 7 562470 7 583302 7 604139 6 624970 6 645804 6 666633 6 687470 5 70...
output:
20824.00
result:
ok single line: '20824.00'
Test #34:
score: 0
Accepted
time: 1ms
memory: 3988kb
input:
48 2 20841 1 41671 1 62502 1 83336 1 104168 2 124998 2 145826 2 166661 2 187493 3 208326 3 229156 3 249994 3 270818 4 291647 4 312474 4 333311 4 354144 5 374987 5 395812 5 416638 5 437468 6 458294 6 479134 6 499975 6 520808 7 541641 7 562470 7 583302 7 604139 6 624970 6 645804 6 666633 6 687470 5 70...
output:
20830.00
result:
ok single line: '20830.00'
Test #35:
score: 0
Accepted
time: 0ms
memory: 4284kb
input:
48 3 20841 1 41671 1 62502 1 83336 1 104168 2 124998 2 145826 2 166661 2 187493 3 208326 3 229156 3 249994 3 270818 4 291647 4 312474 4 333311 4 354144 5 374987 5 395812 5 416638 5 437468 6 458294 6 479134 6 499975 6 520808 7 541641 7 562470 7 583302 7 604139 6 624970 6 645804 6 666633 6 687470 5 70...
output:
20832.00
result:
ok single line: '20832.00'
Test #36:
score: 0
Accepted
time: 1ms
memory: 3864kb
input:
45 1 1 4 2 5 3 6 903 1 904 1 905 2 906 1 907 3 908 3 909 2 910 1 911 2 912 1 913 2 914 2 915 3 916 2 917 2 918 2 919 3 920 1 921 3 922 3 923 1 924 2 925 3 926 1 927 3 928 2 929 3 930 1 931 3 932 3 933 3 934 1 935 1 936 2 937 2 938 1 939 3 940 1 941 3 942 3 943 2 944 3
output:
1.00
result:
ok single line: '1.00'
Test #37:
score: 0
Accepted
time: 1ms
memory: 4060kb
input:
45 2 1 4 2 5 3 6 903 1 904 1 905 2 906 1 907 3 908 3 909 2 910 1 911 2 912 1 913 2 914 2 915 3 916 2 917 2 918 2 919 3 920 1 921 3 922 3 923 1 924 2 925 3 926 1 927 3 928 2 929 3 930 1 931 3 932 3 933 3 934 1 935 1 936 2 937 2 938 1 939 3 940 1 941 3 942 3 943 2 944 3
output:
1.00
result:
ok single line: '1.00'
Test #38:
score: 0
Accepted
time: 1ms
memory: 4268kb
input:
45 3 1 4 2 5 3 6 903 1 904 1 905 2 906 1 907 3 908 3 909 2 910 1 911 2 912 1 913 2 914 2 915 3 916 2 917 2 918 2 919 3 920 1 921 3 922 3 923 1 924 2 925 3 926 1 927 3 928 2 929 3 930 1 931 3 932 3 933 3 934 1 935 1 936 2 937 2 938 1 939 3 940 1 941 3 942 3 943 2 944 3
output:
300.00
result:
ok single line: '300.00'
Test #39:
score: 0
Accepted
time: 0ms
memory: 3776kb
input:
20 2 41 1 96 1 140 1 181 1 238 1 287 1 342 1 395 1 447 1 498 1 546 1 602 1 652 1 706 1 758 1 808 1 863 1 909 1 958 1 1007 2
output:
0.00
result:
ok single line: '0.00'
Subtask #2:
score: 10
Accepted
Dependency #1:
100%
Accepted
Test #40:
score: 10
Accepted
time: 5ms
memory: 4820kb
input:
24 4 2 1 6 1 10 2 13 2 16 3 20 3 24 4 28 4 31 5 34 5 39 6 43 6 49 7 52 7 56 6 60 6 63 5 66 5 70 4 72 4 75 3 78 3 81 2 84 2
output:
4.00
result:
ok single line: '4.00'
Test #41:
score: 0
Accepted
time: 8ms
memory: 4916kb
input:
48 4 2081 1 4163 1 6245 1 8327 1 10408 2 12491 2 14573 2 16656 2 18739 3 20822 3 22904 3 24988 3 27072 4 29155 4 31239 4 33321 4 35404 5 37487 5 39568 5 41651 5 43733 6 45816 6 47900 6 49983 6 52065 7 54147 7 56228 7 58310 7 60390 8 62472 8 64555 8 66637 8 68720 9 70802 9 72884 9 74967 9 77050 10 79...
output:
2082.00
result:
ok single line: '2082.00'
Test #42:
score: 0
Accepted
time: 1ms
memory: 4064kb
input:
98 1 1019 10 2041 12 3058 6 4080 12 5102 10 6117 1 7136 8 8151 11 9166 4 10187 3 11211 10 12229 2 13253 8 14272 11 15292 12 16309 5 17324 7 18345 5 19361 7 20381 11 21408 2 22427 1 23443 9 24466 7 25487 6 26507 5 27528 1 28554 8 29569 11 30585 1 31606 3 32624 12 33650 6 34667 10 35687 11 36711 12 37...
output:
1012.00
result:
ok single line: '1012.00'
Test #43:
score: 0
Accepted
time: 2ms
memory: 4168kb
input:
98 2 1019 10 2041 12 3058 6 4080 12 5102 10 6117 1 7136 8 8151 11 9166 4 10187 3 11211 10 12229 2 13253 8 14272 11 15292 12 16309 5 17324 7 18345 5 19361 7 20381 11 21408 2 22427 1 23443 9 24466 7 25487 6 26507 5 27528 1 28554 8 29569 11 30585 1 31606 3 32624 12 33650 6 34667 10 35687 11 36711 12 37...
output:
1015.00
result:
ok single line: '1015.00'
Test #44:
score: 0
Accepted
time: 3ms
memory: 4476kb
input:
98 3 1019 10 2041 12 3058 6 4080 12 5102 10 6117 1 7136 8 8151 11 9166 4 10187 3 11211 10 12229 2 13253 8 14272 11 15292 12 16309 5 17324 7 18345 5 19361 7 20381 11 21408 2 22427 1 23443 9 24466 7 25487 6 26507 5 27528 1 28554 8 29569 11 30585 1 31606 3 32624 12 33650 6 34667 10 35687 11 36711 12 37...
output:
1015.00
result:
ok single line: '1015.00'
Test #45:
score: 0
Accepted
time: 13ms
memory: 5108kb
input:
98 4 1019 10 2041 12 3058 6 4080 12 5102 10 6117 1 7136 8 8151 11 9166 4 10187 3 11211 10 12229 2 13253 8 14272 11 15292 12 16309 5 17324 7 18345 5 19361 7 20381 11 21408 2 22427 1 23443 9 24466 7 25487 6 26507 5 27528 1 28554 8 29569 11 30585 1 31606 3 32624 12 33650 6 34667 10 35687 11 36711 12 37...
output:
1018.00
result:
ok single line: '1018.00'
Test #46:
score: 0
Accepted
time: 1ms
memory: 4260kb
input:
99 1 1009 8 2017 4 3032 12 4043 12 5056 2 6067 8 7075 7 8086 4 9093 4 10097 11 11111 1 12118 2 13129 10 14143 6 15153 5 16157 3 17173 1 18181 1 19187 5 20195 8 21199 3 22216 5 23227 3 24238 7 25245 3 26255 12 27268 10 28276 7 29281 8 30292 4 31300 4 32307 4 33321 12 34335 3 35350 7 36360 2 37371 9 3...
output:
1002.00
result:
ok single line: '1002.00'
Test #47:
score: 0
Accepted
time: 1ms
memory: 4172kb
input:
99 2 1009 8 2017 4 3032 12 4043 12 5056 2 6067 8 7075 7 8086 4 9093 4 10097 11 11111 1 12118 2 13129 10 14143 6 15153 5 16157 3 17173 1 18181 1 19187 5 20195 8 21199 3 22216 5 23227 3 24238 7 25245 3 26255 12 27268 10 28276 7 29281 8 30292 4 31300 4 32307 4 33321 12 34335 3 35350 7 36360 2 37371 9 3...
output:
1004.00
result:
ok single line: '1004.00'
Test #48:
score: 0
Accepted
time: 1ms
memory: 4476kb
input:
99 3 1009 8 2017 4 3032 12 4043 12 5056 2 6067 8 7075 7 8086 4 9093 4 10097 11 11111 1 12118 2 13129 10 14143 6 15153 5 16157 3 17173 1 18181 1 19187 5 20195 8 21199 3 22216 5 23227 3 24238 7 25245 3 26255 12 27268 10 28276 7 29281 8 30292 4 31300 4 32307 4 33321 12 34335 3 35350 7 36360 2 37371 9 3...
output:
1007.00
result:
ok single line: '1007.00'
Test #49:
score: 0
Accepted
time: 9ms
memory: 5028kb
input:
99 4 1009 8 2017 4 3032 12 4043 12 5056 2 6067 8 7075 7 8086 4 9093 4 10097 11 11111 1 12118 2 13129 10 14143 6 15153 5 16157 3 17173 1 18181 1 19187 5 20195 8 21199 3 22216 5 23227 3 24238 7 25245 3 26255 12 27268 10 28276 7 29281 8 30292 4 31300 4 32307 4 33321 12 34335 3 35350 7 36360 2 37371 9 3...
output:
1008.00
result:
ok single line: '1008.00'
Test #50:
score: 0
Accepted
time: 1ms
memory: 4076kb
input:
100 1 1005 1 2002 3 2999 11 3999 8 5000 7 6000 4 7002 5 8004 2 9003 11 10000 3 11000 2 11998 11 12996 10 13996 5 14999 4 15998 12 16997 7 17997 5 18997 1 19999 5 20999 6 21999 6 22995 10 23998 12 24994 11 25993 9 26995 6 27996 6 29000 11 29997 5 30995 2 31998 1 32997 12 33998 8 34999 3 35994 5 36995...
output:
995.00
result:
ok single line: '995.00'
Test #51:
score: 0
Accepted
time: 1ms
memory: 4308kb
input:
100 2 1005 1 2002 3 2999 11 3999 8 5000 7 6000 4 7002 5 8004 2 9003 11 10000 3 11000 2 11998 11 12996 10 13996 5 14999 4 15998 12 16997 7 17997 5 18997 1 19999 5 20999 6 21999 6 22995 10 23998 12 24994 11 25993 9 26995 6 27996 6 29000 11 29997 5 30995 2 31998 1 32997 12 33998 8 34999 3 35994 5 36995...
output:
996.00
result:
ok single line: '996.00'
Test #52:
score: 0
Accepted
time: 3ms
memory: 4676kb
input:
100 3 1005 1 2002 3 2999 11 3999 8 5000 7 6000 4 7002 5 8004 2 9003 11 10000 3 11000 2 11998 11 12996 10 13996 5 14999 4 15998 12 16997 7 17997 5 18997 1 19999 5 20999 6 21999 6 22995 10 23998 12 24994 11 25993 9 26995 6 27996 6 29000 11 29997 5 30995 2 31998 1 32997 12 33998 8 34999 3 35994 5 36995...
output:
997.00
result:
ok single line: '997.00'
Test #53:
score: 0
Accepted
time: 8ms
memory: 5028kb
input:
100 4 1005 1 2002 3 2999 11 3999 8 5000 7 6000 4 7002 5 8004 2 9003 11 10000 3 11000 2 11998 11 12996 10 13996 5 14999 4 15998 12 16997 7 17997 5 18997 1 19999 5 20999 6 21999 6 22995 10 23998 12 24994 11 25993 9 26995 6 27996 6 29000 11 29997 5 30995 2 31998 1 32997 12 33998 8 34999 3 35994 5 36995...
output:
998.00
result:
ok single line: '998.00'
Test #54:
score: 0
Accepted
time: 13ms
memory: 5152kb
input:
98 4 103 4 202 10 303 1 403 5 504 1 605 2 707 8 809 4 911 3 1012 4 1115 1 1217 9 1318 9 1418 9 1520 5 1620 10 1720 6 1821 4 1924 3 2025 10 2126 3 2226 4 2325 1 2428 8 2529 11 2630 6 2731 1 2834 5 2935 9 3037 3 3139 7 3242 2 3344 8 3445 1 3548 2 3650 9 3751 1 3851 4 3950 12 4054 9 4154 1 4256 9 4358 ...
output:
101.00
result:
ok single line: '101.00'
Test #55:
score: 0
Accepted
time: 13ms
memory: 5164kb
input:
99 4 101 3 201 4 301 7 403 10 507 2 612 2 717 2 817 8 914 1 1016 3 1119 2 1218 11 1320 6 1419 2 1515 6 1619 12 1722 12 1820 2 1920 10 2019 8 2120 2 2222 2 2322 1 2423 5 2524 2 2628 9 2730 11 2832 8 2931 4 3033 1 3132 3 3230 3 3333 2 3435 9 3534 1 3634 8 3735 9 3835 12 3936 5 4036 7 4135 3 4238 10 43...
output:
99.00
result:
ok single line: '99.00'
Test #56:
score: 0
Accepted
time: 13ms
memory: 5040kb
input:
100 4 95 7 200 5 299 3 405 1 502 4 600 7 700 9 798 7 896 11 996 11 1090 8 1188 3 1285 10 1381 11 1481 3 1583 10 1684 12 1784 10 1883 10 1977 2 2076 6 2174 8 2271 4 2371 1 2479 11 2581 4 2679 2 2778 4 2873 12 2969 2 3070 9 3168 4 3264 2 3362 7 3459 6 3559 8 3657 8 3759 6 3863 6 3960 5 4066 8 4165 9 4...
output:
98.00
result:
ok single line: '98.00'
Test #57:
score: 0
Accepted
time: 1ms
memory: 4732kb
input:
20 4 100 4 101 5 102 8 103 9 200 4 201 5 202 9 300 4 301 5 302 6 400 1 401 5 402 6 500 1 501 2 502 6 600 1 601 2 602 3 603 6
output:
49.00
result:
ok single line: '49.00'
Test #58:
score: 0
Accepted
time: 8ms
memory: 4840kb
input:
48 4 2081 12 4163 12 6245 12 8327 12 10410 11 12492 11 14574 11 16655 11 18739 10 20821 10 22904 10 24988 10 27069 9 29152 9 31234 9 33318 9 35402 8 37483 8 39565 8 41647 8 43730 7 45812 7 47896 7 49980 7 52062 6 54145 6 56230 6 58313 6 60395 5 62476 5 64559 5 66641 5 68722 4 70805 4 72886 4 74968 4...
output:
2082.00
result:
ok single line: '2082.00'
Test #59:
score: 0
Accepted
time: 1ms
memory: 4692kb
input:
8 4 1 1 2 2 3 3 4 4 21 5 22 6 23 7 24 8
output:
4.25
result:
ok single line: '4.25'
Test #60:
score: 0
Accepted
time: 7ms
memory: 4824kb
input:
45 4 1 1 2 3 3 1 4 3 5 3 6 2 7 3 8 1 9 3 10 1 11 3 12 1 13 1 14 1 15 2 16 2 17 2 18 2 19 1 20 2 21 2 22 3 23 3 24 2 25 1 26 2 27 2 28 2 29 1 30 3 31 2 32 1 33 1 333 7 334 8 335 9 336 8 337 9 338 8 339 8 340 8 341 7 342 9 343 7 344 9
output:
150.00
result:
ok single line: '150.00'
Test #61:
score: 0
Accepted
time: 4ms
memory: 4816kb
input:
12 4 0 1 2 1 3 3 6 1 9 6 12 5 21 1 23 1 24 3 27 1 30 8 33 6
output:
4.50
result:
ok single line: '4.50'
Test #62:
score: 0
Accepted
time: 3ms
memory: 4544kb
input:
2 4 40287 8 20338194 8
output:
0.00
result:
ok single line: '0.00'
Test #63:
score: 0
Accepted
time: 8ms
memory: 5024kb
input:
48 4 20 6 39 12 62 10 85 5 104 2 124 3 143 2 159 4 179 4 198 7 218 5 237 5 259 7 282 8 301 10 322 9 345 4 363 2 381 10 402 12 422 12 444 3 464 4 484 5 503 6 522 8 541 9 555 12 572 5 595 8 617 4 636 9 656 1 676 4 694 3 713 8 733 9 752 6 772 4 791 9 808 4 825 1 843 4 860 10 883 12 902 11 924 7 942 10
output:
18.00
result:
ok single line: '18.00'
Test #64:
score: 0
Accepted
time: 4ms
memory: 4960kb
input:
48 4 21 9 45 2 63 1 87 12 109 5 128 9 145 10 167 4 186 11 206 7 227 12 247 2 264 8 282 3 301 11 318 9 338 3 361 6 382 2 404 11 422 5 438 6 454 10 476 6 494 1 517 7 534 8 551 12 569 6 591 2 612 2 629 8 653 2 675 4 697 4 717 8 735 5 754 5 775 12 799 1 816 12 835 11 851 10 871 4 892 3 911 2 933 2 949 7
output:
18.00
result:
ok single line: '18.00'
Test #65:
score: 0
Accepted
time: 8ms
memory: 4796kb
input:
48 4 21 12 43 8 62 6 82 2 101 10 122 12 140 3 162 11 184 2 205 8 222 4 243 8 263 6 283 5 307 7 324 6 344 8 361 7 379 1 403 4 420 9 442 9 463 6 483 10 503 3 519 7 539 5 561 6 584 2 601 8 618 10 638 10 660 7 677 11 696 10 713 7 733 10 753 4 769 2 790 6 810 3 831 10 854 5 875 9 897 7 916 8 937 8 957 3
output:
19.00
result:
ok single line: '19.00'
Test #66:
score: 0
Accepted
time: 7ms
memory: 4932kb
input:
40 4 24999996 7 49999991 1 74999990 1 99999971 10 124999990 8 149999992 10 174999966 1 199999964 6 224999971 11 249999984 1 274999977 8 299999976 3 324999975 5 349999970 9 374999990 2 399999983 6 424999994 12 450000000 4 475000014 8 499999980 5 524999990 8 550000002 7 575000012 7 599999994 9 6250000...
output:
24999999.00
result:
ok single line: '24999999.00'
Test #67:
score: 0
Accepted
time: 4ms
memory: 4960kb
input:
48 4 20841 1 41671 1 62502 1 83336 1 104168 2 124998 2 145826 2 166661 2 187493 3 208326 3 229156 3 249994 3 270818 4 291647 4 312474 4 333311 4 354144 5 374987 5 395812 5 416638 5 437468 6 458294 6 479134 6 499975 6 520808 7 541641 7 562470 7 583302 7 604139 6 624970 6 645804 6 666633 6 687470 5 70...
output:
20832.00
result:
ok single line: '20832.00'
Test #68:
score: 0
Accepted
time: 3ms
memory: 4824kb
input:
45 4 1 4 2 5 3 6 903 1 904 1 905 2 906 1 907 3 908 3 909 2 910 1 911 2 912 1 913 2 914 2 915 3 916 2 917 2 918 2 919 3 920 1 921 3 922 3 923 1 924 2 925 3 926 1 927 3 928 2 929 3 930 1 931 3 932 3 933 3 934 1 935 1 936 2 937 2 938 1 939 3 940 1 941 3 942 3 943 2 944 3
output:
450.00
result:
ok single line: '450.00'