結果
| 問題 | No.123 カードシャッフル |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-06-17 23:56:25 |
| 言語 | F# (F# 10.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 2,457 ms / 5,000 ms |
| + 867µs | |
| コード長 | 358 bytes |
| 記録 | |
| コンパイル時間 | 4,995 ms |
| コンパイル使用メモリ | 214,728 KB |
| 実行使用メモリ | 82,816 KB |
| 最終ジャッジ日時 | 2026-09-12 18:18:05 |
| 合計ジャッジ時間 | 16,136 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 10 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (170 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
let N = stdin.ReadLine().Split(' ').[0] |> int
let ss = stdin.ReadLine().Split(' ') |> Seq.map int |> Seq.toList
let rec ml i p l = function
| x::xs -> ml i (p+1) (if i = p then x::l else l@[x]) xs
| _ -> l
let rec f c = function
| s::ss ->
if s = 1 then f c ss
else f (ml s 1 [] c) ss
| _ -> c.[0]
f [1..N] ss
|> printfn "%d"