結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー kuuso1kuuso1
提出日時 2018-04-27 23:19:24
言語 F#
(.NET 7)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 924 bytes
コンパイル時間 3,816 ms
コンパイル使用メモリ 172,136 KB
実行使用メモリ 25,000 KB
最終ジャッジ日時 2023-09-10 06:48:37
合計ジャッジ時間 7,435 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
23,024 KB
testcase_01 AC 85 ms
25,000 KB
testcase_02 AC 85 ms
24,952 KB
testcase_03 AC 84 ms
20,908 KB
testcase_04 AC 85 ms
22,832 KB
testcase_05 AC 84 ms
20,852 KB
testcase_06 AC 84 ms
24,960 KB
testcase_07 AC 85 ms
22,812 KB
testcase_08 AC 89 ms
22,888 KB
testcase_09 AC 91 ms
20,864 KB
testcase_10 AC 90 ms
20,796 KB
testcase_11 AC 94 ms
22,824 KB
testcase_12 AC 94 ms
20,964 KB
testcase_13 AC 95 ms
22,824 KB
testcase_14 AC 101 ms
22,936 KB
testcase_15 AC 94 ms
24,904 KB
testcase_16 AC 101 ms
22,940 KB
testcase_17 AC 96 ms
22,848 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

/home/judge/data/code/Main.fs(9,13): warning FS0025: Incomplete pattern matches on this expression. For example, the value '[|_; _; _; _|]' may indicate a case not covered by the pattern(s).

ソースコード

diff #

open System

let ri () = stdin.ReadLine() |> int
let ria () = stdin.ReadLine().Split() |> Array.map int

type Sol() =
    member this.Solve() = 
        
        let [| N; xLB; xRB |] = ria()
        let Enemy : (int[] []) = Array.zeroCreate N
        for i in 0..(N-1) do Enemy.[i] <- ria()
        
        let mutable maxv : int[] = Array.zeroCreate 1281
        let mutable midx : int[] = Array.init 1281 (fun i -> -1)
        
        for i in 0..(N-1) do
          for b in (max xLB Enemy.[i].[0])..(min xRB Enemy.[i].[2]) do
            if maxv.[b] < Enemy.[i].[3] then 
              maxv.[b] <- Enemy.[i].[3]
              midx.[b] <- i
        
        let ans = Array.init N (fun i -> 0)
        for i in 0..1280 do
          if midx.[i] <> -1 then ans.[midx.[i]] <- 1
        
        ans |> Array.iter (fun n -> printfn "%d" n)
        
        
        
        
        ()
let mySol = new Sol()
mySol.Solve()
0