一直RE,谁帮我看看
查看原帖
一直RE,谁帮我看看
1059049
Bramble_Marshall楼主2023/11/21 18:53
#include <bits/stdc++.h>

using namespace std;

const int N = 1004;
int num[N];

int main() {
	memset(num, 0, sizeof(num));
	int m, n, tem;
	scanf("%d%d", &n, &m);
	for (int i = 1; i <= m; i++) {
		scanf("%d", &tem);
		num[tem]++;
	}
	for (int i = 1; i <= N; i++)
		for (int j = 0; j < num[i]; j++)
			printf("%d ", i);
	return 0;
}
2023/11/21 18:53
加载中...