#include <iostream>
#include <cstring>
using namespace std;
const int N = 10, M = 100;
double rw[N][M], jz[N][N], tk[N][M], cw[N][M], bsl[N][M];
int main() {
double t1[] = {0.00, 0.85, 0.70, 0.60, 0.50, 0.40, 0.30, 0.20, 0.00, 0.00, 0.00};
memcpy(tk[1], t1, sizeof t1);
// for (int i = 1; i <= 10; ++ i) cout << tk[1][i] << ' ';
double t2[] = {0.00, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.32, 0.32, 0.32, 0.32};
memcpy(bsl[1], t2, sizeof t2);
double t3[] = {0.00, 0.14, 0.18, 0.22, 0.26, 0.30, 0.30, 0.30, 0.30, 0.30, 0.30};
memcpy(bsl[2], t3, sizeof t3);
double ans = 0;
for (int T = 10; T <= 20; ++ T)
{
cout << "输出时间:" << T << "秒" << endl;
for (int t = 0; t <= 4; ++ t)
{
double res = 0;
for (int i = 1; i <= t; ++ i)
{
res += (1 + bsl[1][i]) * (1 + 0.84);
}
for (int i = 1; i <= T - t; ++ i)
{
if (i <= 10)
res += (1 + tk[1][i]) * (1 + bsl[1][i + t]) * (1 + 0.89) * (1 + 0.1);
else
res += (1 + tk[1][i]) * (1 + bsl[1][i + t]) * (1 + 0.84);
}
if (res > ans)
{
ans = res;
cout << "提前" << t << "秒 " << ans << endl;
}
}
}
return 0;
}