結果

問題 No.870 無敵囲い
コンテスト
ユーザー kou_kkk
提出日時 2024-05-04 15:05:52
言語 Nim
(2.2.8)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 300 ms
コード長 344 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,007 ms
コンパイル使用メモリ 68,112 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-05-20 15:06:35
合計ジャッジ時間 4,027 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sequtils, strutils

var
  ps = { 2:8, 3:9, 7:9 }
let
  n = parseInt readLine stdin
for _ in 0 ..< n:
  let
    xs = stdin.readLine.split.map parseInt
    x1 = xs[0]
    y1 = xs[1]
    x2 = xs[2]
    y2 = xs[3]
  for i in 0 .. 2:
    if ps[i] == (x1, y1):
      ps[i] = (x2, y2)

if ps == { 5:8, 4:8, 6:8 }:
  echo "YES"
else:
  echo "NO"
0