直接存映射 #include <iostream> using namespace std; const int N = 210; int a[N], b[N]; int main() { int n, m; scanf("%d%d", &n, &m); for (int i = 0; i < n; ++i) { scanf("%d", &a[i]); ++b[a[i]]; } for (int i = 0; i < n; ++i) { i...