样例过了,但是全wa!求救
查看原帖
样例过了,但是全wa!求救
1444047
xyds楼主2025/1/9 13:18
#include<iostream>
using namespace std;
int a[1001];
int main(){
	int n,m;
	cin>>n>>m;
	int b,c;
	for(int i=0;i<m;i++){
		cin>>b;
		a[b]=1;
	}
	for(int i=0;i<n;i++)
	if(a[i]==0){
	cout<<i<<" ";
	c=1;}
	if(c==0)
	cout<<n;
	return 0;
}

2025/1/9 13:18
加载中...