Lisa is launching a company wide social network called CompNet. Each user in Complet is given a unique number f CompNet numbered from 1 to N. Here are the specifications of Compet
-In CompNet, i th user can make th user his friend without becoming
as in Facebook.
Ith user can make th user his friend only if
his friend himself, ie in Compet,
• Also one user should have no more and no less than one friend except user 1 who will have no friend
Lisa wants to find out whether one user is somehow linked to some other user Help Lisa do so
Input:
Each test case has 2 input lines.
The first line of each test case takes the number of users, N. The second line of each test case consists of N 1 friend of (i+1)th user
Output:
Print all possible connections starting from user 2 to user N with other users starting from 1 to The Cument User Number another user, that connection should not be printed
Print all possible connections between the users in the following format
422 means 4 is linked to 2 via 2 connections
Answers
Answered by
1
Answer:
Idk
Explanation:
which subject its hard to understand
Similar questions