#include using namespace std; #define endl '\n' #define lfs cout<= (ll)(n); i--) using ll = long long; using ld = long double; const ll MOD = 1e9+7; //const ll MOD = 998244353; const ll INF = 1e18; using P = pair; template void chmin(T &a,T b){if(a>b)a=b;} template void chmax(T &a,T b){if(a void ans(bool x,T1 y,T2 z){if(x)cout< void debug(vector>&v,ll h,ll w){for(ll i=0;i&v,ll h,ll w){for(ll i=0;i void debug(vector&v,ll n){if(n!=0)cout< vector>vec(ll x, ll y, T w){ vector>v(x,vector(y,w));return v;} ll gcd(ll x,ll y){ll r;while(y!=0&&(r=x%y)!=0){x=y;y=r;}return y==0?x:y;} vectordx={1,0,-1,0,1,1,-1,-1}; vectordy={0,1,0,-1,1,-1,1,-1}; template vector make_v(size_t a,T b){return vector(a,b);} template auto make_v(size_t a,Ts... ts){ return vector(a,make_v(ts...)); } ostream &operator<<(ostream &os, pair&p){ return os << p.first << " " << p.second; } int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); ll res=0,buf=0; bool judge = true; ll n,x;cin>>n>>x; vectora(n); rep(i,0,n)cin>>a[i]; vectorb(n+1),b2(n+1); rep(i,0,n)b[i+1]=b[i]+a[i]; rep(i,0,n)b2[i+1]=b2[i]+a[n-i-1]; vectorlt(n,-INF),rt(n,-INF); rep(i,0,n)rep(j,0,n-i){ ll l=j,r=i+j; bool ret; if(i==0)ret=false; else if(b[r+1]-b[l]<=x)ret=true; else{ auto idxl=upper_bound(ALL(b),b[l]+x)-b.begin()-l; auto idxr=upper_bound(ALL(b2),b2[n-r-1]+x)-b2.begin()-(n-r-1); ret=(lt[l]>=i-idxr)|(rt[r]>=i-idxl); } cout<