結果
| 問題 | No.1563 Same Degree |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-28 23:34:52 |
| 言語 | Lua (LuaJit 2.1.1767980792) |
| 結果 |
AC
|
| 実行時間 | 36 ms / 2,000 ms |
| コード長 | 424 bytes |
| 記録 | |
| コンパイル時間 | 263 ms |
| コンパイル使用メモリ | 8,104 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-12 02:36:50 |
| 合計ジャッジ時間 | 1,415 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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