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

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
   int N;
  cin >> N;
  vector<int> math(N);
  
  for (int i = 0; i < N; i++) {
    cin >> math.at(i);
}
  // 合計値を求める
  int sum = std::accumulate(math.begin(), math.end(), 0);
  
if (max < sum-max) {
  cout << "Yes" << std::endl;
}
 
if (max > sum-max) {
  cout << "No" << std::endl;
}
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-'
   16 | if (max < sum-max) {
      |           ~~~^~~~
a.cc:16:5: error: parse error in template argument list
   16 | if (max < sum-max) {
      |     ^~~~~~~~~~~~~
a.cc:16:18: error: cannot resolve overloaded function 'max' based on conversion to type 'bool'
   16 | if (max < sum-max) {
      |                  ^
a.cc:20:14: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-'
   20 | if (max > sum-max) {
      |           ~~~^~~~
Language: Java

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
 
public class Main {
  public static void main(String... args) {
  	Scanner sc = new Scanner(System.in);
    int[] lines = new int[sc.nextInt()];
    
    for(int i = 0; sc.hasNext(); i++) {
      line[i] = sc.nextInt();
    }
    
    List<Integer> list = Arrays.asList(lines);
    
    if(Collections.max(list) >= sum(list)) {
    	System.out.println("Yes");
    } else {
    	System.out.println("No");
    }
  }
  
  public static int sum(List<Integer> value) {
    int sum = 0;
    
    for(int value : values) {
      sum += value;
    }
    
    return sum - Collections.max(values);
  }
}

Compiler output:
Main.java:12: error: cannot find symbol
      line[i] = sc.nextInt();
      ^
  symbol:   variable line
  location: class Main
Main.java:15: error: incompatible types: inference variable T has incompatible bounds
    List<Integer> list = Arrays.asList(lines);
                                      ^
    equality constraints: Integer
    lower bounds: int[]
  where T is a type-variable:
    T extends Object declared in method <T>asList(T...)
Main.java:27: error: cannot find symbol
    for(int value : values) {
                    ^
  symbol:   variable values
  location: class Main
Main.java:27: error: variable value is already defined in method sum(List<Integer>)
    for(int value : values) {
            ^
Main.java:31: error: cannot find symbol
    return sum - Collections.max(values);
                                 ^
  symbol:   variable values
  location: class Main
5 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
   int N;
  cin >> N;
  vector<int> math(N);
  
  for (int i = 0; i < N; i++) {
    cin >> math.at(i);
}
  // 合計値を求める
  int sum = std::accumulate(math.begin(), math.end(), 0);
  
if (max<sum-max) {
  cout << "Yes" << std::endl;
}
 
if (max>sum-max) {
  cout << "No" << std::endl;
}
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-'
   16 | if (max<sum-max) {
      |         ~~~^~~~
a.cc:16:5: error: parse error in template argument list
   16 | if (max<sum-max) {
      |     ^~~~~~~~~~~
a.cc:16:16: error: cannot resolve overloaded function 'max' based on conversion to type 'bool'
   16 | if (max<sum-max) {
      |                ^
a.cc:20:12: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-'
   20 | if (max>sum-max) {
      |         ~~~^~~~
Language: Java

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
 
public class Main {
  public static void main(String... args) {
  	Scanner sc = new Scanner(System.in);
    int lines = new int[sc.nextInt()];
    
    for(int i = 0; sc.hasNext(); i++) {
      line[i] = sc.nextInt();
    }
    
    List<Integer> list = Arrays.asList(lines);
    
    if(Collections.max(list) >= sum(list)) {
    	System.out.println("Yes");
    } else {
    	System.out.println("No");
    }
  }
  
  public static int sum(List<Integer> value) {
    int sun = 0;
    
    for(int value : values) {
      sum += value;
    }
    
    return sum - Collections.max(values);
  }
}

Compiler output:
Main.java:9: error: incompatible types: int[] cannot be converted to int
    int lines = new int[sc.nextInt()];
                ^
Main.java:12: error: cannot find symbol
      line[i] = sc.nextInt();
      ^
  symbol:   variable line
  location: class Main
Main.java:27: error: cannot find symbol
    for(int value : values) {
                    ^
  symbol:   variable values
  location: class Main
Main.java:27: error: variable value is already defined in method sum(List<Integer>)
    for(int value : values) {
            ^
Main.java:28: error: cannot find symbol
      sum += value;
      ^
  symbol:   variable sum
  location: class Main
Main.java:31: error: cannot find symbol
    return sum - Collections.max(values);
           ^
  symbol:   variable sum
  location: class Main
Main.java:31: error: cannot find symbol
    return sum - Collections.max(values);
                                 ^
  symbol:   variable values
  location: class Main
7 errors
Language: C++

#include<bits/c++.h>
#include<iostream>
#include<vector>
using namespace std;

int main() {
	int N, dmy = 0, dmy2, max = 0, sum = 0;
	vector<int> L(N);
	cin >> N;
	while (cin >> dmy2) {
		L[dmy] = dmy2;
		dmy++;
	}
	for (int a = 0; a <= N; a++) {
		if (max < L[a]) {
			max = L[a];
		}
	}
	for (int a = 0; a <= N - 1; a++) {
		sum += L[a];
	}
	if (max < sum) {
		cout << "Yes";
	}
	else
		cout << "No";
}

Compiler output:
a.cc:1:9: fatal error: bits/c++.h: No such file or directory
    1 | #include<bits/c++.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
#include <stdlib.h>

int max(int *L);

int main(void) {
	int N, temp = 0;
	int *L;
	scanf("%d,", &N);
	L = (int *)malloc(sizeof(int) * N );
	for (int i = 0; i < N; ++i) {
		scanf("%d", &L[i]);
		if (L[i] > temp) temp = L[i];
	}
	int sum = 0;
	int flag = 0;
	for (int i = 0; i < N; ++i) {
		if (L[i] < temp || (L[i] == temp && flag == 1)) {
			sum += L[i];
		}else(L[i] == temp){
		    flag = 1;
		}
	}
	//printf("%d %d\n",temp,sum);
	sum > temp ? printf("Yes\n") : printf("No\n");

	free(L);

}

Compiler output:
main.c: In function 'main':
main.c:20:36: error: expected ';' before '{' token
   20 |                 }else(L[i] == temp){
      |                                    ^
      |                                    ;
Language: C++

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


int main() {
  int N;
  int max;
  int sum;
  max =0;

  cin>>N;
  vector<int> L(N);
  for(int i =0; i<N;i++){
    cin>>L.at(i);}
  for(int i =0; i<N;i++){
    if (max < L.at(i)){
      max=L.at(i);
    }
  }
  int i =0;
  while(i<N){
    sum=sum+L.at(i)
    i++;
  }

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:20: error: expected ';' before 'i'
   22 |     sum=sum+L.at(i)
      |                    ^
      |                    ;
   23 |     i++;
      |     ~
Language: C

#include<stdio.h>


int main(void)
{
  int k, j, tmp, total, i, ans;

  int number[10];


  scanf("%d", &total);

  for (k=0; k<total; ++k){
    scanf("%d", &number[k]);
  }

  for (k=0; k<total; ++k) {
    for (j=k+1; j<total; ++j) {
      if (number[k] > number[j]) {
        tmp = number[k];
        number[k] = number[j];
        number[j] = tmp;
      }
    }
  }
  ans = number - number[total]

  if (number[total] < ans){
    printf("Yes");
  }else if (number[total] >= ans){
    printf("No");
  }

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:26:7: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   26 |   ans = number - number[total]
      |       ^
main.c:26:31: error: expected ';' before 'if'
   26 |   ans = number - number[total]
      |                               ^
      |                               ;
   27 | 
   28 |   if (number[total] < ans){
      |   ~~
Language: C++

< n; i++) {
		if (max < l[i]) {
			max = l[i];
		}
	}


	for (i = 0; i < n; i++) {
			sum = sum + l[i];

	}

	sum = sum - max;

	if (sum > max) {
		printf("Yes\n");
	}
	else {
		printf("No\n");
	}

	return 0;


}

Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | < n; i++) {
      | ^
a.cc:1:6: error: 'i' does not name a type
    1 | < n; i++) {
      |      ^
a.cc:8:9: error: expected unqualified-id before 'for'
    8 |         for (i = 0; i < n; i++) {
      |         ^~~
a.cc:8:21: error: 'i' does not name a type
    8 |         for (i = 0; i < n; i++) {
      |                     ^
a.cc:8:28: error: 'i' does not name a type
    8 |         for (i = 0; i < n; i++) {
      |                            ^
a.cc:13:9: error: 'sum' does not name a type
   13 |         sum = sum - max;
      |         ^~~
a.cc:15:9: error: expected unqualified-id before 'if'
   15 |         if (sum > max) {
      |         ^~
a.cc:18:9: error: expected unqualified-id before 'else'
   18 |         else {
      |         ^~~~
a.cc:22:9: error: expected unqualified-id before 'return'
   22 |         return 0;
      |         ^~~~~~
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C

#include<stdio.h>


int main(void)
{
  int k, j, tmp, total, i, ans;

  int number[10];

  int total;
  scanf("%d", &total);

  for (k=0; k<total; ++k){
    scanf("%d", &number[k]);
  }

  for (k=0; k<total; ++k) {
    for (j=k+1; j<total; ++j) {
      if (number[k] > number[j]) {
        tmp = number[k];
        number[k] = number[j];
        number[j] = tmp;
      }
    }
  }
  for(i=0; i<n; i++){
      ans += number[i];   // 合計を計算
  }

  if (number[total] < ans){
    printf("Yes");
  }else if (number[total] >= ans){
    printf("No");
  }

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:7: error: redeclaration of 'total' with no linkage
   10 |   int total;
      |       ^~~~~
main.c:6:18: note: previous declaration of 'total' with type 'int'
    6 |   int k, j, tmp, total, i, ans;
      |                  ^~~~~
main.c:26:14: error: 'n' undeclared (first use in this function)
   26 |   for(i=0; i<n; i++){
      |              ^
main.c:26:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>


int main(void)
{
  int k, j, tmp, total, i;

  int number[10];

  int total;
  scanf("%d", &total);

  for (k=0; k<total; ++k){
    scanf("%d", &number[k]);
  }

  for (k=0; k<total; ++k) {
    for (j=k+1; j<total; ++j) {
      if (number[k] > number[j]) {
        tmp = number[k];
        number[k] = number[j];
        number[j] = tmp;
      }
    }
  }
  for(i=0; i<n; i++){
      total += number[i];   // 合計を計算
  }

  if (number[0] < total){
    printf("Yes");
  }else if (number[0] >= total){
    printf("No");
  }

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:7: error: redeclaration of 'total' with no linkage
   10 |   int total;
      |       ^~~~~
main.c:6:18: note: previous declaration of 'total' with type 'int'
    6 |   int k, j, tmp, total, i;
      |                  ^~~~~
main.c:26:14: error: 'n' undeclared (first use in this function)
   26 |   for(i=0; i<n; i++){
      |              ^
main.c:26:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: 'M' was not declared in this scope
   11 |     if(n > M){
      |            ^
Language: C

#include<stdio.h>

int sum(int data[], int n)
{
    int i;
    int total;     // 変数の宣言
  
    for(i=0; i<n; i++){
        total += data[i];   // 合計を計算
    }
      
    return total;           // 合計を返す
}
int main(void)
{
  int k, j, tmp, ans;

  int number[10];

  int total;
  scanf("%d", &total);

  for (k=0; k<total; ++k){
    scanf("%d", &number[k]);
  }

  for (k=0; k<total; ++k) {
    for (j=k+1; j<total; ++j) {
      if (number[k] > number[j]) {
        tmp = number[k];
        number[k] = number[j];
        number[j] = tmp;
      }
    }
  }
  ans = sum(number);

  if (number[0] < ans){
    printf("Yes");
  }else if (number[0] >= ans){
    printf("No");
  }

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:36:9: error: too few arguments to function 'sum'
   36 |   ans = sum(number);
      |         ^~~
main.c:3:5: note: declared here
    3 | int sum(int data[], int n)
      |     ^~~
Language: C++

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

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

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

}

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

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: no matching function for call to 'max(int&)'
   14 |   m = max(L[i]);
      |       ~~~^~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
a.cc:16:7: error: 'j' was not declared in this scope
   16 |   for(j=0;j<N;j++){
      |       ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: 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 <algorithm>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> L(N);
      |          ^~~
a.cc:9:33: error: 'L' was not declared in this scope
    9 |   for(int i=0; i<N; ++i) cin >> L.at(i);
      |                                 ^
a.cc:10:8: error: 'L' was not declared in this scope
   10 |   sort(L,L+N);
      |        ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N;
  cin >> N;
  int i;
  int L[N];
  for (i=0, i<N, i=i+1){
    int L[i];
    cin >> L[i];}
  int m;
  m = max(L[i]);
  int sum;
  for(j=0,j<N,j++)
    sum += L[j];
  sum = sum - m;
  if(m < sum){
    cout << "Yes";}
  else{
    cout << "No";}
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before ')' token
   10 |   for (i=0, i<N, i=i+1){
      |                       ^
      |                       ;
a.cc:13:8: error: expected initializer before ';' token
   13 |   int m;
      |        ^
a.cc:14:10: error: no matching function for call to 'max(int&)'
   14 |   m = max(L[i]);
      |       ~~~^~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
a.cc:14:16: error: expected ')' before ';' token
   14 |   m = max(L[i]);
      |                ^
      |                )
a.cc:10:7: note: to match this '('
   10 |   for (i=0, i<N, i=i+1){
      |       ^
a.cc:16:7: error: 'j' was not declared in this scope
   16 |   for(j=0,j<N,j++)
      |       ^
a.cc:18:15: error: 'm' was not declared in this scope
   18 |   sum = sum - m;
      |               ^
a.cc:19:3: error: expected primary-expression before 'if'
   19 |   if(m < sum){
      |   ^~
a.cc:18:17: error: expected ')' before 'if'
   18 |   sum = sum - m;
      |                 ^
      |                 )
   19 |   if(m < sum){
      |   ~~             
a.cc:16:6: note: to match this '('
   16 |   for(j=0,j<N,j++)
      |      ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N;
  cin >> N;
  int i;
  int L[N];
  for (i=0, i<N, i=i+1)
    int L[i];
    cin >> L[i];
  int m;
  m = max(L[i])
  int sum;
  for(j=0,j<N,j++)
    sum += L[j];
  sum = sum - m;
  if(m < sum)
    cout << "Yes";
  else
    cout << "No";
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before ')' token
   10 |   for (i=0, i<N, i=i+1)
      |                       ^
      |                       ;
a.cc:13:3: error: expected primary-expression before 'int'
   13 |   int m;
      |   ^~~
a.cc:12:17: error: expected ')' before 'int'
   12 |     cin >> L[i];
      |                 ^
      |                 )
   13 |   int m;
      |   ~~~            
a.cc:10:7: note: to match this '('
   10 |   for (i=0, i<N, i=i+1)
      |       ^
a.cc:14:3: error: 'm' was not declared in this scope
   14 |   m = max(L[i])
      |   ^
a.cc:14:10: error: no matching function for call to 'max(int&)'
   14 |   m = max(L[i])
      |       ~~~^~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
a.cc:16:7: error: 'j' was not declared in this scope
   16 |   for(j=0,j<N,j++)
      |       ^
a.cc:18:3: error: 'sum' was not declared in this scope
   18 |   sum = sum - m;
      |   ^~~
a.cc:19:3: error: expected primary-expression before 'if'
   19 |   if(m < sum)
      |   ^~
a.cc:18:17: error: expected ')' before 'if'
   18 |   sum = sum - m;
      |                 ^
      |                 )
   19 |   if(m < sum)
      |   ~~             
a.cc:16:6: note: to match this '('
   16 |   for(j=0,j<N,j++)
      |      ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N;
  cin >> N;
  for (i=0, i<N, i=i+1)
    int L[i];
    cin >> L[i];
  int m;
  m = max(L[i])
  int sum;
  for(j=0,j<N,j++)
    sum += L[j];
  sum = sum - m;
  if(m < sum)
    cout << "Yes";
  else
    cout << "No";
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |   for (i=0, i<N, i=i+1)
      |        ^
a.cc:10:12: error: 'L' was not declared in this scope
   10 |     cin >> L[i];
      |            ^
a.cc:11:3: error: expected primary-expression before 'int'
   11 |   int m;
      |   ^~~
a.cc:10:17: error: expected ')' before 'int'
   10 |     cin >> L[i];
      |                 ^
      |                 )
   11 |   int m;
      |   ~~~            
a.cc:8:7: note: to match this '('
    8 |   for (i=0, i<N, i=i+1)
      |       ^
a.cc:12:3: error: 'm' was not declared in this scope
   12 |   m = max(L[i])
      |   ^
a.cc:12:11: error: 'L' was not declared in this scope
   12 |   m = max(L[i])
      |           ^
a.cc:12:13: error: 'i' was not declared in this scope
   12 |   m = max(L[i])
      |             ^
a.cc:14:7: error: 'j' was not declared in this scope
   14 |   for(j=0,j<N,j++)
      |       ^
a.cc:16:3: error: 'sum' was not declared in this scope
   16 |   sum = sum - m;
      |   ^~~
a.cc:17:3: error: expected primary-expression before 'if'
   17 |   if(m < sum)
      |   ^~
a.cc:16:17: error: expected ')' before 'if'
   16 |   sum = sum - m;
      |                 ^
      |                 )
   17 |   if(m < sum)
      |   ~~             
a.cc:14:6: note: to match this '('
   14 |   for(j=0,j<N,j++)
      |      ^
Language: Java

import java.util.*;

public class main{
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int b = sc.nextInt();
        int a[] = new int[120];

        for(int i=0;i<b;i++){
             a[i] = sc.nextInt();
        }

        //System.out.println(a[3]);

        Arrays.sort(a);



        int sum=0;
        for(int i=0;i<a.length;i++){
            sum += a[i];
        }


        //System.out.println(sum);

        if(a[b-1]<sum){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }


    



    }
}

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

#include<stdio.h>

main(){
        int N,i,L[105],Max,sum;

        scanf("%d",&N);
        for(i=1;i<=N;i++){
                scanf("%d",&L[i]);
        }
        Max = L[0];
        for(i=1;i<=N;i++){
        if(Max<L[i]){
                Max = L[i];
        }
        }
        for(i=1;i<=N;i++){
        sum += L[i];
        if(Max<sum-Max){
                printf("Yes");
        }
        else{
                printf("No");
        }
}


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: C++

#include<stdio.h>
#include <iostream>

using namespace std;

int main()
{
	int n, most=0, L[100];
	long int total = 0;

	memset(L, 0x00, 100);

	if (scanf("%d", &n) == EOF) {
		return 0;
	}

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

		total += L[i];

		if (L[i] > most)
		{
			most = L[i];
		}
	}

	total -= most;

	if (most < total)
	{
		printf("Yes\n");
	}
	else
	{
		printf("No\n");
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'memset' was not declared in this scope
   11 |         memset(L, 0x00, 100);
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <iostream>
  +++ |+#include <cstring>
    3 |
Language: C

#include<stdio.h>
int main(void)
{
  int k, j, tmp, a;
   
  int number[10];
   
  int total;
  scanf("%d", &total);

  for (k=0; k<total; ++k){
    scanf("%d", &number[k]);
  }
   
  for (k=0; k<total; ++k) {
    for (j=k+1; j<total; ++j) {
      if (number[k] > number[j]) {
        tmp =  number[k];
        number[k] = number[j];
        number[j] = tmp;
      }
    }
  }
  a = number - number[0];

  if (number[0] < a) {
    printf("Yes");
  }else if (number[0] > a){
    printf("No");
  }else (number[0] = a){
    printf("No");
  }
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:24:5: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   24 |   a = number - number[0];
      |     ^
main.c:30:24: error: expected ';' before '{' token
   30 |   }else (number[0] = a){
      |                        ^
      |                        ;
Language: C++

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


int main() {
  int N;
  int max;
  int sum;  
  max =0;
  cin>>N;
  
  for(int i =0; i<N;i++){
    cin>>L.at(i);
    sum = sum+L.at(i);
    if (max < l.at(i)){
      max=L.at(i)
    }
  }
  if(sum>max*2){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'L' was not declared in this scope
   13 |     cin>>L.at(i);
      |          ^
a.cc:15:15: error: 'l' was not declared in this scope
   15 |     if (max < l.at(i)){
      |               ^
a.cc:24:4: error: expected '}' at end of input
   24 |   }
      |    ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <iostream>

using namespace std;
int main(){
	int n, maxNum = 0, sum;
	cin >> n;
	
	for(int i = 0; i < n; i++){
		int tmp;
		cin >> tmp;
		sum += tmp;
		if(maxNum < tmp){
			maxNum = tmp;			
		}
	}

	if(tmp < sum - tmp)
		cout << "Yes";
	else
		cout << "No";	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   17 |         if(tmp < sum - tmp)
      |            ^~~
      |            tm
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int sum=0;
		// 整数の入力
        int L[]={};
		int N = sc.nextInt();
		for(int i=0;i<N;i++){
		int L[i] = sc.nextInt();
        }
      	Arrays.sort(L);
      	for(int i=0;i<N-1;i++){
          sum=sum+L[i];
        }
      if(L[N-1]<sum){
		System.out.println("Yes");
      }else{
        System.out.println("No");
      }
	}
}

Compiler output:
Main.java:10: error: ']' expected
		int L[i] = sc.nextInt();
		      ^
Main.java:10: error: ';' expected
		int L[i] = sc.nextInt();
		       ^
2 errors
Language: C++

#include <iostream>
#include <vector>
#include <numeric>

using namespace std;

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

  vector <int> l(n);
  for(int i = 0; i < n; i++) {
    cin >> l[i];
  }

  int max = *max_element(l.begin(), l.end());
  int sum = accumulate(l.begin(), l.end(), 0);

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


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

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int sum=0;
		// 整数の入力
        int[] L={};
		int N = sc.nextInt();
		for(int i=0;i<N;i++){
		int L[i] = sc.nextInt();
        }
      	Arrays.sort(L);
      	for(int i=0;i<N-1;i++){
          sum=sum+L[i];
        }
      if(L[N-1]<sum){
		System.out.println("Yes");
      }else{
        System.out.println("No");
      }
	}
}

Compiler output:
Main.java:10: error: ']' expected
		int L[i] = sc.nextInt();
		      ^
Main.java:10: error: ';' expected
		int L[i] = sc.nextInt();
		       ^
2 errors
Language: C++

#include <iostream>
#include <vector>
#include <numeric>
using namespace std;
int main()
{
  int N;
  cin >> N;
  vector<int> L(N);
  for (int i = 0; i < N; i++) {
      cin >> L[i];
  }
  int max_L = *std::max_element(L.begin(), L.end());
  if(max_L < (std::accumulate(L.begin(), L.end(), 0)-max_L)){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return 0;
}


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

#include<stdio.h>
#include<math.h>
int main(){
  int N,L[10],S,P;
  S=0;
  P=0;
  scanf("%ld\n",&N);
  for(int i=0;i<N;i++){
    scanf("%ld",&L[i]);
    S=S+L[i];
    if(P=<L[i])
      P=L[i];
  }
  if(S-P>P)
    printf("Yes");
  else
    printf("No");
}


Compiler output:
main.c: In function 'main':
main.c:11:10: error: expected expression before '<' token
   11 |     if(P=<L[i])
      |          ^
Language: C++

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

int main(){

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

	sort(L.begin(), L.end(), std::greater<int>() );
	

	int max = L[0];

	L.erase(L.begin() + 0);

	int sum = std::accumulate(L.begin(), L.end(), 0);

	if(max<sum){
		cout << "YES" << endl;
	}else{
		cout << "NO" << endl;
	}
	
	return 0;
}

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

#include<stdio.h>
#include<math.h>
int main(){
  int N,L[10],S,P;
  S=P=0;
  scanf("%ld\n",&N);
  for(int i=0;i<N;i++){
    scanf("%ld",&L[i]);
    S=S+L[i];
    if(P=<L[i])
      P=L[i];
  }
  if(S-P>P)
    printf("Yes");
  else
    printf("No");
}


Compiler output:
main.c: In function 'main':
main.c:10:10: error: expected expression before '<' token
   10 |     if(P=<L[i])
      |          ^
Language: C++

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

int main(){

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

	std::sort(L.begin(), L.end(), std::greater<int>() );
	

	int max = L[0];

	L.erase(L.begin() + 0);

	int sum = std::accumulate(L.begin(), L.end(), 0);

	if(max<sum){
		cout << "YES" << endl;
	}else{
		cout << "NO" << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   18 |         std::sort(L.begin(), L.end(), std::greater<int>() );
      |              ^~~~
      |              qsort
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
int main(void){

    char str[3000];
    char *tok;
    int m,n;
    int i1,i2,i3,i;
    int a[1000];
    
    fgets(str, sizeof(str), stdin);
    tok=strtok(str," ");
    m=strtol(tok,NULL,10);
  
 	int max=0;
  	int maxindex=-1;
  
  	fgets(str, sizeof(str), stdin);
    tok=strtok(str," ");
    a[0]=strtol(tok,NULL,10);
  	max=a[0];
  	maxindex=0;
  	for(i=1;i<m;i++){
    	tok=strtok(NULL," ");
    	a[i]=strtol(tok,NULL,10);
      		if(max<a[i]){
              max=a[i];
              maxindex=i;
    }
      
    int total=0;
    for(i=0;i<m;i++){
      	if(i!=maxindex){
          	total+=a[i];
        }
    }
    if(max<total){
      	printf("Yes");
    }else{
      	printf("No");
    }
  
}


Compiler output:
main.c: In function 'main':
main.c:46:1: error: expected declaration or statement at end of input
   46 | }
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: 'Yes' was not declared in this scope
   17 |     cout<<Yes<<endl;
      |           ^~~
a.cc:21:10: error: 'No' was not declared in this scope; did you mean 'N'?
   21 |    cout<<No<<endl;
      |          ^~
      |          N
Language: C++

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

int main(){

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

	std::sort(L.begin(), L.end(), std::greater<int>() );
	

	int max = L[0];

	L.erase(L.begin() + 0);

	int sum = std::accumulate(L.begin(), L.end(), 0)

	if(max<){
		cout << "YES" << endl;
	}else{
		cout << "NO" << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   18 |         std::sort(L.begin(), L.end(), std::greater<int>() );
      |              ^~~~
      |              qsort
a.cc:27:9: error: expected ',' or ';' before 'if'
   27 |         if(max<){
      |         ^~
a.cc:29:10: error: 'else' without a previous 'if'
   29 |         }else{
      |          ^~~~
Language: C++

#include <iostream>
#include <math.h>
using namespace std;
int main() {
  int n;
  int l[101];
  cin >> n;
  int max = 0
  for(int i=0;i<n;i++){
      cin>>l[i];
      if(l[i]>max) max = l[i];
  }
  
  int sum = 0;
  for(int i=0;i<n;i++)
      sum+=l[i];
  
  if(sum>max){cout<<"Yes";}else{cout<<"No"}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for(int i=0;i<n;i++){
      |   ^~~
a.cc:9:15: error: 'i' was not declared in this scope
    9 |   for(int i=0;i<n;i++){
      |               ^
a.cc:18:43: error: expected ';' before '}' token
   18 |   if(sum>max){cout<<"Yes";}else{cout<<"No"}
      |                                           ^
      |                                           ;
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.bigin(),vec.end());
  
  int result=0;
  
  for(int i=0;i<N-1;i++){
    result+=;
  }
  if(result>vec.at(N)){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'class std::vector<int>' has no member named 'bigin'; did you mean 'begin'?
   13 |   sort(vec.bigin(),vec.end());
      |            ^~~~~
      |            begin
a.cc:18:13: error: expected primary-expression before ';' token
   18 |     result+=;
      |             ^
Language: C++

#include<iostream>
#include<vector>
#include <numeric>
using namespace std;
int main()
{
  int N;
  cin >> N;
  vector<int> L(N);
  for (int i = 0; i < N; i++) {
      cin >> L[i];
  }
  int max_L = *max_element(L.begin(), L.end());
  if(max_L < (accumulate(L.begin(), L.end(), 0)-max_L)){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return 0;
}


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

#include<stdio.h>
int main(void)
{
  int k, j, tmp, a;
 
  
  int number[100];
 
  
  int total;
  printf("入力する数値の総数 = ");
  scanf("%d", &total);
 

  printf("%d個の数値を入力 \n", total);
  for (k=0; k<total; ++k)
    scanf("%d", &number[k]);
 
  
  for (k=0; k<total; ++k) {
    for (j=i+1; j<total; ++j) {
      if (number[i] > number[j]) {
        tmp =  number[k];
        number[k] = number[j];
        number[j] = tmp;
      }
    }
  }
  a = number - number[0];

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

Compiler output:
main.c: In function 'main':
main.c:21:12: error: 'i' undeclared (first use in this function)
   21 |     for (j=i+1; j<total; ++j) {
      |            ^
main.c:21:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:29:5: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   29 |   a = number - number[0];
      |     ^
Language: C++

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

int main() {
  int n;
  cin >> n;
  vector<int> len;
  int max=0;
  comment="Yes"
  for(int i=0;i<n;i++){
    cin >>len.at(i);
    max = max+len.at(i);
    
  }
  for(int i=0;i<n;i++){
    if(max-len(i) >=){
      comment="No";
      break;
    }
  }
  cout >>comment >> endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'comment' was not declared in this scope
    9 |   comment="Yes"
      |   ^~~~~~~
a.cc:10:15: error: 'i' was not declared in this scope
   10 |   for(int i=0;i<n;i++){
      |               ^
a.cc:16:15: error: no match for call to '(std::vector<int>) (int&)'
   16 |     if(max-len(i) >=){
      |            ~~~^~~
a.cc:16:21: error: expected primary-expression before ')' token
   16 |     if(max-len(i) >=){
      |                     ^
Language: C++

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

int main(){

  int N,t,x;
  int M = 0;
  int X = 0;
  cin >> N;
  for(int i = 0; i<N;i++){
    cin >>t;
    cout << t;
  if(t > M){
    M = t;
    }
    X += t;
  }
}
  x = X - M;
  if(x > M){
    cout << "Yes" <<endl;
  }
  else{
    cout << "No" <<endl;
  }
}

Compiler output:
a.cc:19:3: error: 'x' does not name a type
   19 |   x = X - M;
      |   ^
a.cc:20:3: error: expected unqualified-id before 'if'
   20 |   if(x > M){
      |   ^~
a.cc:23:3: error: expected unqualified-id before 'else'
   23 |   else{
      |   ^~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
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.bigin(),vec.end());
  
  int result=0;
  
  for(int i=0,i<N-1,i++){
    result+=;
  }
  if(result>vec.at(N)){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected ';' before '<' token
    9 |   for(int i=0,i<N,i++){
      |                ^
      |                ;
a.cc:9:16: error: expected primary-expression before '<' token
a.cc:9:22: error: expected ';' before ')' token
    9 |   for(int i=0,i<N,i++){
      |                      ^
      |                      ;
a.cc:13:12: error: 'class std::vector<int>' has no member named 'bigin'; did you mean 'begin'?
   13 |   sort(vec.bigin(),vec.end());
      |            ^~~~~
      |            begin
a.cc:17:16: error: expected ';' before '<' token
   17 |   for(int i=0,i<N-1,i++){
      |                ^
      |                ;
a.cc:17:16: error: expected primary-expression before '<' token
a.cc:17:24: error: expected ';' before ')' token
   17 |   for(int i=0,i<N-1,i++){
      |                        ^
      |                        ;
a.cc:18:13: error: expected primary-expression before ';' token
   18 |     result+=;
      |             ^
Language: C++

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

int main(void)
{
	int n;
	vector<int> p;
	cin >> n;
	
	for (int i=0;i<n;i++){
      int tmp;
      cin >> tmp;
      p.push_back(tmp);
	}
  	
  auto hoge = min_element(p.begin(), p.end());
  int sum = accumulate(p.begin(), p.end(), 0);

  if(sum - *hoge  > *hoge){
	cout << "Yes";  
  }
  else {
    cout << "No";
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: 'min_element' was not declared in this scope
   17 |   auto hoge = min_element(p.begin(), p.end());
      |               ^~~~~~~~~~~
a.cc:18:13: error: 'accumulate' was not declared in this scope
   18 |   int sum = accumulate(p.begin(), p.end(), 0);
      |             ^~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){a
int max;
int all;
int N;
cin >> N;
int A[100];
for(int i =1;i < N+1;i++){
  cin >> A[i];
  max = max(max,A[i]);
  all += A[i];
}   
           
if(max < all- max)cout << "Yes";
else cout << "No";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:12: error: 'a' was not declared in this scope
    4 | int main(){a
      |            ^
a.cc:12:12: error: no matching function for call to 'max(<unresolved overloaded function type>, int&)'
   12 |   max = max(max,A[i]);
      |         ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'constexpr const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = int]'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:20: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const int&'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |         ~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
a.cc:16:13: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-'
   16 | if(max < all- max)cout << "Yes";
      |          ~~~^~~~~
a.cc:16:4: error: parse error in template argument list
   16 | if(max < all- max)cout << "Yes";
      |    ^~~~~~~~~~~~~~
a.cc:16:18: error: cannot resolve overloaded function 'max' based on conversion to type 'bool'
   16 | if(max < all- max)cout << "Yes";
      |                  ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int n, sum, largest;
	largest = 0;

	cin >> n;
	while (true) {
		int l;
		cin >> l;

		if (cin.eof) {
			if (largest < sum) cout << 'Yes' << endl;
			else cout << 'No' << endl;

			break;
		}

		if (l > largest) {
			sum += largest;
			largest = l;
		}
		else {
			sum += l;
		}
	}
}

Compiler output:
a.cc:14:52: warning: multi-character character constant [-Wmultichar]
   14 |                         if (largest < sum) cout << 'Yes' << endl;
      |                                                    ^~~~~
a.cc:15:38: warning: multi-character character constant [-Wmultichar]
   15 |                         else cout << 'No' << endl;
      |                                      ^~~~
a.cc: In function 'int main()':
a.cc:13:28: error: cannot convert 'std::basic_ios<char>::eof' from type 'bool (std::basic_ios<char>::)() const' to type 'bool'
   13 |                 if (cin.eof) {
      |                            ^
Language: C++

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

int main(){

  int N,t,x;
  int M = 0;
  int X = 0;
  cin >> N;
  for(int i = 0; i<N;i++){
    cin >>t;
    cout << t;
  if(t > M){
    M = t;
    }
    X += t;
  }
  x = X - M;
  if(x > M){
    cout << "Yes" <<endl;
  }
  else{
    cout << "No" << endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:24:4: error: expected '}' at end of input
   24 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before ';' token
    5 |   int N,;cin>>N;
      |         ^
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a) (a).begin(),(a).end()
#define pb emplace_back
#define INF (1e9+1)

int main(){
    int n;
    cin>>n;
    vector<int> v(n);
    rep(i,n)cin>>v[i];
    sort(all(v));
    
    int sum = 0;
    rep(i,n-1)sum+=v[i];
    
    if(v.back>sum)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:14: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>'
   20 |     if(v.back>sum)cout<<"Yes"<<endl;
      |        ~~~~~~^~~~
      |          |    |
      |          |    int
      |          <unresolved overloaded function type>
Language: C++

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

int main(){

  int N,t,x;
  int M = 0;
  int X = 0;
  cin >> N;
  for(int i = 0; i<N;i++){
    cin >>t;
    cout << t;
  if(t > M){
    M = t;
    }
    X += t;
  }
  x = X - M;
  if(x > M){
    cout << "Yes" <<endl;
  }
  else{
    cout << "No" << endl;
  }

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

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

using namespace std;

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

    vector<int> L(100);

    int N;
    int max = 0;
    int count = 0;

    cin >> N;

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

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

    for(int i = 0; i < N; i++){
        if(max != L[i]){
            count += L[i];
        }
    }

    if(count => max){
        cout << "Yes";
    }else{
        cout << "No";
    }

    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:15: error: expected primary-expression before '>' token
   36 |     if(count => max){
      |               ^
Language: C++

#include <stdio.h>

int main(){
    int n=0;
    int l[10];
    int i;
    int a;
    int sum;

    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf(l[i]);
        if(a>l[i]){
            a=l[i]; 
         }
         sum+=l[i];
    }
    if(a<sum){
        printf("Yes");
    }else{
        printff("No");
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   12 |         scanf(l[i]);
      |               ~~~^
      |                  |
      |                  int
In file included from a.cc:1:
/usr/include/stdio.h:428:42: note:   initializing argument 1 of 'int scanf(const char*, ...)'
  428 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:21:9: error: 'printff' was not declared in this scope; did you mean 'printf'?
   21 |         printff("No");
      |         ^~~~~~~
      |         printf