Language: C++

#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#define long long=ll
int main()
{
  ll int n,m,k,p;
  scanf("%lld %lld %lld",&n,&m,&k);
  ll int arr[n],brr[m];
  ll int count=0;
  
  for(int i=0;i<n;i++)
  {
    scanf("%lld",arr[i]);
  }
   for(int i=0;i<m;i++)
  {
    scanf("%lld",brr[i]);
  }
  sort(arr,arr+n);
  sort(brr,brr+n);
 int i=0,j=0;
  while(sum<0)
  {
    if(arr[i]<=k)
    {
      k=k-arr[i];
      count++;
      i++;
    }
    if(brr[j]<=k)
    {
      k=k-brr[j];
      count++;
      j++;
    }
    if(k<arr[i]&&k<brr[j])
    {
      break;
    }
  }
  printf("%d",count);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'll' was not declared in this scope
    7 |   ll int n,m,k,p;
      |   ^~
a.cc:8:27: error: 'n' was not declared in this scope
    8 |   scanf("%lld %lld %lld",&n,&m,&k);
      |                           ^
a.cc:8:30: error: 'm' was not declared in this scope
    8 |   scanf("%lld %lld %lld",&n,&m,&k);
      |                              ^
a.cc:8:33: error: 'k' was not declared in this scope
    8 |   scanf("%lld %lld %lld",&n,&m,&k);
      |                                 ^
a.cc:9:5: error: expected ';' before 'int'
    9 |   ll int arr[n],brr[m];
      |     ^~~~
      |     ;
a.cc:10:5: error: expected ';' before 'int'
   10 |   ll int count=0;
      |     ^~~~
      |     ;
a.cc:14:18: error: 'arr' was not declared in this scope
   14 |     scanf("%lld",arr[i]);
      |                  ^~~
a.cc:18:18: error: 'brr' was not declared in this scope
   18 |     scanf("%lld",brr[i]);
      |                  ^~~
a.cc:20:8: error: 'arr' was not declared in this scope
   20 |   sort(arr,arr+n);
      |        ^~~
a.cc:20:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   20 |   sort(arr,arr+n);
      |   ^~~~
      |   std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:3:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:21:8: error: 'brr' was not declared in this scope
   21 |   sort(brr,brr+n);
      |        ^~~
a.cc:23:9: error: 'sum' was not declared in this scope
   23 |   while(sum<0)
      |         ^~~
a.cc:28:7: error: 'count' was not declared in this scope; did you mean 'std::count'?
   28 |       count++;
      |       ^~~~~
      |       std::count
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: 'std::count' declared here
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
a.cc:34:7: error: 'count' was not declared in this scope; did you mean 'std::count'?
   34 |       count++;
      |       ^~~~~
      |       std::count
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: 'std::count' declared here
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
a.cc:42:15: error: 'count' was not declared in this scope; did you mean 'std::count'?
   42 |   printf("%d",count);
      |               ^~~~~
      |               std::count
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: 'std::count' declared here
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~