UOJ Logo

NOI.AC

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#213395#2053. 地雷爆炸WZRYWZWYCompile Error//Python3462b2024-11-11 21:24:132024-11-11 23:07:00

answer

#include <bits/stdc++.h> // https://blog.csdn.net/adfa4535/article/details/101184862
using namespace std;

double p[3005], f[3005];

int main() {
	int n, m, k; cin >> n >> m;
	k = n;
	double ans = 0;
	for (int i = 0; i < n; i++) cin >> p[i];
	f[0] = 0; f[1] = p[0];
	for (int i = 2; i <= m; i++) {
		f[i] = p[0];
		for (int j = 1; j < n; j++) f[i] += p[j] * pow(f[i - 1], j);
	}
	printf("%.4lf", f[m]);
}

//太菜了,WZRYWZWY只会超原题 

Details

  File "answer.code", line 2
    using namespace std;
                  ^
SyntaxError: invalid syntax