結果
問題 |
No.482 あなたの名は
|
ユーザー |
![]() |
提出日時 | 2018-04-23 23:59:55 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 352 bytes |
コンパイル時間 | 9,093 ms |
コンパイル使用メモリ | 192,280 KB |
実行使用メモリ | 59,408 KB |
最終ジャッジ日時 | 2024-06-27 14:10:45 |
合計ジャッジ時間 | 12,594 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 WA * 10 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (263 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/
ソースコード
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"