結果

問題 No.959 tree and fire
ユーザー 東前頭十一枚目東前頭十一枚目
提出日時 2019-12-26 18:56:01
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 1,586 ms
コンパイル使用メモリ 165,132 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-04 17:57:48
合計ジャッジ時間 3,053 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 46 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
	int64_t n, m; cin >> n >> m;
	double p; cin >> p;
	double ans = 0;
	ans += 4 * p * pow(p, 2);
	ans += (2 * (n - 2) + 2 * (m - 2)) * p * pow(p, 3);
	ans += (n * m - (2 * n + 2 * m - 4)) * p * pow(p, 4);
	printf("%.15f\n", ans);
	return 0;
}
0