求调
查看原帖
求调
1147171
chenhaoyu_ACAC楼主2024/9/17 17:00
#include<bits/stdc++.h>
#define int long long
namespace quick_read{
	inline int read(){
		int x=0,f=1;
		char ch=getchar();
		while(ch<'0'||ch>'9'){if(ch=='-') f=-1;ch=getchar();}
		while(ch>='0'&&ch<='9'){x=(x<<3)+(x<<1)+(ch^48);ch=getchar();}
		return x*f;
	}
	inline int max(int a,int b){return a>b?a:b;}
	inline int min(int a,int b){return a<b?a:b;}
}
using namespace std;
using namespace quick_read;
typedef unsigned long long ULL;
typedef pair<int,int> PII;
typedef array<int,2> AR2;
#define fi first
#define se second
const int N=2e5+10,M=2000+10,inf=1e15,mod=1e9+7;
const int dx[]={},dy[]={};
int n,m;
int L,R,a[N];
signed main(){
	ios::sync_with_stdio(false);
	cin.tie(nullptr),cout.tie(nullptr);
	cin>>n>>m;
	while(m--){
		cin>>L>>R;
		a[L]++,a[R+1]--;
	}
	for(int i=1;i<=n;i++) a[i]+=a[i-1],cout<<abs(a[i])%2;
	return 0;
}
2024/9/17 17:00
加载中...