C. Choosing Balls

Description

输入 n(1≤n≤1e5) q(1≤q≤500) 和长为 n 的数组 v(-1e5≤v[i]≤1e5),长为 n 的数组 c(1≤c[i]≤n)。
有 n 个球排成一排,第 i 个球的价值为 v[i],颜色为 c[i]。

Read more »
0%