in Bubbleland group special programming force get secret job calculate number potentially infect people new unknown virus the state population n people day new information new contact people the job special programming force calculate contact k day give person the new virus incubation period k day time people consider noninfectious because new virus extremely dangerous government mark suspicious everybody direct indirect contact k day independently order contactsthis virus strange people can not durable immunityyou need help special programming force calculate number suspicious people give person number people contact give personThere 3 give input beginning n n population q number query k virus incubation time day each query type x y person x person y meet day x neq y z return number people contact z counting the end current day move day