criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main(){
    int n; cin >> n;
    int L[n];
    int sum=0;
    for (int i=0;i<n;i++) {
        cin >> L[i];
        sum += L[i];
    }
    sort(L,L+n,greater<int>());
    cout << ((L[0]<sum-L[0])? "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |     sort(L,L+n,greater<int>());
      |     ^~~~
      |     short
Language: C++

#include <bits/stdc++.h>
#define ll long long 
#define ull unsigned long long 
#define f(i,x,n) for(ll int i=x;i<n;i++) 
#define re(j,x,n) for(ll int j=x;j>=n;j--)
#define f1(k,x,n) for(ll int k=x;k<=n;k++)
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
    int n;
    cin>>n;
    int a[n],sum=0;
    f(i,0,n)
    cin>>a[i];
    sort(a,a+n);
    f(i,0,n-1)
    sum+=a[i]; 
    if(sum>a[i])
    cout<<"Yes";
    else
    cout<<"NO";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:14: error: 'i' was not declared in this scope
   20 |     if(sum>a[i])
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(int argc, char const *argv[])
{
	int n,len = 0;
	cin >> n;
	vector<int> L(n);
	for (int i = 0; i < n; ++i)
	{
		cin >> L.at(i);
	}
	sort(L.start(), L.end());
	reverse(L.start(), L.end());
	for (int i = 1; i < n; ++i)	len += L.at(i);
	if(L.at(0) < len)	cout << "Yes" << endl;
	else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:13:16: error: 'class std::vector<int>' has no member named 'start'
   13 |         sort(L.start(), L.end());
      |                ^~~~~
a.cc:14:19: error: 'class std::vector<int>' has no member named 'start'
   14 |         reverse(L.start(), L.end());
      |                   ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 int main(){
   int N;
   cin>>N;
   vector<int>vec(N);
   for (int i=0;i<N;i++){
     cin>>vec.at(i);
     }
   sort (vec.begin(),vec.end());
   int sum=0;
   for (int i=0;i<N-1;i++){
   sum+=vec.at(i)
   }
   if(vec.at(N-1)>sum){
   cout<<"Yes"<<endl;
   }
   else
     cout<<"No"<<endl;
   return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: expected ';' before '}' token
   13 |    sum+=vec.at(i)
      |                  ^
      |                  ;
   14 |    }
      |    ~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// get a integer
		double N = sc.nextInt();
		
		// map[N]: the table of the sides of polygon 
		int map[] = new int[N];

		int Max = 0;
		int sumOfSideLength = 0;

		for (int i=0; i<N; i++)
		{

			map[i] = sc.nextInt	();
			sumOfSideLength = sumOfSideLength + map[i];
			
			if (map[i]> Max)
			{
				Max = map[i];
			}
		}

		sumOfSideLength = sumOfSideLength - Max*2;
		
		if (sumOfSideLength > 0)
		{
			System.out.println("Yes");
		}	
		
		else
		{
			System.out.println("No");
		}	
	}
}

Compiler output:
Main.java:9: error: incompatible types: possible lossy conversion from double to int
		int map[] = new int[N];
		                    ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n; cin >> n;
  vector<int> vec(n-1);
  for(int i=0;i<n;i++){cin >> vec[i];}
  sort(vec.begin(),vec.end());
  if(vec[n-1]<accumulate(vec.begin(),vec.end())){cout<<"Yes"<<endl;}
  else{cout<<"No"<<endl;}
  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: no matching function for call to 'accumulate(std::vector<int>::iterator, std::vector<int>::iterator)'
    8 |   if(vec[n-1]<accumulate(vec.begin(),vec.end())){cout<<"Yes"<<endl;}
      |               ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/numeric:62,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_numeric.h:134:5: note: candidate: 'template<class _InputIterator, class _Tp> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp)'
  134 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:134:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_numeric.h:161:5: note: candidate: 'template<class _InputIterator, class _Tp, class _BinaryOperation> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation)'
  161 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:161:5: note:   candidate expects 4 arguments, 2 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n; cin >> n;
  vector<int> vec(n-1);
  for(i=0;i<n;i++){cin >> vec[i];}
  sort(vec.begin(),vec.end());
  if(vec[n-1]<accumulate(vec.begin(),vec.end())){cout<<"Yes"<<endl;}
  else{cout<<"No"<<endl;}
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   for(i=0;i<n;i++){cin >> vec[i];}
      |       ^
a.cc:8:25: error: no matching function for call to 'accumulate(std::vector<int>::iterator, std::vector<int>::iterator)'
    8 |   if(vec[n-1]<accumulate(vec.begin(),vec.end())){cout<<"Yes"<<endl;}
      |               ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/numeric:62,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_numeric.h:134:5: note: candidate: 'template<class _InputIterator, class _Tp> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp)'
  134 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:134:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_numeric.h:161:5: note: candidate: 'template<class _InputIterator, class _Tp, class _BinaryOperation> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation)'
  161 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:161:5: note:   candidate expects 4 arguments, 2 provided
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      side = new int[n];
      for(i=0;i<=n;i++){
        side[i] = sc.nextInt();
      }
      int max = 0;
      for(p=0;p<=n;p++){
       if(max<side[i]){
         max=side[i];
       }
      }
      int sum = 0;
      for(q=0;q<=n;q++){
        sum += side[q];
      }
      if(sum-max>max){
        System.out.println("yes");
      } else {
        System.out.println("no");
      }
	}
}




Compiler output:
Main.java:6: error: cannot find symbol
      side = new int[n];
      ^
  symbol:   variable side
  location: class Main
Main.java:7: error: cannot find symbol
      for(i=0;i<=n;i++){
          ^
  symbol:   variable i
  location: class Main
Main.java:7: error: cannot find symbol
      for(i=0;i<=n;i++){
              ^
  symbol:   variable i
  location: class Main
Main.java:7: error: cannot find symbol
      for(i=0;i<=n;i++){
                   ^
  symbol:   variable i
  location: class Main
Main.java:8: error: cannot find symbol
        side[i] = sc.nextInt();
        ^
  symbol:   variable side
  location: class Main
Main.java:8: error: cannot find symbol
        side[i] = sc.nextInt();
             ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
      for(p=0;p<=n;p++){
          ^
  symbol:   variable p
  location: class Main
Main.java:11: error: cannot find symbol
      for(p=0;p<=n;p++){
              ^
  symbol:   variable p
  location: class Main
Main.java:11: error: cannot find symbol
      for(p=0;p<=n;p++){
                   ^
  symbol:   variable p
  location: class Main
Main.java:12: error: cannot find symbol
       if(max<side[i]){
              ^
  symbol:   variable side
  location: class Main
Main.java:12: error: cannot find symbol
       if(max<side[i]){
                   ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
         max=side[i];
             ^
  symbol:   variable side
  location: class Main
Main.java:13: error: cannot find symbol
         max=side[i];
                  ^
  symbol:   variable i
  location: class Main
Main.java:17: error: cannot find symbol
      for(q=0;q<=n;q++){
          ^
  symbol:   variable q
  location: class Main
Main.java:17: error: cannot find symbol
      for(q=0;q<=n;q++){
              ^
  symbol:   variable q
  location: class Main
Main.java:17: error: cannot find symbol
      for(q=0;q<=n;q++){
                   ^
  symbol:   variable q
  location: class Main
Main.java:18: error: cannot find symbol
        sum += side[q];
               ^
  symbol:   variable side
  location: class Main
Main.java:18: error: cannot find symbol
        sum += side[q];
                    ^
  symbol:   variable q
  location: class Main
18 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      side = new int[n];
      for(i=0;i<=n;i++){
        side[i] = sc.nextInt();
      }
      int max = 0
      for(p=0;p<=n;p++){
       if(max<side[i]){
         max=side[i];
       }
      }
      int sum = 0
      for(q=0;q<=n;q++){
        sum += side[q];
      }
      if(sum-max>max){
        System.out.println("yes");
      } else {
        System.out.println("no");
      }
	}
}



Compiler output:
Main.java:10: error: ';' expected
      int max = 0
                 ^
Main.java:16: error: ';' expected
      int sum = 0
                 ^
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      side = new int[n];
      for(i=0;i<=n;i++){
        side[i] = sc.nextInt();
      }
      int max = 0
      for(p=0;p<=n;p++){
       if(max<side[i]){
         max=side[i]
       }
      }
      int sum = 0
      for(q=0;q<=n;q++){
        sum += side[q]
      }
      if(sum-max>max){
        System.out.println("yes");
        else
        System.out.println("no");
      }
	}
}


Compiler output:
Main.java:10: error: ';' expected
      int max = 0
                 ^
Main.java:13: error: ';' expected
         max=side[i]
                    ^
Main.java:16: error: ';' expected
      int sum = 0
                 ^
Main.java:18: error: ';' expected
        sum += side[q]
                      ^
Main.java:22: error: 'else' without 'if'
        else
        ^
5 errors
Language: C

#include <stdio.h>
int main (){
  int a[11],i,sum=0,k,kw=0;
  scanf ("%d",&k);
  for (i=0;i<k;i++){
  scanf ("%d",&a[i]);
  sum=sum+a[i];
  }
   for (i=0;i<k;i++){
  if(a[i] => sum-a[i]){
  kw++;
    break;
  }
  } 
  if (kw==0){
  printf ("Yes");
  }
  else {
  printf ("No");
  }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:12: error: expected expression before '>' token
   10 |   if(a[i] => sum-a[i]){
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
   int A;
   cin>>A;
   vector <int> N;
   for(int i  = 0;i  < A;i++){
       int hoge;
      cin>> hoge;
      N.push_back(hoge);
   }
   sort(N.begin(),N.end());
   int P = accumulate(N.begin()+ 1,P.end(),0);
   if(P < N[0]) cout<<"No";
   else cout<<"Yes" ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:38: error: request for member 'end' in 'P', which is of non-class type 'int'
   14 |    int P = accumulate(N.begin()+ 1,P.end(),0);
      |                                      ^~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){

int x[10];
int n;


cin >> n;

int max=0;
int sum=0;


for(int i = 0;i < n  i++){
cin >> x[i];
sum = sum+x[i];
	if(max<x[i]){
		max=x[i];
	}
}

if(sum>2*max){
	cout << "Yes";
}else{
	cout << "No";
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: expected ';' before 'i'
   17 | for(int i = 0;i < n  i++){
      |                    ^ ~
      |                    ;
Language: C++

#include <iostream>
#include <sstream>
#include <istream>
#include <algorithm>
#include <vector>
#include <string>

int main() {
    std::cin.tie(0);
   	std::ios::sync_with_stdio(false);

	std::size_t n;
	std::cin >> n;

    std::string s;
    std::cin >> s;

    std::vector<std::size_t> v;
    v.reserve(n);

    std::stringstream ss{s};
    std::string buf;
    while (std::getline(ss, buf, ' ')) {        
        v.emplace_back(static_cast<std::size_t>(std::stoi(buf)));
    }
  
    std::size_t acc = 0;
    std::size_t max = 0;
    for (const auto e: v) {
        acc += e;
        max = std::max(e, max);
    }
    std::cout << ((acc - max) > max) ? "Yes" : "No" << std::endl;
  
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:53: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   33 |     std::cout << ((acc - max) > max) ? "Yes" : "No" << std::endl;
      |                                                ~~~~~^~~~~~~~~~~~
Language: C++

#include <iostream>
#include <sstream>
#include <istream>
#include <algorithm>

int main() {
    std::cin.tie(0);
   	std::ios::sync_with_stdio(false);

	std::size_t n;
	cin >> n;

    std::string s;
    cin >> s;

    std::vector<std::size_t> v;
    v.reserve(n);

    std::stringstream ss{s};
    std::string buf;
    while (std::getline(ss, buf, ' ')) {        
        v.emplace_back(static_cast<std::size_t>(std::stoi(buf)));
    }
  
    std::size_t acc = 0;
    std::size_t max = 0;
    for (const auto e: v) {
        acc += e;
        max = std::max(e, max);
    }
    std::cout << ((acc - max) > max) ? "Yes" : "No" << std::endl;
  
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   11 |         cin >> n;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:10: error: 'vector' is not a member of 'std'
   16 |     std::vector<std::size_t> v;
      |          ^~~~~~
a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    4 | #include <algorithm>
  +++ |+#include <vector>
    5 | 
a.cc:16:28: error: expected primary-expression before '>' token
   16 |     std::vector<std::size_t> v;
      |                            ^
a.cc:16:30: error: 'v' was not declared in this scope
   16 |     std::vector<std::size_t> v;
      |                              ^
a.cc:31:53: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   31 |     std::cout << ((acc - max) > max) ? "Yes" : "No" << std::endl;
      |                                                ~~~~~^~~~~~~~~~~~
Language: C

#include <iostream>
using namespace std;

int main(){
    int n;
    cin >> n;
    int l[n];
    int sum = 0;
    int max = 0;
    for(int i=0; i<n; i++){
        cin >> l[i];
        sum += l[i];
        if(i==1){
            max = l[i];
        }else if(max<l[i]){
            max = l[i];
        }
    }
    
    if(sum-max>max){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;

int main (){
  int N;
  cin >> N;
  int s = 0;,m = 0;
  for (int i = 0; i < N; ++i){
    int L;
    cin >> L;
    m =max(m,L);
    s += L;
  }
  if (m < s-m)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected primary-expression before ',' token
    7 |   int s = 0;,m = 0;
      |             ^
a.cc:7:14: error: 'm' was not declared in this scope
    7 |   int s = 0;,m = 0;
      |              ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
    int N; cin >> N;
    vector<int> larr(N,0);

    int max_idx = 0;
    for(int i=0;i<N;i++){
        if larr[max_idx] < larr[i]{
            max_idx = i;
        }
    }

    int sum = 0;
    for(int i=0;i<N;i++){
        if(i != max_idx){
            sum += larr[i];
        }
    }

    if(sum > larr[max_idx]){
        cout << "yes" << endl;
    }else{
        cout << "no" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: expected '(' before 'larr'
   11 |         if larr[max_idx] < larr[i]{
      |            ^~~~
      |            (
Language: C++

#include<iostream>
using namespace std;

int main (){
  int N;
  cin >> N;
  int s = 0;,m = 0;
  for (int i = 0; i  < N; ++i){
    int L;
    cin >> L;
    m =max(m,L);
  }
  if (m < s-m)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected primary-expression before ',' token
    7 |   int s = 0;,m = 0;
      |             ^
a.cc:7:14: error: 'm' was not declared in this scope
    7 |   int s = 0;,m = 0;
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
	int N;
	cin >> N;
	vector<int> L(N);
	for (int i = 0; i < N; i++) {
		cin >> L.at(i);
	}

	int sum = 0;
	int maxedge = 0;

	for (i = 0; i < N; i++) {
		sum = sum + L.at(i);
		if (L.at(i) > maxedge) {
			maxedge = L.at(i);
		}
	}

	int ans = false;
	if (maxedge < (sum - maxedge)) {
		ans = true;
	}

	if (ans) {
		cout >> "Yes" + "\n";
	}
	else {
		cout >> "No" + "\n";
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: 'i' was not declared in this scope
   15 |         for (i = 0; i < N; i++) {
      |              ^
a.cc:28:31: error: invalid operands of types 'const char [4]' and 'const char [2]' to binary 'operator+'
   28 |                 cout >> "Yes" + "\n";
      |                         ~~~~~ ^ ~~~~
      |                         |       |
      |                         |       const char [2]
      |                         const char [4]
a.cc:31:30: error: invalid operands of types 'const char [3]' and 'const char [2]' to binary 'operator+'
   31 |                 cout >> "No" + "\n";
      |                         ~~~~ ^ ~~~~
      |                         |      |
      |                         |      const char [2]
      |                         const char [3]
Language: C++

#include <iostream>
#include <math.h>
using namespace std;

int main() {
	int N;
	cin >> N;
	vector<int> L(N);
	for (int i = 0; i < N; i++) {
		cin >> L.at(i);
	}

	int sum = 0;
	int maxedge = 0;

	for (i = 0; i < N; i++) {
		sum = sum + L.at(i);
		if (L.at(i) > maxedge) {
			maxedge = L.at(i);
		}
	}

	int ans = false;
	if (maxedge < (sum - maxedge)) {
		ans = true;
	}

	if (ans) {
		cout >> "Yes" + "\n";
	}
	else {
		cout >> "No" + "\n";
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<int> L(N);
      |         ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <math.h>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:8:16: error: expected primary-expression before 'int'
    8 |         vector<int> L(N);
      |                ^~~
a.cc:10:24: error: 'L' was not declared in this scope
   10 |                 cin >> L.at(i);
      |                        ^
a.cc:16:14: error: 'i' was not declared in this scope
   16 |         for (i = 0; i < N; i++) {
      |              ^
a.cc:17:29: error: 'L' was not declared in this scope
   17 |                 sum = sum + L.at(i);
      |                             ^
a.cc:29:31: error: invalid operands of types 'const char [4]' and 'const char [2]' to binary 'operator+'
   29 |                 cout >> "Yes" + "\n";
      |                         ~~~~~ ^ ~~~~
      |                         |       |
      |                         |       const char [2]
      |                         const char [4]
a.cc:32:30: error: invalid operands of types 'const char [3]' and 'const char [2]' to binary 'operator+'
   32 |                 cout >> "No" + "\n";
      |                         ~~~~ ^ ~~~~
      |                         |      |
      |                         |      const char [2]
      |                         const char [3]
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(int argc, char ** argv){
  int N,sum = 0;
  vector<int> len(N);
  for(int i = 0; i < N; i++) cin >> len[i];
  sort(len.begin(), len.end());
  for(int i = 1; i < len.size(); i++) sum += len[i];
  if(len[i] < sum) cout << "Yes";
  else cout << "No";
  
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:13:10: error: 'i' was not declared in this scope
   13 |   if(len[i] < sum) cout << "Yes";
      |          ^
Language: C++

#include<iostream>

using namespace std;

int main(){
    int N;
    cin >> N;
    int L[N];
    for(int i = 0; i < N; i++) cin >> L[i];
    int j;
    j = 1;
    const size_t size = sizeof(L) / sizeof(L[0]);
    int sum = std::accumulate(L, L + size, 0);
    for(int i = 0; i < N; i++){
        if(L[i] > sum - L[i]){
            j = 0;
        }
    }
    if(j == 1){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: 'accumulate' is not a member of 'std'
   13 |     int sum = std::accumulate(L, L + size, 0);
      |                    ^~~~~~~~~~
Language: Java

public class Main {
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	public static void main(String[] args) {
	    try {
            int numberOfSides = Integer.parseInt(br.readLine().trim());
            if (3 <= numberOfSides && numberOfSides <= 10) {
            	List<String> sidesStr = Arrays.asList(br.readLine().split(" ")).stream().collect(Collectors.toList());
            	List<Integer> sides = sidesStr.stream().map(s -> Integer.parseInt(s)).collect(Collectors.toList());
            	if (sides.size() <= numberOfSides && 3 <= sides.iterator().next() && sides.iterator().next() <= 100) {
                    int max = sides.stream().mapToInt(v -> v).max().getAsInt();
                    int sum = sides.stream().mapToInt(v -> v).filter(v -> v != max).sum();
                    if(max < sum) {
                    	System.out.println("Yes");
                    } else {
                    	System.out.println("No");
                    }
            	} else { System.out.println("No"); }
            }

		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}

Compiler output:
Main.java:2: error: cannot find symbol
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	       ^
  symbol:   class BufferedReader
  location: class Main
Main.java:2: error: cannot find symbol
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	                               ^
  symbol:   class BufferedReader
  location: class Main
Main.java:2: error: cannot find symbol
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	                                                  ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:7: error: cannot find symbol
            	List<String> sidesStr = Arrays.asList(br.readLine().split(" ")).stream().collect(Collectors.toList());
            	^
  symbol:   class List
  location: class Main
Main.java:7: error: cannot find symbol
            	List<String> sidesStr = Arrays.asList(br.readLine().split(" ")).stream().collect(Collectors.toList());
            	                        ^
  symbol:   variable Arrays
  location: class Main
Main.java:7: error: cannot find symbol
            	List<String> sidesStr = Arrays.asList(br.readLine().split(" ")).stream().collect(Collectors.toList());
            	                                                                                 ^
  symbol:   variable Collectors
  location: class Main
Main.java:8: error: cannot find symbol
            	List<Integer> sides = sidesStr.stream().map(s -> Integer.parseInt(s)).collect(Collectors.toList());
            	^
  symbol:   class List
  location: class Main
Main.java:8: error: cannot find symbol
            	List<Integer> sides = sidesStr.stream().map(s -> Integer.parseInt(s)).collect(Collectors.toList());
            	                                                                              ^
  symbol:   variable Collectors
  location: class Main
Main.java:20: error: cannot find symbol
		} catch (IOException e) {
		         ^
  symbol:   class IOException
  location: class Main
9 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class Polygon {
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	public static void main(String[] args) {
	    try {
            int numberOfSides = Integer.parseInt(br.readLine().trim());
            if (3 <= numberOfSides && numberOfSides <= 10) {
            	List<String> sidesStr = Arrays.asList(br.readLine().split(" ")).stream().collect(Collectors.toList());
            	List<Integer> sides = sidesStr.stream().map(s -> Integer.parseInt(s)).collect(Collectors.toList());
            	if (sides.size() <= numberOfSides && 3 <= sides.iterator().next() && sides.iterator().next() <= 100) {
                    int max = sides.stream().mapToInt(v -> v).max().getAsInt();
                    int sum = sides.stream().mapToInt(v -> v).filter(v -> v != max).sum();
                    if(max < sum) {
                    	System.out.println("Yes");
                    } else {
                    	System.out.println("No");
                    }
            	} else { System.exit(1); }
            }

		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}


Compiler output:
Main.java:8: error: class Polygon is public, should be declared in a file named Polygon.java
public class Polygon {
       ^
1 error
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
int main() {
    int n;
    cin >> n;
    int Length[n];
    for (int i=0;i<n;i++){
        cin >> Length[i];
    }
    int max = *max_element(Length,Length+n);
    int sum = -1*max;
    for (int i=0;i<n;i++){
        sum += Length[i];
    }
    if (max < sum){
        printf("Yes");
    }else{
        printf("No");
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'max_element' was not declared in this scope
   11 |     int max = *max_element(Length,Length+n);
      |                ^~~~~~~~~~~
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
  	Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int max = -1;
    int sum = 0;
    for(int i=0;i<n;i++){
    	int num = sc.nextInt();
      	if(max < num){max = num;}
      	sum += num;
    }
    sum -= max;
    if(max > sum){
    	System.out.println("Yes")
    }else{System.out.println("No")}
  }
}

Compiler output:
Main.java:16: error: ';' expected
    	System.out.println("Yes")
    	                         ^
Main.java:17: error: ';' expected
    }else{System.out.println("No")}
                                  ^
2 errors
Language: C++

#include <algorithm>
#include <iostream>
using namespace std;

int main() {
  int N;
  cin >> N;
  int l[N];
  
  for(int i=0; i<N; i++){ 
    cin >> l[i];
  }
  
  sort(l,l+N-1);
  
  int l_max = l[N-1];
  
  int l_rest;
  
  for(int j=1; j<N; j++){
  	l_rest = l_max - l[N-1-j];
  	
    if(l_rest<0){
    	cout << True << endl;
        return 0;
    }
    
  }
  
  cout << False << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:17: error: 'True' was not declared in this scope
   24 |         cout << True << endl;
      |                 ^~~~
a.cc:30:11: error: 'False' was not declared in this scope
   30 |   cout << False << endl;
      |           ^~~~~
Language: C++

#include <algorithm>
#include <iostream>
using namespace std;

int main() {
  int N;
  cin >> N;
  int l[N];
  
  for(int i=0; i<N; i++){ 
    cin >> l[i];
  }
  
  sort(l);
  
  int l_max = l[N-1];
  
  int l_rest;
  
  for(int j=1; j<N; j++){
  	l_rest = l_max - l[N-1-j];
  	
    if(l_rest<0){
    	cout << True << endl;
        return 0;
    }
    
  }
  
  cout << False << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: no matching function for call to 'sort(int [N])'
   14 |   sort(l);
      |   ~~~~^~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 1 provided
a.cc:24:17: error: 'True' was not declared in this scope
   24 |         cout << True << endl;
      |                 ^~~~
a.cc:30:11: error: 'False' was not declared in this scope
   30 |   cout << False << endl;
      |           ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  int N;
  cin >> N;
  int l[N];
  
  for(int i=0; i<N; i++){ 
    cin >> l[i];
  }
  
  int l_sorted[N];
  l_sorted = l;
  
  int l_max = l_sorted[N-1];
  
  int l_rest;
  
  for(int j=1; j<N; j++){
  	l_rest = l_max - l_sorted[N-1-j];
  	
    if(l_rest<0){
    	cout << 'True' << endl;
        return 0;
    }
    
  }
  
  cout << 'False' << endl;
  return 0;
}

Compiler output:
a.cc:24:17: warning: multi-character character constant [-Wmultichar]
   24 |         cout << 'True' << endl;
      |                 ^~~~~~
a.cc:30:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   30 |   cout << 'False' << endl;
      |           ^~~~~~~
a.cc: In function 'int main()':
a.cc:14:12: error: invalid array assignment
   14 |   l_sorted = l;
      |   ~~~~~~~~~^~~
Language: Java

import java.util.*;
import java.io.*;
public class Main {
  	public static void main(String[] args) {
      	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	int max = 0;
      	int total = 0;
      	for(int i = 0; i < n; i++) {
        	max = Math.max(a[i], max);
        }
      	System.out.println(max < total - max ? "Yes" : "No");
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
        	max = Math.max(a[i], max);
        	               ^
  symbol:   variable a
  location: class Main
1 error
Language: Java

import java.util.*;
import java.io.*;
public class Main {
  	public static void main(String[] args) {
      	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	int max = 0;
      	for(int i = 0; i < n; i++) {
          	int x = sc.nextInt();
          	total += x;
        	max = Math.max(x, max);
        }
      	System.out.println(max < total - max ? "Yes" : "No");
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
          	total += x;
          	^
  symbol:   variable total
  location: class Main
Main.java:13: error: cannot find symbol
      	System.out.println(max < total - max ? "Yes" : "No");
      	                         ^
  symbol:   variable total
  location: class Main
2 errors
Language: Java

import java.util.*;
import java.io.*;
public class Main {
  	public static void main(String[] args) {
      	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	int max = 0;
      	for(int i = 0; i < n; i++) {
        	max = Math.max(a[i], max);
        }
      	System.out.println(max < total - max ? "Yes" : "No");
    }
}

Compiler output:
Main.java:9: error: cannot find symbol
        	max = Math.max(a[i], max);
        	               ^
  symbol:   variable a
  location: class Main
Main.java:11: error: cannot find symbol
      	System.out.println(max < total - max ? "Yes" : "No");
      	                         ^
  symbol:   variable total
  location: class Main
2 errors
Language: C

#include<stdio.h>

int main()
{

  int i,j,k=0;
  int N;
  scanf("%d",&N);
  int L[N];
  
  for(i=0;i<N;i++)
    scanf("%d ",&L[i]);
  
  for (i=0; i<N; ++i) {
    for (j=i+1; j<N; ++j) {
      if (L[i] > L[j]) {
        tmp =  L[i];
        L[i] = L[j];
        L[j] = tmp;
      }
    }
  }
  
  for(i=0;i<N-1;i++)
    k+=L[i];
  
  if(L[++i] > k)
    puts("No");
  
  else
    puts("Yes");
  
  return 0;
}
    
    

Compiler output:
main.c: In function 'main':
main.c:17:9: error: 'tmp' undeclared (first use in this function)
   17 |         tmp =  L[i];
      |         ^~~
main.c:17:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
using vi = vector<i64>;
using vvi = vector<vi>;

int main() {
    int n;
    cin >> n;
    vi as(n);
    for (int i = 0; i < n; i++) {
        cin >> as[i];
    }

    sort(as.begin(), as.end());
    cout << (as.back() < accumulate(as.begin(), as.begin() + n - 1, 0() ? "Yes" : "No") << endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:70: error: expression cannot be used as a function
   16 |     cout << (as.back() < accumulate(as.begin(), as.begin() + n - 1, 0() ? "Yes" : "No") << endl;
      |                                                                     ~^~
a.cc:16:96: error: expected ')' before ';' token
   16 |     cout << (as.back() < accumulate(as.begin(), as.begin() + n - 1, 0() ? "Yes" : "No") << endl;
      |             ~                                                                                  ^
      |                                                                                                )
Language: C++

#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
using vi = vector<i64>;
using vvi = vector<vi>;

int main() {
    int n;
    cin >> n;
    vi as(n);
    for (int i = 0; i < n; i++) {
        cin >> as[i];
    }

    sort(as.begin(), as.end());
    cout << (as.back() < accumulate(as.begin(), as.begin() + n - 1), 0 ? "Yes" : "No") << endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:36: error: no matching function for call to 'accumulate(std::vector<long int>::iterator, __gnu_cxx::__normal_iterator<long int*, std::vector<long int> >)'
   16 |     cout << (as.back() < accumulate(as.begin(), as.begin() + n - 1), 0 ? "Yes" : "No") << endl;
      |                          ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/numeric:62,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_numeric.h:134:5: note: candidate: 'template<class _InputIterator, class _Tp> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp)'
  134 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:134:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_numeric.h:161:5: note: candidate: 'template<class _InputIterator, class _Tp, class _BinaryOperation> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation)'
  161 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:161:5: note:   candidate expects 4 arguments, 2 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  long long int n,i,sum=0,e;
  cin>>n;
  long long int a[n];
  for(i=0;i<n;i++)
  {
   	cin>>e;
    a[i]=e;
    sum+=e;
  }
  max=a[0];
  for(i=0;i<n;i++)
  {
    if(a[i]>max)
      max=a[i];
  }
  if(max<sum-max)
    cout<<"Yes"<<endl;
  else 
    cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: overloaded function with no contextual type information
   14 |   max=a[0];
      |          ^
a.cc:17:12: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator>'
   17 |     if(a[i]>max)
      |        ~~~~^~~~
a.cc:18:14: error: overloaded function with no contextual type information
   18 |       max=a[i];
      |              ^
a.cc:20:13: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator-'
   20 |   if(max<sum-max)
      |          ~~~^~~~
a.cc:20:6: error: parse error in template argument list
   20 |   if(max<sum-max)
      |      ^~~~~~~~~~~
a.cc:20:17: error: cannot resolve overloaded function 'max' based on conversion to type 'bool'
   20 |   if(max<sum-max)
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){int a,s=0,m=0;cin>>a;
  for(int i=0;i<n;i++){
    int b;cin>>b;
    s +=b; m=max(m,b);if(s-m*2>0)cout<<"Yes";else cout<<"No";}}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'n' was not declared in this scope
    4 |   for(int i=0;i<n;i++){
      |                 ^
Language: C++

#inclucd<bits/stdc++.h>
using namespace std;
int main(){int a,s=0,m=0;cin>>a;
  for(int i=0;i<n;i++){
    int b;cin>>b;
    s +=b; m=max(m,b);if(s-m*2>0)cout<<"Yes";else cout<<"No";}}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclucd; did you mean #include?
    1 | #inclucd<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:3:26: error: 'cin' was not declared in this scope
    3 | int main(){int a,s=0,m=0;cin>>a;
      |                          ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclucd<bits/stdc++.h>
a.cc:4:17: error: 'n' was not declared in this scope
    4 |   for(int i=0;i<n;i++){
      |                 ^
a.cc:6:14: error: 'max' was not declared in this scope
    6 |     s +=b; m=max(m,b);if(s-m*2>0)cout<<"Yes";else cout<<"No";}}
      |              ^~~
a.cc:6:34: error: 'cout' was not declared in this scope
    6 |     s +=b; m=max(m,b);if(s-m*2>0)cout<<"Yes";else cout<<"No";}}
      |                                  ^~~~
a.cc:6:34: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:51: error: 'cout' was not declared in this scope
    6 |     s +=b; m=max(m,b);if(s-m*2>0)cout<<"Yes";else cout<<"No";}}
      |                                                   ^~~~
a.cc:6:51: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
#include<algorithm>

using namespace std;

int main()
{
  int n;
  int l[15];
  int sum=0;
  for(int i=0;i<n;i++)
  {
  cin>>l[i];
    sum+=l[i];
  }
  sort(l,l+n);
  reverse(l,l+n);
  cout<<(l[0]<sum ? "Yes" :"No")<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:18:40: error: expected '}' at end of input
   18 |   cout<<(l[0]<sum ? "Yes" :"No")<<endl;
      |                                        ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C

#include <stdio.h>

int main(void)
{
    int i, n;
	int ls[10];
    int sum = 0;
  
    scanf("%d", &n);
  
    for(i = 0; i < n; ++i){
        scanf("%d", &ls[i]);
        sum += ls[i];
    }
    
    for(i = 0; i < n; ++i)
        if(sum <= ls[i] * 2)
            break;
    
    if(i == n)
        print("Yes");
    else
        print("No");
      
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   21 |         print("Yes");
      |         ^~~~~
      |         printf
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int n,max,sum;
int l[100];
int main()
{
    cin>>n;
    for(int i=0;i<n;i++)
    {
        cin>>l[i];
        sum+=i[i];
    }
    sort(l,l+n);
    max=i[n-1];
    if(max<sum)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: invalid types 'int[int]' for array subscript
   12 |         sum+=i[i];
      |               ^
a.cc:15:5: error: reference to 'max' is ambiguous
   15 |     max=i[n-1];
      |     ^~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/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/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: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:4:7: note:                 'int max'
    4 | int n,max,sum;
      |       ^~~
a.cc:15:9: error: 'i' was not declared in this scope
   15 |     max=i[n-1];
      |         ^
a.cc:16:8: error: reference to 'max' is ambiguous
   16 |     if(max<sum)cout<<"Yes"<<endl;
      |        ^~~
/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:4:7: note:                 'int max'
    4 | int n,max,sum;
      |       ^~~
Language: C++

#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <iterator>
#include <utility>
#include <iomanip>
#include <cmath>
#include <climits>
#include <cassert>
#include <stdio.h>
#include <string.h>

using namespace std;

void solve() {
  int l;
  cin >> l;
  std::vector<long long> vv(l);    for (int i = 0; i < l; i++) { cin >> vv[i]; }

  sort( vv.begin(), vv.end() );
  reverse( vv.begin(), vv.end() );
  auto sum = std::accumulate( vv.begin(), vv.end(), 0 );

  bool ret = vv[0] < sum-vv[0];

  std::cout << (ret ? "Yes" : "No") << std::endl;
}

int main(int argc, char *argv[])
{
  solve();
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:30:19: error: 'accumulate' is not a member of 'std'
   30 |   auto sum = std::accumulate( vv.begin(), vv.end(), 0 );
      |                   ^~~~~~~~~~
Language: C++

#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <iterator>
#include <utility>
#include <iomanip>
#include <cmath>
#include <climits>
#include <cassert>
#include <stdio.h>
#include <string.h>

using namespace std;

void solve() {
  int l;
  cin >> l;
  std::vector<long long> vv(l);    for (int i = 0; i < l; i++) { cin >> vv[i]; }

  sort( vv.begin(), vv.end() );
  reverse( vv.begin(), vv.end() );
  auto sum = accumulate( vv.begin(), vv.end(), 0 );
  bool ret = vv[0] < sum-vv[0];

  std::cout << (ret ? "Yes" : "No") << std::endl;
}

int main(int argc, char *argv[])
{
  solve();
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:30:14: error: 'accumulate' was not declared in this scope
   30 |   auto sum = accumulate( vv.begin(), vv.end(), 0 );
      |              ^~~~~~~~~~
Language: C++

#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <iterator>
#include <utility>
#include <iomanip>
#include <cmath>
#include <climits>
#include <cassert>
#include <stdio.h>
#include <string.h>

using namespace std;

void solve() {
  int l;
  cin >> l;
  std::vector<long long> vv(l);    for (int i = 0; i < l; i++) { cin >> vv[i]; }

  sort( vv.begin(), vv.end() );
  reverse( vv.begin(), vv.end() );
  auto sum = std::accumulate( vv.begin(), vv.end(), 0 );
  bool ret = vv[0] < sum-vv[0];

  std::cout << (ret ? "Yes" : "No") << std::endl;
}

int main(int argc, char *argv[])
{
  solve();
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:30:19: error: 'accumulate' is not a member of 'std'
   30 |   auto sum = std::accumulate( vv.begin(), vv.end(), 0 );
      |                   ^~~~~~~~~~
Language: C

#include<stdio.h>

int main(){
  int N, L, tot;
  
  scanf("%d", &N);
  
  for (int i = 0; i < N; i++){
    scanf("%d", &L);
    if(i == 0){
      max = L;
    } else {
      if(max < L){
        tot += max;
        max = L;
      } else {
        tot += L;
      }
    }
  }
  
  if(max < tot){
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:7: error: 'max' undeclared (first use in this function)
   11 |       max = L;
      |       ^~~
main.c:11:7: note: each undeclared identifier is reported only once for each function it appears in