Language: C++

#include<bits/stdc++.h>
#define endl "\n"
#define ll long long
#define eb emplace_back
#define sz(x) ((int)(x).size())
#define mo 100000000
using namespace std;
//Conditional Operator (condition?true part:false part) eg : cout<<(y<=3?"YES":"NO")<<endl;
ll getmul(ll n){ll int k{0};while(n>0){k+=n%10;n=n/10;}return k;}//Sum OF n DIGITS
int main(){
     ios_base::sync_with_stdio(false);
     cin.tie(NULL);
     ll int n,m,k;
     cin>>n>>m>>k;
     ll int a[n],b[m],cn{0};
     for(int i=0;i<n;i++)
        cin>>a[i];
     for(int i=0;i<m;i++)
         cin>>b[i];
     vector<ll int>arr;
     int i{0},j{0};
     for(int o=0;o<n+m;o++){
         if(i<n&&j<m&&a[i]<=b[j]){
             arr.eb(a[i]);
             i++;
             continue;
         }
         else if(i<n&&j<m&&a[i]>=b[j]){
             arr.eb(b[j]);
             j++;
             continue;
         }
         else if(i==n&&j<m){
             for(int o=j;o<m;o++)
                 arr.eb(b[o]);
                 break;
         }
         else if(j==m&&i<n){
             for(int o=i;o<n;o++)
                 arr.eb(a[o]);
                 break;
         }
         if(i==n&&j==m)
             break;
     }
//     for(int i=0;i<sz(arr);i++)
//         cout<<arr[i]<<" ";
//         cout<<endl;
        ll int sum{0};
        for(int i=0;i<sz(arr);i++){
            sum+=arr[i];
            if(sum<=k)
                cn++;
            else
                break;
        }
        cout<<cn<<endl;
 return 0;    
}#include<bits/stdc++.h>
#define endl "\n"
#define ll long long
#define eb emplace_back
#define sz(x) ((int)(x).size())
#define mo 100000000
using namespace std;
//Conditional Operator (condition?true part:false part) eg : cout<<(y<=3?"YES":"NO")<<endl;
ll getmul(ll n){ll int k{0};while(n>0){k+=n%10;n=n/10;}return k;}//Sum OF n DIGITS
int main(){
     ios_base::sync_with_stdio(false);
     cin.tie(NULL);
     ll int n,m,k;
     cin>>n>>m>>k;
     ll int a[n],b[m],cn{0};
     for(int i=0;i<n;i++)
        cin>>a[i];
     for(int i=0;i<m;i++)
         cin>>b[i];
     vector<ll int>arr;
     int i{0},j{0};
     for(int o=0;o<n+m;o++){
         if(i<n&&j<m&&a[i]<=b[j]){
             arr.eb(a[i]);
             i++;
             continue;
         }
         else if(i<n&&j<m&&a[i]>=b[j]){
             arr.eb(b[j]);
             j++;
             continue;
         }
         else if(i==n&&j<m){
             for(int o=j;o<m;o++)
                 arr.eb(b[o]);
                 break;
         }
         else if(j==m&&i<n){
             for(int o=i;o<n;o++)
                 arr.eb(a[o]);
                 break;
         }
         if(i==n&&j==m)
             break;
     }
//     for(int i=0;i<sz(arr);i++)
//         cout<<arr[i]<<" ";
//         cout<<endl;
        ll int sum{0};
        for(int i=0;i<sz(arr);i++){
            sum+=arr[i];
            if(sum<=k)
                cn++;
            else
                break;
        }
        cout<<cn<<endl;
 return 0;    
}

Compiler output:
a.cc:59:2: error: stray '#' in program
   59 | }#include<bits/stdc++.h>
      |  ^
a.cc:59:3: error: 'include' does not name a type
   59 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:67:4: error: redefinition of 'long long int getmul(long long int)'
   67 | ll getmul(ll n){ll int k{0};while(n>0){k+=n%10;n=n/10;}return k;}//Sum OF n DIGITS
      |    ^~~~~~
a.cc:9:4: note: 'long long int getmul(long long int)' previously defined here
    9 | ll getmul(ll n){ll int k{0};while(n>0){k+=n%10;n=n/10;}return k;}//Sum OF n DIGITS
      |    ^~~~~~
a.cc:68:5: error: redefinition of 'int main()'
   68 | int main(){
      |     ^~~~
a.cc:10:5: note: 'int main()' previously defined here
   10 | int main(){
      |     ^~~~