Question: Explanation: write the program in c++ Pandemic!!! It is very important to stay at home during pandemic! However, some people have urgent face-to- face meetings.

Explanation:


write the program in c++
Pandemic!!! It is very important to stay at home during pandemic! However, some people have urgent face-to- face meetings. Therefore, some rules are accepted for one-to-one meetings. You can meet with someone only once a week on a predefined weekday. For example, people A and people B can meet only on Mondays. An undirected weighted graph is given where the nodes represent different people and the edges between nodes represent on which weekday they can meet. If a person catches the virus, he/she can infect other people starting from the same day. If S-th person catch the virus on Monday, you should find after how many days F-th person will catch the virus. Input: First line contains three integer N - the number of all people, S - person who get the virus on the first day (On Monday) and you should find after how many days F-person will catch the virus. Each of the next N lines will contains three integers, a, b and d. It shows a-th and b-th person meets on d- th day of week Output: Print the number of days required for the F-th person to get the virus after the s-th person catches it. Constraints: O
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
