結果

問題 No.548 国士無双
ユーザー natoriusan
提出日時 2023-08-07 19:17:24
言語 F#
(F# 4.0)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 489 bytes
コンパイル時間 14,145 ms
コンパイル使用メモリ 188,940 KB
実行使用メモリ 31,488 KB
最終ジャッジ日時 2024-11-08 00:19:13
合計ジャッジ時間 11,303 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (338 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/

ソースコード

diff #

let s = stdin.ReadLine ()

if s |> Seq.sort |> Seq.map string |> String.concat "" = "abcdefghijklm" then
    "abcdefghijklm" |> Seq.iter (printfn "%c")
else
    let count =
        [|
            for i in "abcdefghijklm" ->
                s |> Seq.filter ((=)i) |> Seq.length
        |]
    if count |> Array.filter ((=)1) |> Array.length = 11 then
        count |> Array.findIndex ((=)0) |> (Array.get <| Array.ofSeq "abcdefghijklm") |> printfn "%c"
    else
        printfn "Impossible"
0