結果

問題 No.482 あなたの名は
ユーザー taktak
提出日時 2018-04-23 23:59:55
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 352 bytes
コンパイル時間 4,485 ms
コンパイル使用メモリ 152,576 KB
実行使用メモリ 49,304 KB
最終ジャッジ日時 2023-09-09 21:40:45
合計ジャッジ時間 10,430 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
24,836 KB
testcase_01 AC 81 ms
22,792 KB
testcase_02 AC 81 ms
24,888 KB
testcase_03 AC 81 ms
24,852 KB
testcase_04 AC 80 ms
20,780 KB
testcase_05 AC 80 ms
22,748 KB
testcase_06 AC 81 ms
24,744 KB
testcase_07 WA -
testcase_08 AC 88 ms
23,148 KB
testcase_09 AC 88 ms
23,012 KB
testcase_10 AC 88 ms
22,952 KB
testcase_11 AC 89 ms
22,964 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 89 ms
23,036 KB
testcase_15 WA -
testcase_16 AC 206 ms
49,092 KB
testcase_17 AC 201 ms
47,160 KB
testcase_18 AC 201 ms
47,084 KB
testcase_19 WA -
testcase_20 AC 203 ms
49,168 KB
testcase_21 WA -
testcase_22 AC 204 ms
46,996 KB
testcase_23 WA -
testcase_24 AC 204 ms
49,116 KB
testcase_25 WA -
testcase_26 AC 204 ms
44,956 KB
testcase_27 WA -
testcase_28 AC 202 ms
49,088 KB
testcase_29 WA -
testcase_30 AC 79 ms
22,764 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let read() = stdin.ReadLine().Split() |> Array.map int64 
let N,K = let t = read() in t.[0],t.[1]
let D   = read()
 
D
|> Array.zip [|1L..N|]
|> Array.filter (fun tup -> fst tup <> snd tup)
|> Array.length
|> fun x -> max (x-1) 0 
|> int64
|> function | x when x<=K && (K-x)%2L=0L -> "YES" | _ -> "NO"
|> printfn "%s"                                   
0