//template--------------------// #include using namespace std; #define gc getchar//_unlocked #define pb push_back #define mp make_pair #define fi first #define se second #define ll long long int #define rep(i,s,e) for(i=s;i()); #define tr(container, it) for(typeof(container.begin()) it = container.begin(); it != container.end(); it++) #define present(c,x) ((c).find(x) != (c).end()) #define vpresent(container, element) (find(all(container),element) != container.end()) #define DBG cerr << "debug here" << endl; #define DBGV(vari) cerr << #vari<< " = "<< (vari) < vi; typedef vector vl; typedef pair pii; typedef pair pll; typedef vector vii; typedef vector vll; ll gcd(ll a,ll b){if(b==0)return a;return gcd(b,a%b);} ll lcm(ll a,ll b){return((a*b)/gcd(a,b));} //fast-IO void scanint(int &x){register int c = gc();x = 0;int neg = 0;for(;((c<48 || c>57) && c != '-');c = gc());if(c=='-') {neg=1;c=gc();} for(;c>47 && c<58;c = gc()) {x = (x<<1) + (x<<3) + c - 48;}if(neg) x=-x;} // template---------------------------// int cost[1005][1005]; int main(){ ios_base::sync_with_stdio(false); int n,c,i,j,k; cin>>n>>c; int ar[n]; rep(i,0,n){ cin>>ar[i]; } for(i=0;i= c){ for(k=i;k<=j;k++){ res[k] = max(res[k],(j-i+1)); } } } } rep(i,0,n)cout<