首先计算每个数的个数 cnt。
single[i] 为每个模 m 的数为 i 的数中,数量为奇数的个数
all[i] 为每个模 m 的数的偶数部分的数的个数。
然后先拿 single[i] 和 single[m−i] 匹配。\
小红有 n 个数,第 i 个数为 xi ,他想将这些数两两配对。
现在小红给定了两个数配对的条件:
By signing up a CodeFun2000 universal account, you can submit code and join discussions in all online judging services provided by us.