sections between two houses will be shut, in case there are no instructors in the two of them. Any remaining sections will remain open.    It ought to be feasible to go between any two houses utilizing the underground sections that are open.    Educators ought not reside

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Correct answer will be upvoted else Multiple Downvoted. Computer science.

 

 

All sections between two houses will be shut, in case there are no instructors in the two of them. Any remaining sections will remain open. 

 

It ought to be feasible to go between any two houses utilizing the underground sections that are open. 

 

Educators ought not reside in houses, straightforwardly associated by an entry. 

 

Kindly assist the coordinators with picking the houses where educators will reside to fulfill the security necessities or establish that it is unimaginable. 

 

Input 

 

The originally input line contains a solitary integer t — the number of experiments (1≤t≤105). 

 

Each experiment begins with two integers n and m (2≤n≤3⋅105, 0≤m≤3⋅105) — the number of houses and the number of sections. 

 

Then, at that point, m lines follow, every one of them contains two integers u and v (1≤u,v≤n, u≠v), depicting a section between the houses u and v. It is ensured that there are no two sections associating similar pair of houses. 

 

The amount of qualities n over all experiments doesn't surpass 3⋅105, and the amount of qualities m over all experiments doesn't surpass 3⋅105. 

 

Output 

 

For each experiment, in case it is absolutely impossible to pick the ideal arrangement of houses, output "NO". In any case, output "YES", then, at that point, the all out number of houses picked, and afterward the records of the picked houses in subjective request.

 

 

 

 

 

Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY