結果
| 問題 | No.531 エヌスクミ島の平和協定 |
| コンテスト | |
| ユーザー |
tak
|
| 提出日時 | 2018-04-09 08:04:10 |
| 言語 | F# (F# 10.0) |
| 結果 |
AC
|
| 実行時間 | 212 ms / 2,000 ms |
| コード長 | 622 bytes |
| 記録 | |
| コンパイル時間 | 16,839 ms |
| コンパイル使用メモリ | 210,524 KB |
| 実行使用メモリ | 36,816 KB |
| 最終ジャッジ日時 | 2026-03-06 04:49:57 |
| 合計ジャッジ時間 | 14,357 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 37 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (336 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
open System
open System.Collections.Generic
[<AutoOpen>]
module hoge =
let inline dump e =
#if DEBUG
printfn "%A" e;
#endif
e
let read() = stdin.ReadLine()
let reads() = read().Split()
let readToEnd() = stdin.ReadToEnd()
let lines(s:string) = s.Split([|stdout.NewLine|], StringSplitOptions.RemoveEmptyEntries)
let (|ODD|EVE|) n =
match n%2 with
| 0 -> EVE
| _ -> ODD
let n,m = let t = reads() |> Array.map(int) in t.[0],t.[1]
if n<=m then 1
else
match n with
| ODD -> -1
| EVE ->
if n/2<=m then 2
else -1
|> printfn "%i"
tak