High school math problem! Help!
Every factory must be visited, so there must be two classes of factories. First choose two classes, that is, 4C2=6. However, since Party A and Party B cannot visit the same factory, * * * has five options. After selection, it is equivalent to three groups of people and three factories, with 3P3=6, so one * * has 5 * * 6 = 30 methods.