QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#88275 | #5694. 最后的活动 | CSU2023 | AC ✓ | 496ms | 89912kb | C++14 | 3.2kb | 2023-03-15 19:31:23 | 2023-03-15 19:31:26 |
Judging History
answer
#include <bits/stdc++.h>
template <class T>
inline void read(T &res)
{
char ch; bool flag = false; res = 0;
while (ch = getchar(), !isdigit(ch) && ch != '-');
ch == '-' ? flag = true : res = ch ^ 48;
while (ch = getchar(), isdigit(ch))
res = res * 10 + ch - 48;
flag ? res = -res : 0;
}
template <class T>
inline void put(T x)
{
if (x > 9)
put(x / 10);
putchar(x % 10 + 48);
}
template <class T>
inline void _put(T x)
{
if (x < 0)
x = -x, putchar('-');
put(x);
}
template <class T>
inline void CkMin(T &x, T y) {x > y ? x = y : 0;}
template <class T>
inline void CkMax(T &x, T y) {x < y ? x = y : 0;}
template <class T>
inline T Min(T x, T y) {return x < y ? x : y;}
template <class T>
inline T Max(T x, T y) {return x > y ? x : y;}
template <class T>
inline T Abs(T x) {return x < 0 ? -x : x;}
template <class T>
inline T Sqr(T x) {return x * x;}
// 若传入 int x 同时结果可能爆 int 应这样写 Sqr((ll)x)
using std::map;
using std::set;
using std::pair;
using std::bitset;
using std::string;
using std::vector;
using std::complex;
using std::multiset;
using std::priority_queue;
typedef long long ll;
typedef long double ld;
typedef complex<ld> com;
typedef pair<int, int> pir;
const ld pi = acos(-1.0);
const int Maxn = 1e9;
const int Minn = -1e9;
const int mod = 998244353;
const int N = 8;
const int S = (1 << 6) + 5;
const int M = 1e4 + 5;
int T_data, n, m, _c;
int sc[N][3], succ[N][S], fail[N][S];
int u[N][4], v[N][4];
ld f[M][N][S];
inline ld calc_f(int k, int i, int s)
{
ld res = i > 1 && k >= succ[i - 1][s] ? f[k - succ[i - 1][s]][1][0] : 0;
ld rig = 0, lef = 0, t[3];
t[0] = t[1] = t[2] = 0;
t[0] = k >= fail[i - 1][s] ? f[k - fail[i - 1][s]][1][0] : 0;
if (i < n)
{
t[1] = f[k][i + 1][s];
t[2] = f[k][i + 1][1 << i - 1 | s];
}
else
{
t[1] = k >= succ[n][s] ? f[k - succ[n][s]][1][0] : 0;
t[2] = k >= succ[n][1 << i - 1 | s] ? f[k - succ[n][1 << i - 1 | s]][1][0] : 0;
}
for (int j = 0; j <= 2; ++j)
lef += v[i][j] * t[j];
CkMax(res, lef / v[i][3]);
for (int j = 0; j <= 2; ++j)
rig += u[i][j] * t[j];
CkMax(res, rig / u[i][3]);
return res;
}
inline void calc_totf(int k, ld f00)
{
for (int i = n; i >= 1; --i)
for (int s = 0; s < (1 << i - 1); ++s)
f[k][i][s] = 0;
f[k][1][0] = f00;
for (int i = n; i >= 1; --i)
for (int s = (1 << i - 1) - 1; s >= 0; --s)
f[k][i][s] = calc_f(k, i, s);
}
int main()
{
read(n); read(m); read(_c);
for (int i = 1; i <= n; ++i)
{
read(sc[i][1]);
read(sc[i][2]);
for (int t = 0; t <= 2; ++t)
read(u[i][t]);
u[i][3] = u[i][0] + u[i][1] + u[i][2];
for (int t = 0; t <= 2; ++t)
read(v[i][t]);
v[i][3] = v[i][0] + v[i][1] + v[i][2];
}
for (int i = n; i >= 1; --i)
for (int s = 0; s < (1 << i); ++s)
{
for (int j = 0; j < i; ++j)
succ[i][s] += sc[j + 1][(s >> j & 1) + 1];
fail[i][s] = _c * succ[i][s] / 100.0;
}
f[0][1][0] = 1.0;
for (int k = 1; k <= m; ++k)
{
ld l = 0, r = 1.0;
while (r - l > 1e-18)
{
ld mid = (l + r) / 2.0;
calc_totf(k, mid);
f[k][1][0] > mid ? l = mid : r = mid;
}
printf("%.18Lf ", f[k][1][0] = (l + r) / 2.0);
}
putchar('\n');
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 48ms
memory: 53688kb
input:
2 10000 16 817 4269 5184 7875 3557 6454 9297 4820 1917 9355 3141 5480 1530 6694 420 324
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 10000 numbers
Test #2:
score: 0
Accepted
time: 91ms
memory: 64892kb
input:
3 10000 28 3324 7744 7865 6120 6618 3395 7381 7383 3843 9935 3068 2797 4685 4077 7151 8796 3116 5415 8936 3217 6278 8499 8765 9127
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 10000 numbers
Test #3:
score: 0
Accepted
time: 145ms
memory: 76148kb
input:
4 10000 94 6763 9644 5765 1067 7530 8467 8061 3062 2216 8375 4097 4133 9782 7823 3386 324 1828 9067 8723 4159 7837 8260 2966 7789 1709 6291 4198 4253 2318 840 4248 9711
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 10000 numbers
Test #4:
score: 0
Accepted
time: 212ms
memory: 88620kb
input:
5 10000 58 4455 6125 8790 6983 9472 542 8310 5693 44 3364 1213 7863 5486 7593 1993 6050 3710 4232 985 354 7980 595 8195 4299 1775 4467 252 5426 4423 9338 2248 8853 622 4208 1354 7877 1890 2174 3406 1198
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 10000 numbers
Test #5:
score: 0
Accepted
time: 388ms
memory: 89704kb
input:
6 10000 38 2576 6294 9290 3107 6523 6704 2991 1088 727 1390 1413 6725 3070 3558 3512 2595 1357 5903 3719 5451 4014 116 1271 1593 3581 7862 873 1566 8829 6566 8209 7559 1956 8120 3116 8111 6549 8383 500 5840 5597 6789 4862 3033 8062 9190 6752 1679
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 10000 numbers
Test #6:
score: 0
Accepted
time: 99ms
memory: 20996kb
input:
6 2013 7 1 9 1132 4086 6135 2836 2688 6 2 4 4375 7225 140 3353 7159 2515 8 9 1001 2601 2978 1787 7580 4862 1 2 484 233 4863 3619 4275 7150 2 4 4617 7191 8194 6131 5594 6147 4 5 5576 3569 7612 8075 1990 7373
output:
0.999682323604481984 0.999364748127256238 0.999047273536263401 0.998729899799454299 0.999101556958262989 0.998784971092048523 0.998467681623428787 0.998659503546187098 0.999641632838050133 0.999666056852535937 0.999665385786332642 0.999817745159854539 0.999831987810403408 0.999839642433150802 0.9998...
result:
ok 2013 numbers
Test #7:
score: 0
Accepted
time: 98ms
memory: 20840kb
input:
6 2013 7 4 9 9775 3021 7671 5526 2025 3464 3 4 9126 3934 2914 4291 291 5655 8 9 7263 5087 152 5629 2549 9910 4 7 8908 5673 3606 5616 5767 6650 1 2 8433 6791 4438 3055 6334 9764 2 8 7224 2752 9103 3331 9529 2909
output:
0.806151035079143102 0.677885182092914210 0.566857660797872540 0.874825762326969281 0.782929602285310812 0.669893337523742267 0.726680607666542661 0.853121925003228909 0.980089534548848073 0.805919308065167651 0.746482011265005366 0.892708915263415094 0.988440793509658779 0.808257976827503799 0.7441...
result:
ok 2013 numbers
Test #8:
score: 0
Accepted
time: 24ms
memory: 43492kb
input:
1 9989 69 5 14 4391 4602 1426 2032 4387 3854
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.763437292634372926 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.582836499784901162 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.467661691542288557 0.4449...
result:
ok 9989 numbers
Test #9:
score: 0
Accepted
time: 56ms
memory: 53280kb
input:
2 9931 34 2 16 4842 1497 2215 8299 1001 9059 12 17 8893 2471 2322 7157 8667 6989
output:
0.000000000000000000 0.403286637931034482 0.000000000000000000 0.162640112333717301 0.625579636200289912 0.065590584095790625 0.408657157995604771 0.026451806139924183 0.227867600323696876 0.391349881228487076 0.117327870773530016 0.316277778261240816 0.057573112965866949 0.276557729835908609 0.2448...
result:
ok 9931 numbers
Test #10:
score: 0
Accepted
time: 496ms
memory: 89880kb
input:
6 10000 75 12 17 5941 9089 5651 6083 8554 2850 15 16 1449 4599 4027 2389 7574 6518 2 6 4545 5098 2197 7634 5227 484 8 10 2983 1551 7551 1699 1548 3348 12 14 4311 4706 7487 6540 970 3332 5 8 8105 3478 842 1543 2965 212
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.108728808197256405 0.000000000000000000 0.000000000000000000 0.786313676765339151 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 10000 numbers
Test #11:
score: 0
Accepted
time: 36ms
memory: 43272kb
input:
1 9964 94 148 170 8116 6979 1216 719 2141 9139
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9964 numbers
Test #12:
score: 0
Accepted
time: 51ms
memory: 53104kb
input:
2 9943 23 149 429 355 7021 1287 7112 1672 7010 167 217 9863 8869 8739 4075 3948 392
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9943 numbers
Test #13:
score: 0
Accepted
time: 465ms
memory: 89320kb
input:
6 9935 97 268 292 5602 9599 9635 837 6498 6706 411 433 221 6645 3277 7286 4731 1448 242 355 7740 5975 8871 67 586 3436 120 190 828 6716 4946 6986 6140 4112 185 274 4508 5362 9528 6169 8395 4983 216 233 1347 2747 9066 6529 9930 1942
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9935 numbers
Test #14:
score: 0
Accepted
time: 31ms
memory: 43392kb
input:
1 9927 35 1806 4438 8580 1811 5959 7622 2233 8661
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9927 numbers
Test #15:
score: 0
Accepted
time: 211ms
memory: 87788kb
input:
5 9913 42 2573 7669 1322 6501 106 7076 6590 5808 2136 4352 1006 6425 4205 545 9775 2910 2160 8536 797 8965 2006 391 4387 7201 4258 6322 5977 3246 9597 4015 5429 9025 5194 5199 3122 6759 4915 2478 1827 1318
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9913 numbers
Test #16:
score: 0
Accepted
time: 362ms
memory: 88792kb
input:
6 9902 72 3835 7002 8704 1849 2847 5058 5998 4617 5534 7933 3022 9939 6546 5352 4218 1640 2303 7441 7832 1967 2577 4509 8275 3874 1979 9569 1618 8989 83 6535 4728 5932 6167 8104 8456 7086 9395 6428 7209 9934 7908 8336 5478 4632 5198 776 7850 9694
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9902 numbers
Test #17:
score: 0
Accepted
time: 24ms
memory: 8516kb
input:
6 581 5 8497 9573 3169 9983 1707 9208 2994 2676 3750 5635 7528 9585 9441 7637 4844 3909 74 3980 8074 4350 5326 4819 9221 7966 4761 9937 128 5870 3215 4961 5471 9762 5537 6313 9821 1795 1893 3278 4144 8982 7869 9871 6798 605 4873 6331 5965 7971
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 581 numbers
Test #18:
score: 0
Accepted
time: 16ms
memory: 7988kb
input:
6 526 72 1823 4402 4409 4010 9208 6278 7754 8032 2976 5908 8813 5713 6752 6944 1068 1048 611 4030 2808 4564 6638 5955 9732 1183 2262 4225 5263 5835 9037 9782 8562 658 1161 4672 793 2643 7904 771 251 9417 2045 6700 964 1690 5284 6472 1373 2337
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 526 numbers
Test #19:
score: 0
Accepted
time: 43ms
memory: 43440kb
input:
1 9962 94 3987 6797 0 1 0 0 0 1
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9962 numbers
Test #20:
score: 0
Accepted
time: 386ms
memory: 89416kb
input:
6 9967 80 280 3980 0 1 0 0 0 1 415 6559 0 1 0 0 0 1 836 8313 0 1 0 0 0 1 404 5007 0 1 0 0 0 1 6615 7857 0 1 0 0 0 1 423 3396 0 1 0 0 0 1
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9967 numbers
Test #21:
score: 0
Accepted
time: 104ms
memory: 64240kb
input:
3 9925 66 981 5696 0 1 0 0 0 1 2451 4928 0 1 0 0 0 1 1998 3456 0 1 0 0 0 1
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9925 numbers
Test #22:
score: 0
Accepted
time: 352ms
memory: 89128kb
input:
6 9942 100 5389 9074 0 1 0 0 0 1 4466 6210 0 1 0 0 0 1 3074 5979 0 1 0 0 0 1 3105 8350 0 1 0 0 0 1 38 4950 0 1 0 0 0 1 2459 4023 0 1 0 0 0 1
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9942 numbers
Test #23:
score: 0
Accepted
time: 125ms
memory: 75936kb
input:
4 9971 100 9289 9525 0 1 0 0 0 1 1746 9523 0 1 0 0 0 1 5165 6682 0 1 0 0 0 1 642 4080 0 1 0 0 0 1
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9971 numbers
Test #24:
score: 0
Accepted
time: 446ms
memory: 89660kb
input:
6 9992 0 644 966 880 4354 6893 124 8460 4234 322 644 515 4686 6087 8974 4089 9787 644 644 6524 6008 1497 6709 4329 1274 322 966 3651 1322 2893 5286 4184 3910 322 644 6357 7270 1672 2527 820 7639 102 202 1321 1129 7935 3410 3686 8963
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9992 numbers
Test #25:
score: 0
Accepted
time: 441ms
memory: 89696kb
input:
6 9992 0 644 966 880 4354 6893 124 8460 4234 322 644 515 4686 6087 8974 4089 9787 644 644 6524 6008 1497 6709 4329 1274 322 966 3651 1322 2893 5286 4184 3910 322 644 6357 7270 1672 2527 820 7639 102 202 1321 1129 7935 3410 3686 8963
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9992 numbers
Test #26:
score: 0
Accepted
time: 472ms
memory: 89712kb
input:
6 9998 0 432 648 0 1 0 0 0 1 216 648 0 1 0 0 0 1 216 648 0 1 0 0 0 1 432 648 0 1 0 0 0 1 648 864 0 1 0 0 0 1 108 340 0 1 0 0 0 1
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9998 numbers
Test #27:
score: 0
Accepted
time: 479ms
memory: 89824kb
input:
6 9998 0 432 648 0 1 0 0 0 1 216 648 0 1 0 0 0 1 216 648 0 1 0 0 0 1 432 648 0 1 0 0 0 1 648 864 0 1 0 0 0 1 108 340 0 1 0 0 0 1
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9998 numbers
Test #28:
score: 0
Accepted
time: 454ms
memory: 89612kb
input:
6 9990 50 546 546 8979 3728 6220 2952 7541 8232 546 546 4619 8565 905 7238 332 1310 546 546 5750 11 8899 9908 4712 1880 546 546 8527 3554 8720 5044 7815 4265 546 546 8587 4932 8258 64 8368 6705 591 818 4490 8114 4534 2321 3905 2852
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9990 numbers
Test #29:
score: 0
Accepted
time: 443ms
memory: 89628kb
input:
6 9990 50 400 1000 5585 5598 317 6432 1150 5595 600 800 9641 7634 2621 1791 884 9226 400 400 9971 6793 687 6156 5135 7776 400 800 1 5724 4281 8354 3668 6574 400 1000 2043 788 340 7557 5521 130 258 386 7313 6648 2013 3123 9487 7959
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9990 numbers
Test #30:
score: 0
Accepted
time: 475ms
memory: 89728kb
input:
6 9995 50 592 592 0 1 0 0 0 1 592 592 0 1 0 0 0 1 592 592 0 1 0 0 0 1 592 592 0 1 0 0 0 1 592 592 0 1 0 0 0 1 427 963 0 1 0 0 0 1
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9995 numbers
Test #31:
score: 0
Accepted
time: 448ms
memory: 89832kb
input:
6 9995 50 592 592 0 1 0 0 0 1 592 592 0 1 0 0 0 1 592 592 0 1 0 0 0 1 592 592 0 1 0 0 0 1 592 592 0 1 0 0 0 1 427 963 0 1 0 0 0 1
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9995 numbers
Test #32:
score: 0
Accepted
time: 445ms
memory: 89824kb
input:
6 9997 100 270 990 6033 9082 7272 9026 7135 3798 90 90 6829 7499 5391 1845 7400 3511 90 810 5360 7277 7400 8227 3482 2026 90 270 4291 9008 4056 4458 1003 8355 540 900 5203 8756 5741 5804 1636 6108 372 489 8752 1314 2012 9849 6662 3493
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9997 numbers
Test #33:
score: 0
Accepted
time: 471ms
memory: 89764kb
input:
6 9999 100 186 558 7538 2529 7080 4521 376 4414 186 558 9219 9885 7137 4319 2315 393 372 558 3565 901 2666 2604 7438 1822 372 930 3061 8835 1326 7308 1084 6500 744 930 4915 7552 8130 5445 2343 8197 433 466 4674 4807 4244 5004 1068 8936
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9999 numbers
Test #34:
score: 0
Accepted
time: 457ms
memory: 89728kb
input:
6 9999 100 486 972 0 1 0 0 0 1 972 972 0 1 0 0 0 1 486 972 0 1 0 0 0 1 486 486 0 1 0 0 0 1 972 972 0 1 0 0 0 1 685 918 0 1 0 0 0 1
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9999 numbers
Test #35:
score: 0
Accepted
time: 426ms
memory: 89872kb
input:
6 9999 100 486 972 0 1 0 0 0 1 972 972 0 1 0 0 0 1 486 972 0 1 0 0 0 1 486 486 0 1 0 0 0 1 972 972 0 1 0 0 0 1 685 918 0 1 0 0 0 1
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9999 numbers
Test #36:
score: 0
Accepted
time: 381ms
memory: 89908kb
input:
6 9997 75 36 3697 2591 4058 8446 2441 2834 1270 62 8886 8556 2144 3786 8399 3409 5675 47 7237 6917 9867 3282 6619 226 7063 99 6906 799 9363 3258 200 2400 5184 65 9829 1650 368 3286 1656 2494 6294 62 1199 8476 9493 5681 7776 6304 3552
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9997 numbers
Test #37:
score: 0
Accepted
time: 363ms
memory: 89908kb
input:
6 9996 50 99 4197 2812 9850 9750 5818 5396 6304 39 3186 2310 4657 8625 6710 428 5275 43 6409 2364 6843 422 6023 3263 3234 29 6723 9555 3184 4568 2686 7890 9926 64 5173 9876 9652 773 3606 706 2585 26 6244 3749 283 819 9122 1905 6078
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9996 numbers
Test #38:
score: 0
Accepted
time: 416ms
memory: 89900kb
input:
6 9996 93 3100 3857 7917 8570 5324 6585 1460 1591 688 717 5310 798 2573 3486 4939 1787 400 634 2747 3166 7710 9792 6489 7615 481 964 199 8802 4284 1348 7353 4474 393 963 7294 5795 6136 3802 3996 4674 460 481 4998 2774 8957 40 1451 2776
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9996 numbers
Test #39:
score: 0
Accepted
time: 424ms
memory: 89632kb
input:
6 9999 94 3215 3438 2008 3244 8706 7176 1750 4977 103 130 3735 7774 6630 1708 212 3398 773 779 4360 7230 5447 1126 5754 8546 146 514 5269 9997 7358 4805 5776 155 174 555 1931 6696 3426 1018 8341 4772 546 671 1161 5788 2471 4788 8730 8840
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9999 numbers
Test #40:
score: 0
Accepted
time: 429ms
memory: 89716kb
input:
6 9999 94 3215 3438 2008 3244 8706 7176 1750 4977 103 130 3735 7774 6630 1708 212 3398 773 779 4360 7230 5447 1126 5754 8546 146 514 5269 9997 7358 4805 5776 155 174 555 1931 6696 3426 1018 8341 4772 546 671 1161 5788 2471 4788 8730 8840
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9999 numbers
Test #41:
score: 0
Accepted
time: 389ms
memory: 89912kb
input:
6 9997 65 9999 10000 8691 8337 8744 8457 4158 9665 464 722 4817 8601 7188 6331 3029 7867 304 430 4984 9927 567 3710 1810 9242 372 579 6740 6782 3092 938 6823 2092 459 521 6721 860 7812 7130 5857 2982 65 240 966 7637 2438 2844 4737 2308
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9997 numbers
Test #42:
score: 0
Accepted
time: 464ms
memory: 89856kb
input:
6 9990 2 31 44 9672 646 206 9634 1166 1909 5 7 9746 247 598 9693 902 798 6 7 9030 1645 1315 9716 1316 1905 3 7 9257 522 165 9963 1849 521 7 7 9673 1202 110 9129 1425 1257 2594 3808 9577 1033 756 9344 1385 1759
output:
0.999340351119843214 0.998681137376331522 0.998022358482427519 0.997364014151283147 0.996706104096239574 0.996048628030827053 0.995391585668764817 0.994734976723960925 0.994078800910512174 0.993423057942703955 0.992767747535010121 0.992112869402092876 0.991458423258802653 0.990804408820177972 0.9901...
result:
ok 9990 numbers
Test #43:
score: 0
Accepted
time: 477ms
memory: 89664kb
input:
6 9993 2 40 41 9076 199 614 9936 674 468 3 7 9325 135 141 9267 560 1848 5 7 9507 1905 355 9991 126 1121 3 6 9432 729 1315 9278 588 375 4 5 9002 1811 1071 9595 1499 424 2543 4167 9903 1786 1633 9238 7 1015
output:
0.998414546074889388 0.996831605813927407 0.995251175231815388 0.993673250349573160 0.992097827194528998 0.990524901800309718 0.988954470206830608 0.987386528460285505 0.985821072613136802 0.984258098724105537 0.982697602858161486 0.981139581086513224 0.979584029486598218 0.978030944142073015 0.9764...
result:
ok 9993 numbers
Test #44:
score: 0
Accepted
time: 427ms
memory: 89876kb
input:
6 10000 1 33 50 9367 670 1222 9764 402 933 3 5 9802 1853 1795 9245 47 1485 6 10 9297 1497 1539 9820 636 397 4 8 9867 1158 1997 9609 116 1224 6 8 9754 1905 1568 9265 1001 652 10000 10000 9927 971 165 9481 802 1277
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 10000 numbers
Test #45:
score: 0
Accepted
time: 419ms
memory: 89700kb
input:
6 9997 1 27 35 9585 1452 543 9365 1873 1739 8 10 9591 1964 79 9253 1140 1105 12 12 9011 1599 1062 9040 1494 1038 5 7 9590 1072 344 9152 1863 79 8 12 9265 1462 1586 9490 62 1892 9999 10000 9845 751 1097 9753 266 1687
output:
0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.000000000000000000 0.0000...
result:
ok 9997 numbers
Test #46:
score: 0
Accepted
time: 383ms
memory: 89668kb
input:
6 10000 1 1 10000 10000 10000 1 10000 10000 1 1 10000 10000 10000 1 10000 10000 1 1 10000 10000 10000 1 10000 10000 1 1 10000 10000 10000 1 10000 10000 1 1 10000 10000 10000 1 10000 10000 1 1 10000 10000 10000 1 10000 10000 1
output:
0.999900009999000100 0.999800029996000500 0.999700059990001500 0.999600099980003500 0.999500149965006998 0.999400209944012597 0.999300279916020995 0.999200359880032992 0.999100449835049487 0.999000549780071480 0.998900659714100070 0.998800779636136456 0.998700909545181938 0.998601049440237914 0.9985...
result:
ok 10000 numbers