022c专题

AtCoder Grand Contest 022C Remainder Games

题目大意:给你n个数ai,要求你将每个数mod一些数,使ai变为bi。在进行变换时,若ai与aj都要mod数p,只算一次p。求最后可得到的Σ2^pi最小值。 英文题面: Problem Statement Aoki is playing with a sequence of numbers a1,a2,…,aN. Every second, he performs the followi