結果
問題 | No.26 シャッフルゲーム |
ユーザー | regerege |
提出日時 | 2016-01-09 17:52:56 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 607 bytes |
コンパイル時間 | 7,543 ms |
コンパイル使用メモリ | 190,236 KB |
実行使用メモリ | 33,664 KB |
最終ジャッジ日時 | 2023-10-19 16:56:17 |
合計ジャッジ時間 | 9,138 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 110 ms
33,612 KB |
testcase_01 | AC | 109 ms
33,612 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (238 ms)。 MSBuild のバージョン 17.7.3+8ec440e68 (.NET) main -> /home/judge/data/code/bin/Release/net7.0/main.dll main -> /home/judge/data/code/bin/Release/net7.0/publish/
ソースコード
let ``No.26 シャッフルゲーム`` () = let N = int <| stdin.ReadLine() let M = int <| stdin.ReadLine() let rec f s bit = if s <= 0 then if bit = 4 then 3 else bit else let arr = Array.map int <| stdin.ReadLine().Split(' ') let n = arr.[1] - arr.[0] let a,b2 = min arr.[0] arr.[1],max arr.[0] arr.[1] let b = 1 <<< (b2 - 1) let c = (((bit&&&b)>>>n)|||((bit&&&a)<<<n)) let d = if c = 0 then bit else c f (s-1) d f M <| 1 <<< N - 1 |> printfn "%A" ``No.26 シャッフルゲーム`` ()