結果
問題 | No.201 yukicoderじゃんけん |
ユーザー | kuuso1 |
提出日時 | 2016-08-18 18:40:50 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 78 ms / 5,000 ms |
コード長 | 775 bytes |
コンパイル時間 | 5,875 ms |
コンパイル使用メモリ | 189,768 KB |
実行使用メモリ | 32,512 KB |
最終ジャッジ日時 | 2024-04-25 09:00:37 |
合計ジャッジ時間 | 8,420 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 69 ms
31,488 KB |
testcase_01 | AC | 70 ms
31,232 KB |
testcase_02 | AC | 75 ms
30,720 KB |
testcase_03 | AC | 62 ms
30,720 KB |
testcase_04 | AC | 60 ms
30,464 KB |
testcase_05 | AC | 72 ms
31,324 KB |
testcase_06 | AC | 72 ms
31,232 KB |
testcase_07 | AC | 74 ms
31,360 KB |
testcase_08 | AC | 77 ms
31,232 KB |
testcase_09 | AC | 77 ms
31,360 KB |
testcase_10 | AC | 60 ms
30,464 KB |
testcase_11 | AC | 73 ms
30,848 KB |
testcase_12 | AC | 68 ms
30,940 KB |
testcase_13 | AC | 70 ms
31,360 KB |
testcase_14 | AC | 61 ms
30,592 KB |
testcase_15 | AC | 64 ms
30,592 KB |
testcase_16 | AC | 78 ms
32,256 KB |
testcase_17 | AC | 75 ms
32,384 KB |
testcase_18 | AC | 72 ms
32,512 KB |
testcase_19 | AC | 73 ms
32,512 KB |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (201 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/
ソースコード
open System type Sol() = member this.Solve() = let A = stdin.ReadLine().Split(); let B = stdin.ReadLine().Split(); let comp s t = if Seq.length s > (Seq.length t) then 1 elif Seq.length s < (Seq.length t) then -1 else let st = Seq.zip s t |> Seq.toArray let res = Seq.tryFindIndex (fun p -> (fst p) <> (snd p) ) st if Option.isNone res then 0 else (if fst (st.[Option.get res]) > (snd (st.[Option.get res])) then 1 else -1) let ans = match (comp A.[1] B.[1]) with | 1 -> A.[0] | -1 -> B.[0] | _ -> "-1" printfn "%s" ans let mySol = new Sol() mySol.Solve()