题意:SARS隔离,如果是一群人里面有一个可疑,就都要隔离。
and initially student 0 is recognized as a suspect in all the cases. //0就是首先被隔离的男人
貌似是赤裸裸的并查集。
代码:
题意:SARS隔离,如果是一群人里面有一个可疑,就都要隔离。
and initially student 0 is recognized as a suspect in all the cases. //0就是首先被隔离的男人
貌似是赤裸裸的并查集。
代码: