結果
| 問題 | No.959 tree and fire |
| コンテスト | |
| ユーザー |
kk_1634_s
|
| 提出日時 | 2019-12-27 15:27:14 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 239 bytes |
| 記録 | |
| コンパイル時間 | 346 ms |
| コンパイル使用メモリ | 20,568 KB |
| 実行使用メモリ | 15,452 KB |
| 最終ジャッジ日時 | 2026-04-24 13:45:23 |
| 合計ジャッジ時間 | 7,594 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 54 |
ソースコード
n,m=map(int,input().split())
p=float(input())
if n==1 and m==1:
print(1-p)
elif min(n,m)-1:
print(2 * ((1-p)**2) + (max(n,m)-2) * ((1-p)**3))
else:
print(4 * ((1-p)**3) + (n+n+m+m-8) * ((1-p)**4) + (n*m-(n+n+m+m-4))*((1-p)**4))
kk_1634_s