Open Mahi1901 opened 2 years ago
Nikita Miraje CCOEW E&TC I will like to work on this issue....Can you assign this to me?
Shreya Amritkar Cummins College of Engineering for Women, Pune Dept- Information Technology 3rd year I would like to work on this issue, can u pls assign it to me?
I have assigned. Happy coding!
HEY!!! This is Aditi Sharma(SY-C) MKSSS's CCOEW Computer Engineering
I want to work on this issue Can you assign this to me?
Hi! @JMukta25 Can you please assign me this task. I am Akshat Tiwari of BIT Raipur from Computer Science Engineering Branch.
Hii I am utkarsha from CCOEW sy comp I want to work on this issue
college: Dr.D.Y.Patil Institute of Engineering & Technology Ambi name: Siddhesh Bhosale Branch: computer Engineering year: BE Final Year
You are given an undirected graph with N nodes (numbered 1 through N). For each valid i, the i-th node has a weight Wi . Also, for each pair of nodes i and j, there is an edge connecting these nodes if (j - i) !=(Wj - Wi). Find the number of connected components in this graph.
Input Format The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows. The first line of each test case contains a single integer N. The second line contains N space-separated integers W1, W2,…,WN. Output Format For each test case, print a single line containing one integer --- the number of connected components in the graph.
Constraints 1≤T≤10^4 1≤N≤10^5 |Wi|≤10^9 for each valid i the sum of N over all test cases does not exceed 2⋅10^5.
Sample 1: Input 2 2 1 2 2 2 1 Output 2 1