//https://www.acmicpc.net/problem/2606 #include #include using namespace std;int N, M, cnt;bool network[101][101];bool visited[101]; void input(){ cin >> N >> M; int a,b; for(int i=0; i> a >> b; network[a][b]=network[b][a]=1; }} void bfs(){ queue q; q.push(1); visited[1]=1; while(!q.empty()){ int now=q.front(); q.pop(); for(int i=2; i
//https://www.acmicpc.net/problem/1010 #include using namespace std;int dp[31][31]; int main(){ int t; cin >> t; while(t-->0){ int n, m; cin >> n >> m; for(int i=1; i