{"problem":{"name":"Big Clique Everywhere","description":{"content":"You are given a simple undirected graph $G$ with $N$ vertices numbered $1$ to $N$. $G$ has $M$ edges and the $i$\\-th edge connects vertices $A_i$ and $B_i$. Check if $G$ satisfies the following condit","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":4000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"agc067_a"},"statements":[{"statement_type":"Markdown","content":"You are given a simple undirected graph $G$ with $N$ vertices numbered $1$ to $N$. $G$ has $M$ edges and the $i$\\-th edge connects vertices $A_i$ and $B_i$.\nCheck if $G$ satisfies the following condition:\n\n*   For every subset $X$ of the vertex set ${1,2,\\cdots,N}$, there exists a subset $Y$ of $X$ such that $|Y|\\ge \\frac{|X|}{2}$ and $Y$ forms a clique.\n\nYou have $T$ testcases to solve.\n\n## Constraints\n\n*   $1\\le T \\le 10^3$\n*   $1\\le N \\le 10^5$\n*   $0 \\le M \\le 10^6$\n*   $1 \\le A_i,B_i \\le N$\n*   The given graph doesn't contain self-loops or multiple edges.\n*   The sum of $N$ across the test cases in a single input is at most $10^5$.\n*   The sum of $M$ across the test cases in a single input is at most $10^6$.\n*   All input values are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$T$\n$case_1$\n$case_2$\n$\\vdots$\n$case_T$\n\nEach test case is given in the following format:\n\n$N$ $M$\n$A_1$ $B_1$\n$A_2$ $B_2$\n$\\vdots$\n$A_M$ $B_M$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"agc067_a","tags":[],"sample_group":[["4\n3 3\n1 2\n1 3\n2 3\n3 2\n1 2\n1 3\n3 1\n1 2\n3 0","Yes\nYes\nYes\nNo\n\nFor the $1$\\-st test case, $G$ satisfies the condition. In this case, every subset $X$ is a clique, so we can just let $Y=X$.\nFor the $2$\\-nd test case, $G$ satisfies the condition. For example, for $X={2,3}$, we can let $Y={2}$.\nFor the $4$\\-th test case, $G$ doesn't satisfy the condition. If we let $X={1,2,3}$, no subset $Y$ of $X$ satisfies the condition."]],"created_at":"2026-03-03 11:01:14"}}