結果
| 問題 | No.396 クラス替え |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-08-15 01:02:03 |
| 言語 | F# (F# 10.0) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 1,000 ms |
| コード長 | 466 bytes |
| 記録 | |
| コンパイル時間 | 10,406 ms |
| コンパイル使用メモリ | 207,232 KB |
| 実行使用メモリ | 32,384 KB |
| 最終ジャッジ日時 | 2026-05-12 08:46:31 |
| 合計ジャッジ時間 | 12,312 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / tmp-judge_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (284 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
let doIt () =
let N, M = stdin.ReadLine () |> fun line -> line.Split () |> fun arr -> (int arr.[0], int arr.[1])
let X, Y = stdin.ReadLine () |> fun line -> line.Split () |> fun arr -> (int arr.[0], int arr.[1])
let getClass num =
let n1, n2 = (num - 1) % M, ((num - 1) / M) % 2
if n2 = 0 then n1 else M - n1 - 1
let c1, c2 = getClass X, getClass Y
c1 = c2 |> (function | true -> "YES" | false -> "NO") |> printfn "%s"
doIt ()