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

#include<bits/stdc++.h>
using namespace std;
int main(){
 int N;
  cin>>N;
 vector<int> L(N);
  
  for(int i=0;i<L.size();i++){
    cin>>L.at(i);
  }
  
    
    int max=max(L.begin(),L.end)
      
    int sum1=0;
    int sum2=0;
  
  for(int i=0;i<L.size();i++){
    if(L.at(i)!=max){
      L.at(i)+=sum1;
    else if(L.at(i)==max&&sum2==0){
      sum++;
    }
      else{
        L.at(i)+=sum1;
      }
    }
    
    if(sum1>max){
      cout<<"Yes"<<endl;
    }
    else{
      cout<<"No"<<endl;
    }
  }
  
     
      
  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: 'max' cannot be used as a function
   13 |     int max=max(L.begin(),L.end)
      |             ~~~^~~~~~~~~~~~~~~~~
a.cc:20:16: error: 'sum1' was not declared in this scope; did you mean 'sum2'?
   20 |       L.at(i)+=sum1;
      |                ^~~~
      |                sum2
a.cc:21:5: error: expected '}' before 'else'
   21 |     else if(L.at(i)==max&&sum2==0){
      |     ^~~~
a.cc:19:21: note: to match this '{'
   19 |     if(L.at(i)!=max){
      |                     ^
a.cc:22:7: error: 'sum' was not declared in this scope; did you mean 'sum2'?
   22 |       sum++;
      |       ^~~
      |       sum2
a.cc:25:18: error: 'sum1' was not declared in this scope; did you mean 'sum2'?
   25 |         L.at(i)+=sum1;
      |                  ^~~~
      |                  sum2
a.cc:29:8: error: 'sum1' was not declared in this scope; did you mean 'sum2'?
   29 |     if(sum1>max){
      |        ^~~~
      |        sum2
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int N;
  cin>>N;
 vector<int> L(N);
  
  for(int i=0;i<L.size();i++){
    cin>>L.at(i);
  }
  
    
    int max=max(L.begin(),L.end)
      
    int sum1=0;
    int sum2=0;
  
  for(int i=0;i<L.size();i++){
    if(L.at(i)!=max){
      L.at(i)+=sum1;
    else if(L.at(i)==max&&sum2==0){
      sum++;
    }
      else{
        L.at(i)+=sum1;
      }
    }
    
    if(sum1>max){
      cout<<"Yes"<<endl;
    }
    else{
      cout<<"No"<,endl;
    }
  }
  
     
      
  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: 'max' cannot be used as a function
   13 |     int max=max(L.begin(),L.end)
      |             ~~~^~~~~~~~~~~~~~~~~
a.cc:20:16: error: 'sum1' was not declared in this scope; did you mean 'sum2'?
   20 |       L.at(i)+=sum1;
      |                ^~~~
      |                sum2
a.cc:21:5: error: expected '}' before 'else'
   21 |     else if(L.at(i)==max&&sum2==0){
      |     ^~~~
a.cc:19:21: note: to match this '{'
   19 |     if(L.at(i)!=max){
      |                     ^
a.cc:22:7: error: 'sum' was not declared in this scope; did you mean 'sum2'?
   22 |       sum++;
      |       ^~~
      |       sum2
a.cc:25:18: error: 'sum1' was not declared in this scope; did you mean 'sum2'?
   25 |         L.at(i)+=sum1;
      |                  ^~~~
      |                  sum2
a.cc:29:8: error: 'sum1' was not declared in this scope; did you mean 'sum2'?
   29 |     if(sum1>max){
      |        ^~~~
      |        sum2
a.cc:33:18: error: expected primary-expression before ',' token
   33 |       cout<<"No"<,endl;
      |                  ^
Language: C++

#include <iostream>
#include <sstream>
#include <vector>
#include <numeric>
using namespace std;

void input_int2(int &a, int &b) {
	cin >> a >> b;
	cin.ignore();
}

void input_int3(int &a, int &b, int &c) {
	cin >> a >> b >> c;	
	cin.ignore();
}

void input_int_array(int n,vector<int> &vec) {
	for (int i=0,tmp=0; i<n && cin >> tmp; i++) vec[i]=tmp;
}

void input_int_matrix(int n, int m, vector<vector<int>> &matrix) {
	int tmp;
	for(int i=0; i<n; i++) {
		for (int j=0; j<m; j++) {
			cin >> tmp;
			matrix[i][j] = tmp;
		}
	}
}

void input_int_var_array(int n,vector<int> &vec) {
	for (int tmp=0; cin >> tmp;) {
		vec.push_back(tmp);
	}
}

void input_int_var_matrix(int n, int m, vector<vector<int>> &matrix) {
	int tmp;
	for(int i=0; i<n; i++) {
		for (int j=0; j<m; j++) {
			cin >> tmp;
			matrix[i][j] = tmp;
		}
	}
}

void input_var_str(vector<string> & array) {
	string s;
	getline(cin, s);
	
	stringstream ss{s};
	while(getline(ss, s, ' ')) {
		array.push_back(s);
	}
}

void input_var_int(vector<int> &array) {
	string s;
	getline(cin, s);
	
	stringstream ss{s};
	while(getline(ss, s, ' ')) {
		array.push_back(stoi(s));
	}
}

void input_var_int(set<int> &array) {
	string s;
	getline(cin, s);
	
	stringstream ss{s};
	while(getline(ss, s, ' ')) {
		array.insert(stoi(s));
	}
}

template <typename T> void print_var_vector(vector<T> vec) {
	for(typename vector<T>::iterator i=begin(vec); i!=end(vec); i++) {
		cout << *i;
	}
	cout << endl;
}

void print_vector(int N, vector<int> vec) {
	for(int i=0; i<N; i++){
		cout << vec[i] << " ";
	}
	cout << endl;
}

int get_max_index(vector<int> vec) {
	vector<int>::iterator it = max_element(vec.begin(), vec.end());
	return distance(vec.begin(), it);
}

const int MAX_N = 10;
int N;
vector<int> a(MAX_N);

void input() {
	cin >> N;
	cin.ignore();
	input_int_array(N, a);
}

string solve() {
	vector<int>::iterator it = max_element(a.begin(), a.end());
	int max_value = *it;
	a.erase(it);
	return accumulate(a.begin(), a.end(), 0) > max_value ? "Yes" : "No" ;
}

int main() {
	input();
	cout << solve() << endl;
}


Compiler output:
a.cc:67:6: error: variable or field 'input_var_int' declared void
   67 | void input_var_int(set<int> &array) {
      |      ^~~~~~~~~~~~~
a.cc:67:20: error: 'set' was not declared in this scope
   67 | void input_var_int(set<int> &array) {
      |                    ^~~
a.cc:5:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    4 | #include <numeric>
  +++ |+#include <set>
    5 | using namespace std;
a.cc:67:24: error: expected primary-expression before 'int'
   67 | void input_var_int(set<int> &array) {
      |                        ^~~
a.cc: In function 'int get_max_index(std::vector<int>)':
a.cc:92:36: error: 'max_element' was not declared in this scope
   92 |         vector<int>::iterator it = max_element(vec.begin(), vec.end());
      |                                    ^~~~~~~~~~~
a.cc: In function 'std::string solve()':
a.cc:107:36: error: 'max_element' was not declared in this scope
  107 |         vector<int>::iterator it = max_element(a.begin(), a.end());
      |                                    ^~~~~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: found ':' in nested-name-specifier, expected '::'
    5 |   int n:
      |        ^
      |        ::
a.cc:5:7: error: 'n' has not been declared
    5 |   int n:
      |       ^
a.cc:6:7: error: qualified-id in declaration before '>>' token
    6 |   cin >> n;
      |       ^~
a.cc:8:17: error: 'n' was not declared in this scope
    8 |   vector<int> l(n);
      |                 ^
Language: C++

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

int main(){
  int N,sum;
  cin >> N;
  vector<int> vec(N);
  for(int i = 0; i< N;i++){
    cin >> vec.at(i);
  }
  sort(vec.begin(),vec.end());
  for(int i = 0;i<N-2;i++){
    sum += vec.at(i);
  }
  if(sum => vec.at(N-1)){
    cout << "Yes";
  }else{cout << "No";
       }
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: expected primary-expression before '>' token
   15 |   if(sum => vec.at(N-1)){
      |           ^
Language: C++

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

int main(){
  int N,sum;
  cin >> N;
  vector<int> vec(N);
  for(int i = 0; i< N;i++){
    cin >> vec.at(i);
  }
  sort(vec.begin(),vec.end());
  for(int i = 0;i<N-1;i++){
    sum += vec.at(i);
  }
  if(sum => vec.at(N-1)){
    cout << "Yes";
  }else{cout << "No";
       }
}
   

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: expected primary-expression before '>' token
   15 |   if(sum => vec.at(N-1)){
      |           ^
Language: C++

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

int main(){
	int n;cin>>n;
  	vector<int>l(n);
   for(auto&& w:l)cin>>w;
  sort(begin(l),end(i));
  int sm=0;
  for(int i=0;i<n-1;i++)sm+=l[i];
  string ans;
  if(sm>l[n-1])ans="Yes";
  else ans="No";
  cout<<ans<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: 'i' was not declared in this scope
    8 |   sort(begin(l),end(i));
      |                     ^
Language: C++

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

int main(){
  int n,a=0,sum=0;
  cin>>n;
  vector<int> l(n)l;
  for(int i=0;i<n;i++){
    cin>>l.at(i);
  }
  for(int i=0;i<n;i++){
    a = max(l.at(i),a);
  }
  for(int i=0;i<n;i++){
    sum += l.at(i);
  }

  if(a > sum-a){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected ',' or ';' before 'l'
    7 |   vector<int> l(n)l;
      |                   ^
Language: C++

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

int main(){
  int N;
  vector<int> vec(N);
  for (int i=0;N>i;++i) cin >> vec[i];
  int max;
  max = max_element(vec.begin(),vec.end());
  int sum=-max;
  for (int i=0;N>i;++i) sum += vec[i];
  string res;
  res= (sum > max)? "Yes" : "No";

  cout << res << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in assignment
   11 |   max = max_element(vec.begin(),vec.end());
      |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
      |                    |
      |                    __gnu_cxx::__normal_iterator<int*, std::vector<int> >
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'Lmax' was not declared in this scope; did you mean 'L_max'?
   13 |     Lmax=max(L,L_max);
      |     ^~~~
      |     L_max
a.cc:15:6: error: 'Lmax' was not declared in this scope; did you mean 'L_max'?
   15 |   if(Lmax<total)
      |      ^~~~
      |      L_max
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: expected ';' before 'total'
   13 |     Lmax=max(L,Lmax)
      |                     ^
      |                     ;
   14 |     total+=L}
      |     ~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=0;i<N;i++){
      |       ^
a.cc:13:21: error: expected ';' before 'total'
   13 |     Lmax=max(L,Lmax)
      |                     ^
      |                     ;
   14 |     total+=L}
      |     ~~~~~
Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<numeric>
using namespace std;
int main(){
   int n;
   int max_L=0;
   cin>>n;
   for(int i=0;i<n;i++){
       int L;
       cin>>L;
       max_L=max(L,max_L);
       int total+=L
   }
   if(max_L<total-max_L){
       cout<<"Yes"<<endl;
   }else{
       cout<<"No"<<endl;
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: expected initializer before '+=' token
   15 |        int total+=L
      |                 ^~
a.cc:17:13: error: 'total' was not declared in this scope
   17 |    if(max_L<total-max_L){
      |             ^~~~~
Language: C

#include<stdio.h>
#include<string.h>
//abc120-A
/*
int main(void)
{
	int a, b, c,d;
	scanf("%d %d %d", &a, &b, &c);

	if (b >= a * c)
	{
		printf("%d", c);
	}

	else
	{
		d = b / a;
		printf("%d", d);
	}
	return 0;
}
//abc120-B
int main(void)
{
	int a, b, k, tmp;
	int ans = 0, i, j;

	scanf("%d %d %d", &a, &b, &k);

	if (a < b)
	{
		tmp = a;
		a = b;
		b = tmp;
	}

	for (i = b; i > 0; i--)
	{
		if ((a % i + b % i) == 0)
		{
			ans += 1;
		}
		if (ans == k)
		{
			break;
		}

	}
	printf("%d", i);
	return 0;
}
//abc119-A
int main(void)
{
	int a, b, c;
	scanf("%d/%d/%d", &a, &b, &c);
	if (b < 5)
	{
		printf("Heisei");
	}
	else
	{
		printf("TBD");
	}

	
	return 0;
}
//abc119-b
int main(void)
{
	int a, i;
	float sum = 0;
	char s[15];
	float y;

	scanf_s("%d", &a);
	for (i = 0; i < a; i++)
	{
		scanf_s("%f", &y);
		scanf_s("%s", s, 15);
		if (strcmp(s, "JPY") == 0)
		{
			sum += y;
		}

		else
		{
			sum += y * 380000;
		}
	}
	printf("%f", sum);
	return 0;
}
//abc118-a
int main(void)
{
	int a, b;
	scanf("%d %d", &a, &b);
	if (b % a == 0)
	{
		printf("%d", a + b);
	}
	else
	{
		printf("%d", b - a);
	}

	return 0;
}*/

int main(void)
{
	int N,i,j,temp,total=0;
	int L[50];
	scanf("%d", &N);

	for (i = 0; i < N; i++)
	{
		scanf_s("%d", &L[i]);
	}

	for (i = 0; i < N; i++)
	{
		for (j = i + 1; j < N; j++)
		{
			if (L[i] < L[j])
			{
				temp = L[i];
				L[i] = L[j];
				L[j] = temp;
			}
		}
	}
	for (i = 1; i < N; i++)
	{
		total += L[i];
	}

	if (L[0] < total)
	{
		printf("Yes");
	}
	else
	{
		printf("No");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:120:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
  120 |                 scanf_s("%d", &L[i]);
      |                 ^~~~~~~
      |                 scanf
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int arr[] = new int[N];

        int max = arr[0];
        int maxLength = arr[0];
        
        for (int i = 1; i < N; i++) {
            if (arr[i] > max) {
                max = arr[i];
            }

            maxLength += arr[i];
        }

        if (max >= maxLength) {
            System.out.println("No");
        } else if {
            System.out.println("Yes");
        }

     }
}

Compiler output:
Main.java:22: error: '(' expected
        } else if {
                 ^
Main.java:22: error: illegal start of expression
        } else if {
                  ^
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();
        int arr[] = new int[N];

        int max = arr[0];
        int maxLength = arr[0];
        
        for (int i = 1; i < N; i++) {
            if (arr[i] > max) {
                max = arr[i];
            }

            maxLength += arr[i];
        }

        if (max >= maxLength) {
            System.out.println("No");
        } else if (
            System.out.println("Yes");
        )

     }
}

Compiler output:
Main.java:23: error: ')' expected
            System.out.println("Yes");
                                     ^
Main.java:24: error: illegal start of expression
        )
        ^
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();
        int arr[] = new int[N];

        int max = arr[0];
        int maxLength = arr[0];
        
        for (i = 1; i < N; i++) {
            if (arr[i] > max) {
                max = arr[i];
            }

            maxLength += arr[i];
        }

        if (max >= maxLength) {
            System.out.println("No");
        } else if (
            System.out.println("Yes");
        )

     }
}

Compiler output:
Main.java:23: error: ')' expected
            System.out.println("Yes");
                                     ^
Main.java:24: error: illegal start of expression
        )
        ^
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();
        int arr[] = new int;

        int max = arr[0];
        int maxLength = arr[0];
        
        for (i = 1; i < N; i++) {
            if (arr[i] > max) {
                max = arr[i];
            }

            maxLength += arr[i];
        }

        if (max >= maxLength) {
            System.out.println("No");
        } else if (
            System.out.println("Yes");
        )

     }
}

Compiler output:
Main.java:7: error: '[' expected
        int arr[] = new int;
                           ^
Main.java:23: error: ')' expected
            System.out.println("Yes");
                                     ^
Main.java:24: error: illegal start of expression
        )
        ^
3 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();
        int arr[] = new int;

        int max = arr[0];
        int maxLength = arr[0];
        
        for (i = 1; i < N; i++) {
            if (arr[i] > max) {
                max = arr[i];
            }

            maxLength += arr[i]
        }

        if (max >= maxLength) {
            System.out.println("No");
        } else if (
            System.out.println("Yes");
        )

     }
}

Compiler output:
Main.java:7: error: '[' expected
        int arr[] = new int;
                           ^
Main.java:17: error: ';' expected
            maxLength += arr[i]
                               ^
Main.java:23: error: ')' expected
            System.out.println("Yes");
                                     ^
Main.java:24: error: illegal start of expression
        )
        ^
4 errors
Language: C++

#include <stdio.h>
#include <vector>
#include <iostream>
#include <string>
using namespace std;

typedef long double ld;

int main() {
  int N,sum;
  cin>>N;
  vector<int> L(N);
  sum = 0;
  for(int i = 0; i < N; i++) {
    cin>>L[i];
    sum+= L[i];
  }
  sort(L.begin(),L.end());
  if (L[N-1] < sum - L[N-1]) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |   sort(L.begin(),L.end());
      |   ^~~~
      |   short
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
  int n; cin >> n;
  vector<int>len(n);
  for(int i = 0;i < n;i++){
    cin >> len[i];
  }
  int max = max_element(len.begin(),len.end());
  int sum = 0;
  for(int i = 0;i < n;i++){
    sum += len[i];
  }
  if(max >= sum - max){
    cout << "No" << endl;
  }else{
    cout << "Yes" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   11 |   int max = max_element(len.begin(),len.end());
      |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
      |                        |
      |                        __gnu_cxx::__normal_iterator<int*, std::vector<int> >
Language: C

int main(void){
    int n;
    int i,sum;
    int maxl = 0;
    scanf("%d",&n);
    int a[n];
    int i,sum;
    int maxl = 0;
    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
    }
    for (i=0;i<n;i++){
        if (a[i]>maxl){
            maxl = a[i];
        }
    }
    for (i=0;i<n;i++){
        sum += a[i];
    }
    if (maxl>sum-maxl){
        printf("Yes");
    }else{
        printf("No");
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |     scanf("%d",&n);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:5:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |     scanf("%d",&n);
      |     ^~~~~
main.c:5:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:9: error: redeclaration of 'i' with no linkage
    7 |     int i,sum;
      |         ^
main.c:3:9: note: previous declaration of 'i' with type 'int'
    3 |     int i,sum;
      |         ^
main.c:7:11: error: redeclaration of 'sum' with no linkage
    7 |     int i,sum;
      |           ^~~
main.c:3:11: note: previous declaration of 'sum' with type 'int'
    3 |     int i,sum;
      |           ^~~
main.c:8:9: error: redefinition of 'maxl'
    8 |     int maxl = 0;
      |         ^~~~
main.c:4:9: note: previous definition of 'maxl' with type 'int'
    4 |     int maxl = 0;
      |         ^~~~
main.c:21:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   21 |         printf("Yes");
      |         ^~~~~~
main.c:21:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:21:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:23:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   23 |         printf("No");
      |         ^~~~~~
main.c:23:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main(void){
    int n;
    scanf("%d",&n);
    int a[n];
    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
    }
    int i,sum;
    int maxl = 0;
    for (i=0;i<n;i++){
        if (a[i]>maxl){
            maxl = a[i];
        }
    }
    for (i=0;i<n;i++){
        sum += a[i];
    }
    if (maxl>sum-maxl){
        printf("Yes");
    }else{
        printf("No");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |     scanf("%d",&n);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:3:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |     scanf("%d",&n);
      |     ^~~~~
main.c:3:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:9: error: 'i' undeclared (first use in this function)
    5 |     for(i=0;i<n;i++){
      |         ^
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   19 |         printf("Yes");
      |         ^~~~~~
main.c:19:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:19:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   21 |         printf("No");
      |         ^~~~~~
main.c:21:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define pb(a) push_back(a)
using namespace std;
typedef long long ll;

int main()
{
    int N;
    cin >> N;

    vector<int> A(N);
    REP(i, N)
    {
        cin >> A.at(i);
    }

    sort(A.begin(), A.end());

    int s = 0;
    REP(i, N - 1)
    {
        s += A.at(i);
    }
˜
    if (s > A.at(N - 1))
        cout << "Yes";
    else
        cout << "No";
}

Compiler output:
a.cc:28:2: error: stray '\16' in program
   28 | <U+02DC><U+000E>
      |         ^~~~~~~~
a.cc: In function 'int main()':
a.cc:28:1: error: '\U000002dc' was not declared in this scope
   28 | ˜
      | ^
a.cc:31:5: error: 'else' without a previous 'if'
   31 |     else
      |     ^~~~
Language: C++

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

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected unqualified-id before '=' token
   12 |   for(int = 0; i < N; i++){
      |           ^
a.cc:12:10: error: expected ';' before '=' token
   12 |   for(int = 0; i < N; i++){
      |          ^~
      |          ;
a.cc:12:11: error: expected primary-expression before '=' token
   12 |   for(int = 0; i < N; i++){
      |           ^
a.cc:12:16: error: 'i' was not declared in this scope
   12 |   for(int = 0; i < N; i++){
      |                ^
a.cc:12:21: error: expected ')' before ';' token
   12 |   for(int = 0; i < N; i++){
      |      ~              ^
      |                     )
a.cc:12:23: error: 'i' was not declared in this scope
   12 |   for(int = 0; i < N; i++){
      |                       ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(void) {
  int N = 0;
  int L[100];
  int maxNum = 0;
  int lengthSum = 0;
  
  cin >> N;
  if(N == 0) {
    cout << "N error" << endl;
  }
  
  //L[]を取得
  for(int ii = 0;ii < N; ii++) {
    cin >> L[ii];
  }
  
  for(int ii = 0; ii < N; ii++) {
    if(L[ii] > maxNum) {
      maxNum = L[ii]
    }
    
    lengthSum = lengthSum + L[ii];
    
  }
  
  if(maxNum >= (lengthSum - maxNum) ) {
    cout << "No" << endl;
  }
  else {
    cout << "Yes" << endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:21: error: expected ';' before '}' token
   24 |       maxNum = L[ii]
      |                     ^
      |                     ;
   25 |     }
      |     ~
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n=sc.next();
        int[] a=new int[n];
        int sum,temp=0;
        for(int i=0;i<n;i++){
           a[i]=sc.nextInt();
        }
        for(int i=0;i<n;i++){
           temp=a[i]>temp?a[i]:temp;
           sum+=a[i];
        }
        if(temp<sum-temp){
           System.out.println("Yes");
        }else{
           System.out.println("No");
        }
    }
}


Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to int
        int n=sc.next();
                     ^
1 error
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n=sc.next();
        int[] a=new int[n];
        int sum,temp=0;
        for(int i=0;i<n;i++){
           a[i]=sc.nextInt();
           temp=a[i]>temp?a[i]:temp;
           sum+=a[i];
        }
        if(temp<sum-temp){
           System.out.println("Yes");
        }else{
           System.out.println("No");
        }
    }
}


Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to int
        int n=sc.next();
                     ^
1 error
Language: C++

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

int main(){
 int a;
  cin>>a;
  vector<double> n(a+2);
  n[a]=0;
  n[a+1]=0;
  for(int i=0;i<a;i++){
    cin>>n[i];
    n[a]=max(n[a],n[i]);
    }
  for(int i=0;i<b+1;i++){
    if(n[i]!=n[a]){
 n[a+1]+=n[i]
    }
  }
  if(n[a+1]/2>n[a]){
       cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'b' was not declared in this scope
   14 |   for(int i=0;i<b+1;i++){
      |                 ^
a.cc:16:14: error: expected ';' before '}' token
   16 |  n[a+1]+=n[i]
      |              ^
      |              ;
   17 |     }
      |     ~
Language: C++

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

int main() {
   
  int N;
  cin >> N;
  vector<int> L(N);
  int LMAX;
  int S;
  for(int i=0;i<N;i++){
    cin >> L.at(i);
    cout<<L.at(i)<<endl;
      if(L.at(i)>Lmax){
        Lmax=L.at(i);
      }
    S=S+L.at(i);
  }
  if(S-Lmax > Lmax){
    cout<<"YES"<<endl;
  }
    else{
      cout<<"no"<<endl;
    }
}
  
  
    
  

  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: 'Lmax' was not declared in this scope; did you mean 'fmax'?
   14 |       if(L.at(i)>Lmax){
      |                  ^~~~
      |                  fmax
a.cc:19:8: error: 'Lmax' was not declared in this scope; did you mean 'fmax'?
   19 |   if(S-Lmax > Lmax){
      |        ^~~~
      |        fmax
Language: C++

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

int main() {
  int a , b , c , d , e;
  
  cin >> a;
  b = 0;
  c = 0;
  d = 0;
  e = 0;
  
  while(a>=b){
    
    b = b+1;
    cin >> c;
      
    if(c > d){
      d = c}
    
    e = e + c}
  
  e = e - d
  
  if(d > e){
    cout << "Yes" << endl}
  else{
    cout << "No" << endl}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: expected ';' before '}' token
   19 |       d = c}
      |            ^
      |            ;
a.cc:21:14: error: expected ';' before '}' token
   21 |     e = e + c}
      |              ^
      |              ;
a.cc:23:12: error: expected ';' before 'if'
   23 |   e = e - d
      |            ^
      |            ;
   24 | 
   25 |   if(d > e){
      |   ~~        
a.cc:27:3: error: 'else' without a previous 'if'
   27 |   else{
      |   ^~~~
a.cc:28:25: error: expected ';' before '}' token
   28 |     cout << "No" << endl}
      |                         ^
      |                         ;
Language: C++

#include <iostrea>
#include <vector>
using namespace std;

int main(){
  	int N;
  	cin >> N;
  	vector<int> l(N);
  	int sum = 0;
  	for(int i=0; i<N; i++){
    	cin >> l[i];
      	sum += l[i];
    }
  	string ans = "No";
  	for(int i=0; i<N; i++){
    	if(l[i] < sum - l[i]){
        	ans = "Yes";
          	break;
        }
    }
  	cout << ans << endl;
	return 0;
}

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

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

int main(){
  int N;
  cin >> N;
  int maxx;
  int l;
  int sum=0;
  for (int i=0;i<N<;i++){
    cin >> l;
    sum+=l;
    maxx=max(l,maxx);
  }
  string ans=sum>l*2?"Yes":"No";
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected primary-expression before ';' token
   10 |   for (int i=0;i<N<;i++){
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
const long long INF = 1LL << 60;
template <class T> bool chmin(T& a, T b){if (a > b) {a = b; return true;} return false;}
template <class T> bool chmax(T& a, T b){if (a < b) {a = b; return true;} return false;}
int divCeil(int A, int B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, int B) {return (A + (B - 1)) / B;}
long long divCeil(int A, long long B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, long long B) {return (A + (B - 1)) / B;}

int main()
{
  int N;
  cin >> N;
  
  int sum = 0;
  int max = 0;
  for (int i = 0; i < N; i++)
  {
    int L;
    cin >> L;
    chmax(max, L);
    sum += L;
  }
  
  string ans = "No";
  if (max < sum - L) ans = "Yes";
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:19: error: 'L' was not declared in this scope
   28 |   if (max < sum - L) ans = "Yes";
      |                   ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: expected unqualified-id before '(' token
   12 |   int max = l.(n-1);
      |               ^
a.cc:17:13: error: 'Yes' was not declared in this scope
   17 |     cout << Yes << endl;
      |             ^~~
a.cc:20:13: error: 'No' was not declared in this scope
   20 |     cout << No << endl;
      |             ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'i' was not declared in this scope
    6 |   sort(i.begin(), i.end());
      |        ^
Language: C++

#include <iostream>
#include <vector>

int main(){
	int N;
	std::vector<int> hen;	
	int cnt=0;
	std::cin>>N;
	for(int i=0;i<N;++i){
		int temp;
		std::cin>>temp;
		hen.push_back(temp);
		cnt += temp;
	}
	int max = *std::max_element(hen.begin(),hen.end());
	if(max < cnt - max){
		std::cout<<"Yes"<<std::endl;
	}else{
		std::cout<<"No"<<std::endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: 'max_element' is not a member of 'std'; did you mean 'tuple_element'?
   15 |         int max = *std::max_element(hen.begin(),hen.end());
      |                         ^~~~~~~~~~~
      |                         tuple_element
Language: C++

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

int main()
{
int n,i,k=0,sum=0,number=0;
  cin >> n;
  int a[n];
  for(i=0;i<n;i++)
  {
  cin >> a[n];
  }
 for(i=0;i<n;i++)
  {
   
  k=max(k,a[i])
   
   sum+=a[i];
  }
  
  if(sum -k > k)cout << "Yes" << endl;
  if(sum-k <= k)cout << "No" << endl;
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: expected ';' before 'sum'
   17 |   k=max(k,a[i])
      |                ^
      |                ;
   18 | 
   19 |    sum+=a[i];
      |    ~~~
Language: C++

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

int main()
{
int n,i,k=0,sum=0,number=0;
  cin >> n;
  int a[n];
  for(i=0;i<n;i++)
  {
  cin >> a[n];
  }
 for(i=0;i<n;i++)
  {
   
   if(k<=a[i])
   {
   number = i;
   }
   
   sum+=a[i]
  }
  
  if(sum -a[number] > a[number])cout << "Yes" << endl;
  if(sum -a[number] <= a[number])cout << "No" << endl;
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: expected ';' before '}' token
   22 |    sum+=a[i]
      |             ^
      |             ;
   23 |   }
      |   ~
Language: C++

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

int main()
{
int n,i,sum=0,number=0;
  cin >> n;
  int a[n];
  for(i=0;i<n;i++)
  {
  cin >> a[n];
  }
 for(i=0;i<n;i++)
  {
   
   if(k<=a[i])
   {
   number = i;
   }
   
   sum+=a[i]
  }
  if(sum -a[number] > a[number])cout << "Yes" << endl;
  if(sum -a[number] <= a[number])cout << "No" << endl;
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: 'k' was not declared in this scope
   17 |    if(k<=a[i])
      |       ^
a.cc:22:13: error: expected ';' before '}' token
   22 |    sum+=a[i]
      |             ^
      |             ;
   23 |   }
      |   ~
Language: C++

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

int main()
{
int n,i,sum=0,number=0;
  cin >> n;
  int a[n];
  for(i=0;i<n;i++)
  {
  cin >> a[n];
  }
 for(i=0;i<n;i++)
  {
   if(k<=a[i])
   {
   number = i;
   }
   sum+=a[i]
  }
  if(sum -a[number] > a[number]) cout << "Yes" << endl;
  if(sum -a[number] <= a[number])cout << "No" << endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: 'k' was not declared in this scope
   16 |    if(k<=a[i])
      |       ^
a.cc:20:13: error: expected ';' before '}' token
   20 |    sum+=a[i]
      |             ^
      |             ;
   21 |   }
      |   ~
Language: C++

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

int main(){
  int N;
  cin >> N;
  vector<int> l(N,0);
  for(int i=0;i<N;i++){
    cin >> l.at(i);
  }
  
  sort(l.begin(),l.end());
  int sum,mxl;
  for(int i=0;i<N-1;i++){
    sum += l.at(i);
  }
  int mxl = l.at(N-1);
  
  if(mxl < sum){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: redeclaration of 'int mxl'
   17 |   int mxl = l.at(N-1);
      |       ^~~
a.cc:13:11: note: 'int mxl' previously declared here
   13 |   int sum,mxl;
      |           ^~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
    int N;
    cin>>N;
    vector<int> edge(N);
    for(int i=0;i<N;i++){
        cin>>edge.at(i);
    }
    sort(edge.rbegin(),edge.rend());

    int sum=0;
    for(int i=1;i<N;i++){
        sum+=edge.at(i);
    }
    if(sum<edge.at(i)) cout<<"No"<<endl;
    else cout<<"Yes"<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: 'i' was not declared in this scope
   18 |     if(sum<edge.at(i)) cout<<"No"<<endl;
      |                    ^
Language: C++

#include <iostream>

int main(void) {
  int n, l, lmax, lsum;
  lmax = 0;
  lsum = 0;
  for (int i = 0; i < n; i++) {
    cin >> l;
    if (l > lmax) lmax = l;
    lsum += l;
  }
  if (lsum - lmax > lmax) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |     cin >> l;
      |     ^~~
      |     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:12:27: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |   if (lsum - lmax > lmax) cout << "Yes" << endl;
      |                           ^~~~
      |                           std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:44: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |   if (lsum - lmax > lmax) cout << "Yes" << endl;
      |                                            ^~~~
      |                                            std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:13:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   else cout << "No" << endl;
      |        ^~~~
      |        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |   else cout << "No" << endl;
      |                        ^~~~
      |                        std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main() {
  int N, i, M = 0, other = 0;
  cin >> N;
  vector<int> L(N);
  
  for(i = 0; i < N; i++){
    cin >> L.at(i);
  }
  
  M += max({L});
  other += sum({L}) - max({L});
  
  if(M < other){
    cout << "Yes" << endl;
  }
  
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: no match for 'operator+=' (operand types are 'int' and 'std::vector<int>')
   13 |   M += max({L});
      |   ~~^~~~~~~~~~~
a.cc:14:12: error: 'sum' was not declared in this scope
   14 |   other += sum({L}) - max({L});
      |            ^~~
Language: C++

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

int main() {
  int N, i, M, other;
  cin >> N;
  vector<int> L(N);
  
  for(i = 0; i < N; i++){
    cin >> L.at(i);
  }
  
  M = max({L});
  other = sum({L}) - max({L});
  
  if(M < other){
    cout << "Yes" << endl;
  }
  
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: cannot convert 'std::vector<int>' to 'int' in assignment
   13 |   M = max({L});
      |       ~~~^~~~~
      |          |
      |          std::vector<int>
a.cc:14:11: error: 'sum' was not declared in this scope
   14 |   other = sum({L}) - max({L});
      |           ^~~
Language: C++

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

int main() {
  int N;
  cin>>N;
  
  int a[11];
  for(int i=0;i<N;++i){
    cin>>a[i];
  }
  
  int max=0;
  int sum=0;
  for(int i=0;i<N;++i){
    max=max(max,a[i]);
  }
  
  for(int i=0;i<N;++i){
    sum=sum+a[i];
  }
  
  if(2*max<sum)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: 'max' cannot be used as a function
   18 |     max=max(max,a[i]);
      |         ~~~^~~~~~~~~~
Language: C++

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

#define FOR(i,a,b) for(int i = (a);i < (b);++i)
typedef long long ll;

int main(){
    int n;cin >> n;
    vector<int> l(n);
    for(int i = 0;i < n;i++) cin >> l[i];
    sort(l.begin(),l.end());
    int sum = 0;
    for(int i = 0;i < n-1;i++) sum += l[i];
    if(a > l[n]) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0; 
 } 

Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: 'a' was not declared in this scope
   14 |     if(a > l[n]) cout << "Yes" << endl;
      |        ^
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);
  }
  
  sort(L.begin(),L.end());
  int sum = 0;
  for(int i = 0; i < N-1; i++){
    sum += L.at(i)
  }
  
  if(sum > L.at(N-1)){
    cout << "No";
  }
  else{
    cout << "Yes";
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: expected ';' before '}' token
   15 |     sum += L.at(i)
      |                   ^
      |                   ;
   16 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  	int N;cin >> N;
    vector<int> L(N);
    int sum = 0;

    //入力を受け入れる
    for(int i = 0;i < N;i++){

        cin >> L[i];
    }

    //大きい順にソート
    sort(L.begin() , L.end());
    reverse(L.begin() , L.end());

        //sumの計算
    for(int i = 1; i < N;i++)
      
        sum += L.at(i);
    }

    //判別
    if(L.at(0) < sum){
      
        cout << "Yes" << endl;
    }
    else{
      
        cout << "No" << endl;
    }

 return 0;
}

Compiler output:
a.cc:25:5: error: expected unqualified-id before 'if'
   25 |     if(L.at(0) < sum){
      |     ^~
a.cc:29:5: error: expected unqualified-id before 'else'
   29 |     else{
      |     ^~~~
a.cc:34:2: error: expected unqualified-id before 'return'
   34 |  return 0;
      |  ^~~~~~
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
Language: C++

#include <iostream>
#include <queue>
#include <numeric>

using namespace std;

int N;
int L[102];

int main()
{
    cin >> N;

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

    int max = *max_element(L, L+N);
    int sum = accumulate(L, L + N, 0);

    if (sum - max > max) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }

    return 0;
}


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

#include <iostream>
#include <numeric>

using namespace std;

int N;
int L[102];

int main()
{
    cin >> N;

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

    int max = *max_element(L, L+N);
    int sum = accumulate(L, L + N, 0);

    if (sum - max > max) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }

    return 0;
}


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

#include <algorithm>
#include <iostream>
#include <string>

using namespace std;

#define FOR(i, a, b) for (int i = a; i < b; i++)
#define REP(i, n) for (int i = 0; i < n; i++)

int main() {
  int N;
  vector<int> L(N);
  sort(L.begin(), L.end());

  int sum = 0;
  REP(i, N - 1) { sum += L[i]; }

  if (sum > L[N - 1]) {
    cout << "Yes" << endl;
    return 0;
  }

  cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'vector' was not declared in this scope
   12 |   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 <iostream>
  +++ |+#include <vector>
    3 | #include <string>
a.cc:12:10: error: expected primary-expression before 'int'
   12 |   vector<int> L(N);
      |          ^~~
a.cc:13:8: error: 'L' was not declared in this scope
   13 |   sort(L.begin(), L.end());
      |        ^
Language: C++

#include <iostream>
#include<algorithm>

using namespace std;

#define FOR(i, a, b) for (int i = a; i < b; i++)
#define REP(i, n) for (int i = 0; i < n; i++)

int main() {
  int N;
  vector<int> L(N);
  sort(L.begin(), L.end());

  int sum = 0;
  REP(i, N - 1) { sum += L[i]; }

  if (sum > L[N - 1]) {
    cout << "Yes" << endl;
    return 0;
  }

  cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'vector' was not declared in this scope
   11 |   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<algorithm>
  +++ |+#include <vector>
    3 | 
a.cc:11:10: error: expected primary-expression before 'int'
   11 |   vector<int> L(N);
      |          ^~~
a.cc:12:8: error: 'L' was not declared in this scope
   12 |   sort(L.begin(), L.end());
      |        ^
Language: C++

#include <iostream>

using namespace std;

#define FOR(i, a, b) for (int i = a; i < b; i++)
#define REP(i, n) for (int i = 0; i < n; i++)

int main() {
  int N;
  vector<int> L(N);
  sort(L.begin(), L.end());

  int sum = 0;
  REP(i, N - 1) { sum += L[i]; }

  if (sum > L[N - 1]) {
    cout << "Yes" << endl;
    return 0;
  }

  cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'vector' was not declared in this scope
   10 |   vector<int> L(N);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | 
a.cc:10:10: error: expected primary-expression before 'int'
   10 |   vector<int> L(N);
      |          ^~~
a.cc:11:8: error: 'L' was not declared in this scope
   11 |   sort(L.begin(), L.end());
      |        ^
a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |   sort(L.begin(), L.end());
      |   ^~~~
      |   short
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: overloaded function with no contextual type information
   12 |     max = (maxL, L);
      |                   ^