Delta and Jumps SOLUTIONS ECAUG206

Delta and Jumps SOLUTIONS ECAUG206

There is a city with N numbered 0−N−1 shops. A market is where we can reach starting with one shop then onto the next utilizing some street. There are M streets in this city associating each interfacing any two shops. 

Locate the quantity of business sectors in the city. 

NOTE: A market having just one shop is likewise a legitimate market. 


First line will contain T, number of testcases. At that point the testcases follow. 

First line of Each Test Case is N,M, meaning the quantity of shops and the quantity of streets separately. 

Next M lines comprise of two numbers An and B meaning that there exists a street between Shop An and Shop B 


For each testcase, yield the quantity of business sectors. 






Test Input: 

5 3 

0 1 

2 3 

3 4 


Test Output: 




March Long Challenge 2021 Solutions

April Long Challenge 2021 Solutions

Codechef Long Challenge Solutions

February Long Challenge 2021

1. Frog Sort Solution Codechef

2. Chef and Meetings Solution Codechef

3. Maximise Function Solution Codechef

4. Highest Divisor Solution Codechef

5. Cut the Cake Challenge Solution Codechef

6. Dream and the Multiverse Solution Codechef

7. Cell Shell Solution Codechef

8. Multiple Games Solution Codechef

9. Another Tree with Number Theory Solution Codechef

10. XOR Sums Solution Codechef

11. Prime Game Solution CodeChef

12. Team Name Solution Codechef

January Long Challenge 2021

November Challenge 2020 SOLUTION CodeChef

October Lunchtime 2020 CodeChef SOLUTIONS


Related :

Related :

Leave a Comment

six + three =