Language: C++

#include <bits/stdc++.h>

using namespace std;

int N 
int arr[15];
int max = 0;
int where = -1;
int tot = 0;

int main () {
	
  
  	cin >> N;
  
  	for (int i = 0; i < N; i++ ) {
		cin >> arr[i]; 
      
      	int temp = arr[i];
      
      	if (max < temp) {
          max = temp;
          where = i;
        }	  	
      
    }
  
  	for (int j = 0; j < N; j++) {
    
    	if ( j !== where ){ 
        	tot += arr[j];
        
        } 
    
    }
  
  	if (max < tot){
    	cout << "Yes"
    } else {
      cout << "No"
    }
  
  	

	return 0;
}

Compiler output:
a.cc:6:1: error: expected initializer before 'int'
    6 | int arr[15];
      | ^~~
a.cc: In function 'int main()':
a.cc:14:16: error: 'N' was not declared in this scope
   14 |         cin >> N;
      |                ^
a.cc:17:24: error: 'arr' was not declared in this scope
   17 |                 cin >> arr[i];
      |                        ^~~
a.cc:21:13: error: reference to 'max' is ambiguous
   21 |         if (max < temp) {
      |             ^~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidates are: '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:5706:5: note:                 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
In file included from /usr/include/c++/14/algorithm:60:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:                 '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:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:7:5: note:                 'int max'
    7 | int max = 0;
      |     ^~~
a.cc:22:11: error: reference to 'max' is ambiguous
   22 |           max = temp;
      |           ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidates are: '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:5706:5: note:                 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:                 '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:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:7:5: note:                 'int max'
    7 | int max = 0;
      |     ^~~
a.cc:30:18: error: expected primary-expression before '=' token
   30 |         if ( j !== where ){
      |                  ^
a.cc:31:24: error: 'arr' was not declared in this scope
   31 |                 tot += arr[j];
      |                        ^~~
a.cc:37:13: error: reference to 'max' is ambiguous
   37 |         if (max < tot){
      |             ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidates are: '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:5706:5: note:                 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:                 '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:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:7:5: note:                 'int max'
    7 | int max = 0;
      |     ^~~
a.cc:38:22: error: expected ';' before '}' token
   38 |         cout << "Yes"
      |                      ^
      |                      ;
   39 |     } else {
      |     ~                 
a.cc:40:19: error: expected ';' before '}' token
   40 |       cout << "No"
      |                   ^
      |                   ;
   41 |     }
      |     ~