結果
| 問題 | No.1563 Same Degree | 
| コンテスト | |
| ユーザー | 👑 | 
| 提出日時 | 2021-06-28 23:34:52 | 
| 言語 | Lua (LuaJit 2.1.1734355927) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 66 ms / 2,000 ms | 
| コード長 | 424 bytes | 
| コンパイル時間 | 316 ms | 
| コンパイル使用メモリ | 5,376 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-25 17:22:09 | 
| 合計ジャッジ時間 | 2,423 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 15 | 
ソースコード
local function solve()
  local n, m = io.read("*n", "*n")
  local c = {}
  for i = 1, n do
    c[i] = 0
  end
  for i = 1, m do
    local a, b = io.read("*n", "*n")
    c[a] = c[a] + 1
    c[b] = c[b] + 1
  end
  local box = {}
  for i = 1, n do
    local v = c[i]
    if box[v] then return true end
    box[v] = true
  end
  return false
end
local q = io.read("*n")
for iq = 1, q do
  print(solve() and "Yes" or "No")
end
            
            
            
        