0 赞
题解:P6959 [NEERC 2017] Hack
由于运行时间是 bits+1 相乘,所以我们定义 len(x)=bits(x)+1,运行时间就是 len 相乘了。 考虑如何算 d?首先,考虑能不能算出 d 的 popcount。设 d 的 popcount 为 s,那么一共会进行 s 次「他乘」(r = r * a),进行 6…
题解
存档题解 1 篇按获赞排序
在洛谷打开由于运行时间是 bits+1 相乘,所以我们定义 len(x)=bits(x)+1,运行时间就是 len 相乘了。 考虑如何算 d?首先,考虑能不能算出 d 的 popcount。设 d 的 popcount 为 s,那么一共会进行 s 次「他乘」(r = r * a),进行 6…