QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#100112 | #5304. Money Game | lgvc# | AC ✓ | 98ms | 8292kb | C++23 | 1.6kb | 2023-04-24 18:35:16 | 2023-04-24 18:35:20 |
Judging History
answer
//这回只花了114514min就打完了。
//真好。记得多手造几组。
#include <bits/stdc++.h>
//#define int long long
#define pai 3.141592653589793238462643383279502884197169399375105820
#define MOD 1000000007
#define eps 0.00000001
inline int min(int a,int b) {return a<b?a:b;}
inline int max(int a,int b) {return a>b?a:b;}
#define ULL unsigned long long
#define LL long long
#define INF 0x3f3f3f3f
#define INF_LL 0x3f3f3f3f3f3f3f3f
static char buf[1000000],*paa=buf,*pd=buf;
static char buf2[1000000],*pp=buf2;
#define getchar() paa==pd&&(pd=(paa=buf)+fread(buf,1,1000000,stdin),paa==pd)?EOF:*paa++
inline void pc(char ch){
if(pp-buf2==1000000) fwrite(buf2,1,1000000,stdout),pp=buf2;
*pp++=ch;
}
inline void pcc(){
fwrite(buf2,1,pp-buf2,stdout);
pp=buf2;
}
inline int read(void) {
int w=1;
register int x(0);register char c(getchar());
while(c<'0'||c>'9') {if(c=='-') w=-1;c=getchar();}
while(c>='0'&&c<='9') x=(x<<1)+(x<<3)+(c^48),c=getchar();
return w*x;
}
void write(int x) {
if(x<0) pc('-'),x=-x;
static int sta[20];
int top=0;
do {
sta[top++]=x%10,x/=10;
} while(x);
while(top) pc(sta[--top]+48);
}
void we(int x) {
write(x);
pc('\n');
}
inline bool cmp_xi(int a,int b) {return a<b;}
inline bool cmp_da(int a,int b) {return a>b;}
int N,a[1000009];
double as;
signed main(void) {
//freopen("m.in","r",stdin);
//freopen("m.out","w",stdout);
N=read();
for(int i=1;i<=N;i++) {
a[i]=read();
as+=a[i];
}
printf("%.12lf ",as*2.0/(N+1));
for(int i=2;i<=N;i++) {
printf("%.12lf ",as*1.0/(N+1));
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 5836kb
input:
2 4 2
output:
4.000000000000 2.000000000000
result:
ok 2 numbers
Test #2:
score: 0
Accepted
time: 1ms
memory: 5780kb
input:
2 2 3
output:
3.333333333333 1.666666666667
result:
ok 2 numbers
Test #3:
score: 0
Accepted
time: 2ms
memory: 5548kb
input:
2 851648 722281
output:
1049286.000000000000 524643.000000000000
result:
ok 2 numbers
Test #4:
score: 0
Accepted
time: 0ms
memory: 5844kb
input:
3 450762 114467 367746
output:
466487.500000000000 233243.750000000000 233243.750000000000
result:
ok 3 numbers
Test #5:
score: 0
Accepted
time: 3ms
memory: 5672kb
input:
4 2 3 5 1
output:
4.400000000000 2.200000000000 2.200000000000 2.200000000000
result:
ok 4 numbers
Test #6:
score: 0
Accepted
time: 1ms
memory: 5544kb
input:
5 616288 155735 783782 648639 349827
output:
851423.666666666628 425711.833333333314 425711.833333333314 425711.833333333314 425711.833333333314
result:
ok 5 numbers
Test #7:
score: 0
Accepted
time: 0ms
memory: 5768kb
input:
6 1 2 5 5 1 2
output:
4.571428571429 2.285714285714 2.285714285714 2.285714285714 2.285714285714 2.285714285714
result:
ok 6 numbers
Test #8:
score: 0
Accepted
time: 2ms
memory: 5540kb
input:
100 283397 377774 494372 487546 143741 314831 934818 229251 78798 395137 407818 18761 516178 734330 838264 433107 858247 174903 905002 445936 58127 253493 844807 215023 37167 11961 885588 176935 156947 82314 21120 373809 226377 712113 302554 613417 368577 604224 811349 182256 179860 424904 544075 16...
output:
848873.900990099064 424436.950495049532 424436.950495049532 424436.950495049532 424436.950495049532 424436.950495049532 424436.950495049532 424436.950495049532 424436.950495049532 424436.950495049532 424436.950495049532 424436.950495049532 424436.950495049532 424436.950495049532 424436.950495049532 ...
result:
ok 100 numbers
Test #9:
score: 0
Accepted
time: 0ms
memory: 5604kb
input:
100 5 3 4 3 3 5 1 4 1 5 5 4 2 5 2 4 2 2 5 2 3 4 3 3 1 3 1 5 4 5 4 2 3 1 4 2 2 3 4 5 2 5 2 2 1 2 1 4 2 2 3 4 4 2 1 2 5 3 2 2 1 5 4 2 3 1 3 1 4 5 4 1 1 5 3 3 2 3 5 4 2 4 3 3 2 3 5 2 3 5 5 4 4 1 5 4 5 4 2 1
output:
6.079207920792 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 3.039603960396 ...
result:
ok 100 numbers
Test #10:
score: 0
Accepted
time: 0ms
memory: 5852kb
input:
1000 752085 536931 226066 866464 865683 685497 869505 833061 583665 542381 226489 183898 682629 584879 968426 414809 258683 315749 204443 89329 66644 255718 884710 690597 216353 59071 257910 665131 979147 688114 99343 929069 829135 674291 849479 242572 654330 268521 645445 96088 960241 507763 482377...
output:
1019649.568431568448 509824.784215784224 509824.784215784224 509824.784215784224 509824.784215784224 509824.784215784224 509824.784215784224 509824.784215784224 509824.784215784224 509824.784215784224 509824.784215784224 509824.784215784224 509824.784215784224 509824.784215784224 509824.784215784224...
result:
ok 1000 numbers
Test #11:
score: 0
Accepted
time: 3ms
memory: 5604kb
input:
1000 5 4 4 5 2 2 1 1 2 4 4 5 4 4 5 4 2 1 1 5 5 3 5 2 4 3 2 2 5 4 4 3 2 1 1 1 2 5 3 4 4 5 2 5 4 1 5 4 3 2 1 5 5 5 3 4 1 4 1 5 3 4 2 5 5 4 2 3 4 2 3 5 2 4 4 4 3 4 2 3 1 1 3 5 5 3 4 3 5 3 1 5 5 4 1 1 5 3 1 1 5 1 4 2 2 3 1 2 2 3 2 3 3 5 4 1 2 4 3 5 2 5 1 3 4 4 4 5 5 3 2 4 1 4 2 4 4 4 4 4 2 3 3 1 4 4 4 3...
output:
6.021978021978 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 3.010989010989 ...
result:
ok 1000 numbers
Test #12:
score: 0
Accepted
time: 11ms
memory: 5784kb
input:
10000 555267 855028 164928 642327 322766 137905 892693 768608 595311 65776 289777 973757 430764 328540 522735 2683 718992 189574 472939 64268 909931 465314 133959 665735 231887 255624 980840 597349 306389 287285 166135 812422 971286 552328 601121 51946 888371 940805 141463 481145 8270 701461 63887 9...
output:
989682.617738226196 494841.308869113098 494841.308869113098 494841.308869113098 494841.308869113098 494841.308869113098 494841.308869113098 494841.308869113098 494841.308869113098 494841.308869113098 494841.308869113098 494841.308869113098 494841.308869113098 494841.308869113098 494841.308869113098 ...
result:
ok 10000 numbers
Test #13:
score: 0
Accepted
time: 5ms
memory: 5668kb
input:
10000 2 5 2 1 2 1 2 5 2 3 2 4 2 5 5 2 4 4 4 4 1 2 4 3 4 3 2 5 3 5 2 4 3 5 5 2 4 5 4 4 5 1 4 1 4 4 5 5 5 4 3 3 2 2 3 4 3 2 2 3 4 1 1 5 5 2 3 5 4 5 1 3 2 5 3 5 3 1 2 1 1 5 2 1 4 3 3 4 1 3 1 2 1 3 1 5 1 1 1 3 5 4 2 5 4 2 1 5 5 3 2 1 4 1 1 3 3 3 1 4 4 5 3 3 5 2 3 2 2 2 3 2 1 3 5 1 2 4 3 5 5 2 4 3 5 1 1 ...
output:
263.891410858914 131.945705429457 131.945705429457 131.945705429457 131.945705429457 131.945705429457 131.945705429457 131.945705429457 131.945705429457 131.945705429457 131.945705429457 131.945705429457 131.945705429457 131.945705429457 131.945705429457 131.945705429457 131.945705429457 131.9457054...
result:
ok 10000 numbers
Test #14:
score: 0
Accepted
time: 87ms
memory: 6676kb
input:
100000 779832 554019 543847 331565 726136 264080 431095 49283 742555 692958 230722 850608 314016 458702 247541 403119 84030 489015 116333 72785 944859 505217 418045 620728 535894 595242 693228 419550 169086 398212 721396 606668 933464 99252 230276 337699 585373 807605 279487 518422 91129 863955 5859...
output:
1001386.030459695379 500693.015229847690 500693.015229847690 500693.015229847690 500693.015229847690 500693.015229847690 500693.015229847690 500693.015229847690 500693.015229847690 500693.015229847690 500693.015229847690 500693.015229847690 500693.015229847690 500693.015229847690 500693.015229847690...
result:
ok 100000 numbers
Test #15:
score: 0
Accepted
time: 93ms
memory: 5996kb
input:
100000 3 3 2 1 5 5 5 1 2 5 3 2 4 2 1 5 5 1 5 3 3 5 4 1 2 3 2 3 1 2 4 4 2 5 1 3 4 3 2 3 1 1 5 2 1 3 5 5 3 3 3 1 5 1 1 3 2 4 1 2 4 1 4 4 4 4 3 1 1 5 2 1 1 3 2 3 4 5 2 5 1 4 2 4 1 4 3 3 5 5 3 2 2 1 5 5 2 4 4 4 1 2 3 4 1 1 4 4 4 1 1 3 2 3 3 4 5 4 5 1 1 4 3 3 5 4 1 2 3 4 1 4 3 4 3 2 3 5 2 4 4 3 1 5 3 4 5...
output:
1183.394766052339 591.697383026170 591.697383026170 591.697383026170 591.697383026170 591.697383026170 591.697383026170 591.697383026170 591.697383026170 591.697383026170 591.697383026170 591.697383026170 591.697383026170 591.697383026170 591.697383026170 591.697383026170 591.697383026170 591.697383...
result:
ok 100000 numbers
Test #16:
score: 0
Accepted
time: 98ms
memory: 6672kb
input:
99999 40292 282829 216987 948216 868506 49544 574269 238601 310361 979927 485756 943815 434808 910471 442466 72899 831063 686602 179839 38897 581205 374071 117990 21801 603544 489351 782190 725480 834697 491738 934449 964429 635413 752432 955088 489180 349037 635185 296045 687614 140487 715366 32721...
output:
1000519.757779999985 500259.878889999993 500259.878889999993 500259.878889999993 500259.878889999993 500259.878889999993 500259.878889999993 500259.878889999993 500259.878889999993 500259.878889999993 500259.878889999993 500259.878889999993 500259.878889999993 500259.878889999993 500259.878889999993...
result:
ok 99999 numbers
Test #17:
score: 0
Accepted
time: 55ms
memory: 8292kb
input:
99999 3 5 2 4 3 3 3 1 4 3 3 5 4 1 4 5 4 5 1 5 1 2 3 4 3 4 1 4 1 4 3 5 5 5 1 1 4 4 5 4 5 1 2 3 3 5 4 2 5 2 5 1 5 5 5 4 4 1 3 1 3 3 2 3 1 1 3 5 2 2 3 1 3 3 3 3 5 3 2 3 5 1 1 3 4 3 4 2 3 3 5 4 1 2 2 1 4 3 2 4 2 1 2 4 5 4 3 4 5 4 1 2 3 1 2 3 5 5 5 1 4 3 5 5 4 1 1 5 2 4 4 1 4 2 1 4 3 1 5 1 4 4 3 5 2 1 4 ...
output:
1020.871840000000 510.435920000000 510.435920000000 510.435920000000 510.435920000000 510.435920000000 510.435920000000 510.435920000000 510.435920000000 510.435920000000 510.435920000000 510.435920000000 510.435920000000 510.435920000000 510.435920000000 510.435920000000 510.435920000000 510.435920...
result:
ok 99999 numbers