結果
問題 | No.29 パワーアップ |
ユーザー | kuuso1 |
提出日時 | 2016-08-19 01:27:04 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 323 ms / 5,000 ms |
コード長 | 521 bytes |
コンパイル時間 | 6,344 ms |
コンパイル使用メモリ | 195,728 KB |
実行使用メモリ | 34,872 KB |
最終ジャッジ日時 | 2024-04-25 09:06:14 |
合計ジャッジ時間 | 14,500 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 323 ms
34,612 KB |
testcase_01 | AC | 313 ms
34,624 KB |
testcase_02 | AC | 313 ms
33,728 KB |
testcase_03 | AC | 309 ms
34,468 KB |
testcase_04 | AC | 312 ms
34,872 KB |
testcase_05 | AC | 307 ms
34,616 KB |
testcase_06 | AC | 311 ms
34,752 KB |
testcase_07 | AC | 313 ms
34,744 KB |
testcase_08 | AC | 311 ms
34,616 KB |
testcase_09 | AC | 311 ms
34,740 KB |
testcase_10 | AC | 314 ms
34,632 KB |
testcase_11 | AC | 309 ms
34,376 KB |
testcase_12 | AC | 312 ms
34,364 KB |
testcase_13 | AC | 315 ms
34,612 KB |
testcase_14 | AC | 306 ms
34,620 KB |
testcase_15 | AC | 312 ms
34,640 KB |
testcase_16 | AC | 314 ms
34,752 KB |
testcase_17 | AC | 312 ms
34,608 KB |
testcase_18 | AC | 313 ms
33,804 KB |
testcase_19 | AC | 315 ms
34,484 KB |
testcase_20 | AC | 313 ms
34,604 KB |
testcase_21 | AC | 315 ms
34,492 KB |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (226 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
open System type Sol() = member this.Solve() = let N = stdin.ReadLine() |> int let sum = Array.zeroCreate<int> 11 for i = 0 to (N-1) do let a = stdin.ReadLine().Split() |> Array.map int a |> Array.iter (fun x -> (sum.[x] <- sum.[x] + 1) ) let powerUp2 = (Array.sumBy (fun e -> e/2 ) sum ) let powerUp4 = (Array.sumBy (fun e -> e%2 ) sum ) / 4 (powerUp2 + powerUp4) |> printfn "%d" let mySol = new Sol() mySol.Solve()