菜鸟求救
查看原帖
菜鸟求救
763375
a_tianfy楼主2022/11/5 09:53
#include<iostream>
using namespace std;
int main(){
	int a,b,c;
	cin>>a>>b;
	a++;
	bool e[a];
	for(int j=0;j<a;j++){
		e[j]=0;
	}
	for(int i=0;i<b;i++){
		cin>>c;
		e[c]=!e[c];
		c++;
		e[c]=!e[c];
		c--;
		c--;
		e[c]=!e[c];
	}
	e[a]=e[0];
	for(int j=1;j<a;j++){
		cout<<e[j]<<" ";
	}
	return 0;
}

50分都不到

2022/11/5 09:53
加载中...