Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long double ll;
typedef pair<int,int> pii;
typedef map<int,int> mii;
typedef vector<int>vi;
#define pb push_back
#define sc(n) scanf("%d",&n)
#define lsc(n) scanf("%lld",&n)
#define all(x) x.begin(),x.end()
#define rep(i,n) for(i=0;i<n;i++)
#define rep1(i,n) for(i=1;i<=n;i++)
#define rev(i,n) for(i=n-1;i>=0;i--)
#define rev1(i,n) for(i=n;i>0;i--)
#define in insert
#define IT ::iterator
#define pr(n) printf("%d\n",n)
#define lpr(n) printf("%lld\n",n);


int main()
{
	ll n,m,k,i,j;
	cin >> n >> m >> k;
	ll a[n],b[m];
	rep(i,n)cin >> a[i];
	rep(i,m)cin >> b[i];
	i=0,j=0;
	ll ans=0;
	while(k>=0)
	{
		//cout << k  <<" " << i << " " << j << endl;
		if(i==n && j==m)
		{
			break;
		}
		if(i==n)
		{
			if(k-b[j]>=0)
			{
				k=k-b[j];
				ans++;
				j++;
			}
			else
			{
				break;
			}
		}
		else if(j==m)
		{
			if(k-a[i]>=0)
			{
				k=k-a[i];
				ans++;
				i++;
			}
			else
			{
				break;
			}
		}
		if(a[i]<b[j])
		{
			if(k-a[i]>=0)
			{
				k=k-a[i];
				ans++;
				i++;
			}
			else
			{
				break;
			}
		}
		else
		{
			if(k-b[j]>=0)
			{
				k=k-b[j];
				ans++;
				j++;
			}
			else
			{
				break;
			}
		}
	}
	cout << ans;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: conversion from 'll' {aka 'long double'} to 'long unsigned int' in a converted constant expression
   25 |         ll a[n],b[m];
      |              ^
a.cc:25:14: error: could not convert 'n' from 'll' {aka 'long double'} to 'long unsigned int'
   25 |         ll a[n],b[m];
      |              ^
      |              |
      |              ll {aka long double}
a.cc:25:14: error: size of array 'a' has non-integral type 'll' {aka 'long double'}
a.cc:25:19: error: conversion from 'll' {aka 'long double'} to 'long unsigned int' in a converted constant expression
   25 |         ll a[n],b[m];
      |                   ^
a.cc:25:19: error: could not convert 'm' from 'll' {aka 'long double'} to 'long unsigned int'
   25 |         ll a[n],b[m];
      |                   ^
      |                   |
      |                   ll {aka long double}
a.cc:25:19: error: size of array 'b' has non-integral type 'll' {aka 'long double'}
a.cc:26:25: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   26 |         rep(i,n)cin >> a[i];
      |                         ^
a.cc:27:25: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   27 |         rep(i,m)cin >> b[i];
      |                         ^
a.cc:39:31: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   39 |                         if(k-b[j]>=0)
      |                               ^
a.cc:41:38: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   41 |                                 k=k-b[j];
      |                                      ^
a.cc:52:31: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   52 |                         if(k-a[i]>=0)
      |                               ^
a.cc:54:38: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   54 |                                 k=k-a[i];
      |                                      ^
a.cc:63:21: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   63 |                 if(a[i]<b[j])
      |                     ^
a.cc:63:26: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   63 |                 if(a[i]<b[j])
      |                          ^
a.cc:65:31: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   65 |                         if(k-a[i]>=0)
      |                               ^
a.cc:67:38: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   67 |                                 k=k-a[i];
      |                                      ^
a.cc:78:31: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   78 |                         if(k-b[j]>=0)
      |                               ^
a.cc:80:38: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   80 |                                 k=k-b[j];
      |                                      ^