結果
問題 | No.870 無敵囲い |
ユーザー |
|
提出日時 | 2020-06-14 14:41:28 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 2 ms / 300 ms |
コード長 | 573 bytes |
コンパイル時間 | 1,802 ms |
コンパイル使用メモリ | 21,448 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-29 06:41:54 |
合計ジャッジ時間 | 997 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
Scanf.scanf "%d" (fun n ->let rec loop i ax ay bx by cx cy =if i = n then (if (ax, ay, bx, by, cx, cy) = (5, 8, 4, 8, 6, 8) then "YES" else "NO") elseScanf.scanf " %d %d %d %d" (fun x1 y1 x2 y2 ->if ax = x1 && ay = y1 then loop (i + 1) x2 y2 bx by cx cy elseif bx = x1 && by = y1 then loop (i + 1) ax ay x2 y2 cx cy elseif cx = x1 && cy = y1 then loop (i + 1) ax ay bx by x2 y2 elseloop (i + 1) ax ay bx by cx cy)inloop 0 2 8 3 9 7 9 |> print_endline)