Codeforces Round #584 - Dasha Code Championship - Elimination Round (rated, open for everyone, Div. 1
An个数字,如果是倍数关系,那么就是一组的,求最少要几组#include#include#include#definerep(i,a,n)for(inti=a;i#include#include#include#definerep(i,a,n)for(inti=a;i=b[j]&&(i-b[j])%a[j]==0)f[j]^=1;//改变状态,f[i]记录每个时刻灯的情况,如果需要改变,就取异或0