18 solutions

  • 5
    @ 2025-3-28 17:36:39
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	int n,m;
    	cin>>n>>m;
    	cout<<n*m;
      return 0;
    }
    
    
    • 3
      @ 2026-3-25 18:14:56

      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

      • 2
        @ 2026-5-12 18:18:42

        给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外) 给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外)

      • 1
        @ 2026-5-12 18:16:36

        给我点赞的父母平安,天天发财,考上清北,绝对有效!!!(lqst2502除外)

        • 1
          @ 2026-4-1 16:58:47
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          #include<bits/stdc++.h>
          #define int long long
          using namespace std;
          const int N=1e6+10;
          int a[N],b[N];
          void solve() 
          {
              priority_queue<int,vector<int>,greater<int>>q;
          	int n,m,k;
          	cin>>n>>m>>k;
          	for(int i=1;i<=n;i++)
          	{
          		cin>>a[i];
          	}
          	for(int i=1;i<=n;i++)
          	{
          		if(k>0)
          		{
          			k--;
          			q.push(a[i]);
          		}
          		else
          		{
          			if(q.size()&&q.top()<a[i])
          			{
          				m-=q.top();
          				q.pop();
          				q.push(a[i]);
          			}
          			else
          			{
          				m-=a[i];
          			}
          		}
          		if(m<=0)
          		{
          			cout<<i-1<<endl;
          			return;
          		}
          	}
          	cout<<n<<endl;
          }
          signed main() 
          {
          	//freopen("spire.in","r",stdin);
          	//freopen("spire.out","w",stdout);
          	cin.tie(0)->sync_with_stdio(0);
          	cout.tie(0);
          	int T;
          	cin>>T;
          	while(T--)  
          	{
          		solve();
          	}
          	return 0;
          }
          
          
          
          • 1

            #include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; cout<<n*m; return 0; }

            • 0
              @ 2026-4-1 16:57:48
              #include<bits/stdc++.h>
              #define int long long
              using namespace std;
              const int N=1e6+10;
              int a[N],b[N];
              void solve() 
              {
                  priority_queue<int,vector<int>,greater<int>>q;
              	int n,m,k;
              	cin>>n>>m>>k;
              	for(int i=1;i<=n;i++)
              	{
              		cin>>a[i];
              	}
              	for(int i=1;i<=n;i++)
              	{
              		if(k>0)
              		{
              			k--;
              			q.push(a[i]);
              		}
              		else
              		{
              			if(q.size()&&q.top()<a[i])
              			{
              				m-=q.top();
              				q.pop();
              				q.push(a[i]);
              			}
              			else
              			{
              				m-=a[i];
              			}
              		}
              		if(m<=0)
              		{
              			cout<<i-1<<endl;
              			return;
              		}
              	}
              	cout<<n<<endl;
              }
              signed main() 
              {
              	//freopen("spire.in","r",stdin);
              	//freopen("spire.out","w",stdout);
              	cin.tie(0)->sync_with_stdio(0);
              	cout.tie(0);
              	int T;
              	cin>>T;
              	while(T--)  
              	{
              		solve();
              	}
              	return 0;
              }
              
              
              • -1
                @ 2026-3-26 11:30:38

                @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013) @ 刘丛睿 (lqst2025013)

                • -1
                  @ 2025-12-3 16:39:00

                  #include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; cout<<n*m; return 0; }

                  • -1
                    @ 2025-12-3 16:38:43

                    #include using namespace std; int main(){

                    return 0;
                    

                    }

                    • -1
                      @ 2025-12-1 17:12:49

                      #include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<a*b; return 0; }

                      • -1
                        @ 2025-11-5 10:54:12

                        这是一道非常简单的题,先看题目: 我们知道了同学数量和每个同学需要苹果的数量,那么:

                        • -1

                          #include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; cout<<n*m; return 0; }

                          • -4
                            @ 2026-1-14 18:00:10

                            You son of a bitch. 翻译:你是天才

                            • -4
                              @ 2025-12-23 17:38:53

                              #include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; cout<<n*m; return 0; }

                              • -4
                                @ 2025-12-23 17:38:44

                                #include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; cout<<n*m; return 0; }

                                • -4
                                  @ 2025-12-20 16:10:24

                                  #include<bits/stdc++.h> using namespace std; int n,m; int main(){ cin>>n>>m; cout<<n*m; return 0; }

                                  • -5
                                    @ 2025-11-19 17:51:34

                                    #include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; cout<<n*m; return 0; }

                                    • 1

                                    Information

                                    ID
                                    1324
                                    Time
                                    1000ms
                                    Memory
                                    256MiB
                                    Difficulty
                                    3
                                    Tags
                                    (None)
                                    # Submissions
                                    250
                                    Accepted
                                    126
                                    Uploaded By