結果

問題 No.959 tree and fire
ユーザー LeonardoneLeonardone
提出日時 2019-12-22 05:34:45
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 365 bytes
コンパイル時間 6,636 ms
コンパイル使用メモリ 162,512 KB
実行使用メモリ 7,952 KB
最終ジャッジ日時 2023-10-11 16:35:04
合計ジャッジ時間 7,608 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,804 KB
testcase_01 AC 2 ms
7,588 KB
testcase_02 AC 3 ms
7,548 KB
testcase_03 AC 3 ms
7,568 KB
testcase_04 AC 2 ms
7,592 KB
testcase_05 AC 2 ms
7,788 KB
testcase_06 AC 3 ms
7,640 KB
testcase_07 AC 3 ms
7,804 KB
testcase_08 AC 3 ms
7,592 KB
testcase_09 AC 3 ms
7,688 KB
testcase_10 AC 3 ms
7,692 KB
testcase_11 AC 3 ms
7,572 KB
testcase_12 AC 3 ms
7,716 KB
testcase_13 AC 3 ms
7,640 KB
testcase_14 AC 3 ms
7,744 KB
testcase_15 AC 3 ms
7,868 KB
testcase_16 AC 2 ms
7,580 KB
testcase_17 AC 3 ms
7,624 KB
testcase_18 AC 3 ms
7,720 KB
testcase_19 AC 2 ms
7,564 KB
testcase_20 AC 3 ms
7,580 KB
testcase_21 AC 3 ms
7,632 KB
testcase_22 AC 3 ms
7,640 KB
testcase_23 AC 3 ms
7,628 KB
testcase_24 AC 3 ms
7,652 KB
testcase_25 AC 3 ms
7,596 KB
testcase_26 AC 3 ms
7,568 KB
testcase_27 AC 3 ms
7,744 KB
testcase_28 AC 3 ms
7,600 KB
testcase_29 AC 3 ms
7,648 KB
testcase_30 AC 3 ms
7,752 KB
testcase_31 AC 2 ms
7,652 KB
testcase_32 AC 3 ms
7,744 KB
testcase_33 AC 3 ms
7,728 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 3 ms
7,564 KB
testcase_37 AC 2 ms
7,820 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 AC 3 ms
7,724 KB
testcase_41 AC 3 ms
7,740 KB
testcase_42 AC 3 ms
7,576 KB
testcase_43 AC 3 ms
7,648 KB
testcase_44 AC 3 ms
7,580 KB
testcase_45 AC 3 ms
7,692 KB
testcase_46 AC 3 ms
7,740 KB
testcase_47 AC 3 ms
7,796 KB
testcase_48 AC 3 ms
7,688 KB
testcase_49 AC 3 ms
7,636 KB
testcase_50 AC 3 ms
7,684 KB
testcase_51 AC 2 ms
7,800 KB
testcase_52 AC 3 ms
7,560 KB
testcase_53 AC 3 ms
7,596 KB
testcase_54 AC 3 ms
7,640 KB
testcase_55 AC 3 ms
7,732 KB
testcase_56 AC 3 ms
7,808 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

-- Try yukicoder
-- author: Leonardone @ NEETSDKASU

import Data.Fixed
import Data.List (sort)

main = interact $ show . solve . sort . map read . words

solve :: [Pico] -> Pico

solve [p, a, b]
    | b == 1    = p
    | a == 1    = p * p * (2 + p * (b - 2))
    | otherwise = p * p * p * (4 + p * (2 * (a - 2 + b - 2) + p * (a - 2) * (b - 2)))

solve _ = undefined
0