help
查看原帖
help
1419270
DaShun66楼主2025/1/12 18:19
#include<bits/stdc++.h>
using namespace std;
int n,m,x;
bool flag;
int main(){
	cin>>n>>m;
	bool a[n]={false};
	for(int i=0;i<m;i++){
		cin>>x;
		a[x]=true;
	}
	for(int j=0;j<m;j++){
		if(a[j]==false){
			if(!flag){
				cout<<j;
				flag=true;
			}else{
				cout<<" "<<j;
			}
		}
	}
}
2025/1/12 18:19
加载中...