#agc003e. [agc003_e]Sequential operations on Sequence

[agc003_e]Sequential operations on Sequence

一串数,初始为 1n1\sim n,现在给 QQ 个操作,每次操作把数组长度变为 qiq_i,新增的数为上一个操作后的数组的重复。问 QQ 次操作后 1n1\sim n 每个数出现了多少次。