using namespace std; #include #define BEGIN ios_base::sync_with_stdio(0);cin.tie(0); #define END return EXIT_SUCCESS; #define FOR(I,A,B) for(int (I)=(A);(I)<(B);++(I)) #define ALL(C) (C).begin(),(C).end() int main(int argc,char**argv) { BEGIN int N,M;cin>>N>>M; vectorC(N);FOR(i,0,N)cin>>C[i]; sort(ALL(C)); int S=0,A=0; FOR(i,0,N) { S+=C[i]; if(S==M){A=i+1;break;} if(S>M){A=i;break;} } cout<