Language: C++

#include <iostream>
#include <cassert>
#include <vector>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <fstream>
#include <string>
#include <sstream>
#include <iterator>
#include <map>
#include <algorithm>
#include <memory>
#include <iomanip>
#include <limits>
#include <typeinfo>
 
#include <stdio.h>
#include <string.h>
 
 
using namespace std;

int max(int f1, int f2, int f3){
	return max(f1, max(f2, f3));
}

//和の最大を求める関数：分割して統治のアルゴリズム
int maxsum3(int x[], int l, int u){
	if(l > u){//要素がない場合
		return 0.0f;
	}

	if(l == u){
		return max(0.0f, x[l]);
	}

	int m = (l + u) / 2;

	//境界から左に伸びる部分配列の和最大値
	int lmax, rmax, sum;
	lmax = sum = 0.0f;
	for(int i = m; i >= l; i--){
		sum += x[i];
		lmax = max(lmax, sum);
	}

	//境界から右に伸びる部分配列の和最大値
	rmax = sum = 0.0f;
	for(int i = m + 1; i <= u; i++){
		sum += x[i];
		rmax = max(rmax, sum);
	}
	
	return max(lmax + rmax, maxsum3(x, l, m), maxsum3(x, m+1, u));
}

/*
vector <int> addhairetu(const vector <int> &in ,int start ,int rest){

	vector <int> ret;

	if(rest != 1){
		int end;
		int i;
		rest--;
		end = in.size() - rest;
		ret.push_back(in[start]);
		for(i = start; i <= end; i++){
			ret = addhairetu(in, i + 1, rest);
		}
	}

	return ret;

}
*/

int main(int argc, char* argv[])
{

	int x[100];
	int N;
	int maxsofar;

	cin >> N;

	for(int i=0;i<N;i++){
		cin >> wrk[i];
	}

	maxsofar = maxsum3(x, 0, s.size() - 1);

	if(maxsofar % 10 != 0){
		cout << maxsofar << endl;
	}else{
		cout << 0 << endl;
	}	

	return 0;

}


Compiler output:
a.cc: In function 'int maxsum3(int*, int, int)':
a.cc:35:27: error: no matching function for call to 'max(float, int&)'
   35 |                 return max(0.0f, x[l]);
      |                        ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:35:27: note:   deduced conflicting types for parameter 'const _Tp' ('float' and 'int')
   35 |                 return max(0.0f, x[l]);
      |                        ~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:12:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:35:27: note:   mismatched types 'std::initializer_list<_Tp>' and 'float'
   35 |                 return max(0.0f, x[l]);
      |                        ~~~^~~~~~~~~~~~
a.cc:24:5: note: candidate: 'int max(int, int, int)'
   24 | int max(int f1, int f2, int f3){
      |     ^~~
a.cc:24:5: note:   candidate expects 3 arguments, 2 provided
a.cc: In function 'int main(int, char**)':
a.cc:89:24: error: 'wrk' was not declared in this scope
   89 |                 cin >> wrk[i];
      |                        ^~~
a.cc:92:34: error: 's' was not declared in this scope
   92 |         maxsofar = maxsum3(x, 0, s.size() - 1);
      |                                  ^