結果
問題 | No.870 無敵囲い |
ユーザー |
👑 |
提出日時 | 2019-08-30 21:27:37 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 300 ms |
コード長 | 430 bytes |
コンパイル時間 | 369 ms |
コンパイル使用メモリ | 5,504 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-29 06:14:06 |
合計ジャッジ時間 | 1,115 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
local n = io.read("*n")local t = {}for i = 1, n dolocal a, b = io.read("*n", "*n")local c, d = io.read("*n", "*n")local i1 = (a - 1) * 9 + blocal i2 = (c - 1) * 9 + dlocal found = falsefor k, v in pairs(t) doif v == i1 thenfound = truet[k] = i2breakendendif not found then t[i1] = i2 endendlocal r = t[17] == 44 and t[27] == 35 and t[63] == 53print(r and "YES" or "NO")