結果

問題 No.700 LOVE
ユーザー taktak
提出日時 2018-06-16 04:40:12
言語 F#
(F# 4.0)
結果
AC  
実行時間 116 ms / 2,000 ms
コード長 501 bytes
コンパイル時間 3,461 ms
コンパイル使用メモリ 153,800 KB
実行使用メモリ 29,096 KB
最終ジャッジ日時 2023-09-30 05:22:04
合計ジャッジ時間 6,585 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
26,964 KB
testcase_01 AC 112 ms
29,020 KB
testcase_02 AC 112 ms
26,980 KB
testcase_03 AC 110 ms
24,936 KB
testcase_04 AC 112 ms
27,000 KB
testcase_05 AC 112 ms
26,992 KB
testcase_06 AC 112 ms
27,116 KB
testcase_07 AC 112 ms
27,112 KB
testcase_08 AC 111 ms
27,164 KB
testcase_09 AC 112 ms
29,036 KB
testcase_10 AC 114 ms
29,096 KB
testcase_11 AC 114 ms
27,100 KB
testcase_12 AC 115 ms
27,204 KB
testcase_13 AC 113 ms
27,104 KB
testcase_14 AC 112 ms
28,884 KB
testcase_15 AC 115 ms
26,916 KB
testcase_16 AC 114 ms
26,940 KB
testcase_17 AC 116 ms
27,068 KB
testcase_18 AC 115 ms
26,988 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let hasLove (str:string) =
    let love = "LOVE".ToCharArray()
    str.ToCharArray()
    |> Array.windowed 4
    |> Array.where(fun x -> x=love)
    |> Array.length
    |> function | x when x > 0 -> true | _ -> false
    
let R() = stdin.ReadLine()     
let n,m = let t = R().Split() |> Array.map(int) in t.[0],t.[1]
let s = Array.init n (fun _ -> R())

s
|> Array.map(fun line -> hasLove line)
|> Array.where(fun x -> x)
|> Array.length
|> function | x when x > 0 -> "YES" | _ -> "NO"
|> printfn "%s"
0