Created
January 14, 2019 15:59
-
-
Save jinnatul/125a27640cb8437c5d52c3dfd88fc548 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
/// Typedef | |
typedef long long ll; | |
#define sc1(a) scanf("%lld",&a) | |
#define sc2(a,b) scanf("%lld %lld",&a,&b) | |
#define pf1(a) printf("%lld\n",a) | |
#define pf2(a,b) printf("%lld %lld\n",a,b) | |
#define mx 10000007 | |
#define mod 100000007 | |
#define PI acos(-1.0) | |
int dr[] = {-2,-2,-1,-1,1,1,2,2}; | |
int dc[] = {-1,1,-2,2,-2,2,-1,1}; | |
ll cnt[mx], total[mx]; | |
int main() | |
{ | |
ll num, m, tc = 1; | |
sc2(num, m); | |
ll arr[m]; | |
for(ll i = 0; i < m; i++) { | |
sc1(arr[i]); | |
cnt[arr[i]]++; | |
total[cnt[arr[i]]]++; | |
if(total[tc] == num){ | |
cout << 1; | |
tc++; | |
} | |
else cout << 0; | |
} | |
cout << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment