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


#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <array>
#include <map>
#include <set>
#include <stack>
#include <cstdint>
#include <cmath>
#include <algorithm>
#include <utility>
#include <numeric>
#include <functional>
#include <cassert>

using namespace std;
using ll = int64_t;
using ull = uint64_t;

constexpr ll INF = 1000000000;/* 1e+9a */

void solve(istream &cin) {
    ll N;
    if (!(cin >> N)) { return; }
    double X;
    cin >> X;
    cout << N / X << endl;
    

}

int main(int argc, char *argv[]) {
    cout << setprecision(16) << scientific;
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    while (cin) { solve(cin); }
}


Compiler output:
a.cc: In function 'void solve(std::istream&)':
a.cc:29:5: error: 'cout' was not declared in this scope
   29 |     cout << N / X << endl;
      |     ^~~~
a.cc:17:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   16 | #include <cassert>
  +++ |+#include <iostream>
   17 | 
a.cc: In function 'int main(int, char**)':
a.cc:35:5: error: 'cout' was not declared in this scope
   35 |     cout << setprecision(16) << scientific;
      |     ^~~~
a.cc:35:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:36:5: error: 'cin' was not declared in this scope
   36 |     cin.tie(nullptr);
      |     ^~~
a.cc:36:5: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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



int main(void)
{
    double x,y;
    cin >> x >> y >> z;
    cout << x / y << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: 'z' was not declared in this scope
   10 |     cin >> x >> y >> z;
      |                      ^
Language: C++

#include <iostream>

using namespace std;

int main()

{

int a,b,c;

cin >> a >> b;
double c=a/b;
cout << c <<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: conflicting declaration 'double c'
   12 | double c=a/b;
      |        ^
a.cc:9:9: note: previous declaration as 'int c'
    9 | int a,b,c;
      |         ^
Language: C

/*#include<stdio.h>
int main()
{
    int n, a[101], i, sum=0, p;
    scanf("%d" , &n);
    for(i=1; i<=n; i++)
    {
        scanf("%d", &a[i]);
        sum += a[i];
    }
    int max = -1;
    for(i=1; i<=n; i++)
    {
        if(a[i] > max)
            max = a[i];
    }
    p = sum - max;
    if(p > max)
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}

Compiler output:
main.c:1:1: error: unterminated comment
    1 | /*#include<stdio.h>
      | ^
Language: C++

#include<stdio.h>
#include <stdlib.h>
#define size 12
int comp(int *c,int *d)
{
    return (*d-*c);
}
int main()
{
    int a[size],n,i,j,sum=0;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    qsort(a,n,sizeof(int),comp);
    for(i=1;i<n;i++)
    {
        sum+=a[i];
    }
    if(sum>a[0])printf("Yes");
    else printf("No");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:27: error: invalid conversion from 'int (*)(int*, int*)' to '__compar_fn_t' {aka 'int (*)(const void*, const void*)'} [-fpermissive]
   16 |     qsort(a,n,sizeof(int),comp);
      |                           ^~~~
      |                           |
      |                           int (*)(int*, int*)
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/stdlib.h:36,
                 from a.cc:2:
/usr/include/stdlib.h:971:34: note:   initializing argument 4 of 'void qsort(void*, size_t, size_t, __compar_fn_t)'
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<stdio.h>
#define size 12
int comp(int *c,int *d)
{
    return (*d-*c);
}
int main()
{
    int a[size],n,i,j,sum=0;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    qsort(a,n,sizeof(int),comp);
    for(i=1;i<n;i++)
    {
        sum+=a[i];
    }
    if(sum>a[0])printf("Yes");
    else printf("No");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'qsort' was not declared in this scope
   15 |     qsort(a,n,sizeof(int),comp);
      |     ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
 int n, in, sum, max;
 max = sum=0;
 cin >> n;
 while (n--)
 {
  cin >> in;
  sum += in;
  if (in > max) max = in;
 }
 sum -= max;
 if (max < sum) cout << "Yes" << endl;
 else cout << "No" << endl;
 return 0;
}


Compiler output:
a.cc:5:1: error: extended character   is not valid in an identifier
    5 |  int n, in, sum, max;
      | ^
a.cc:6:1: error: extended character   is not valid in an identifier
    6 |  max = sum=0;
      | ^
a.cc:7:1: error: extended character   is not valid in an identifier
    7 |  cin >> n;
      | ^
a.cc:8:1: error: extended character   is not valid in an identifier
    8 |  while (n--)
      | ^
a.cc:9:1: error: extended character   is not valid in an identifier
    9 |  {
      | ^
a.cc:10:1: error: extended character   is not valid in an identifier
   10 |   cin >> in;
      | ^
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:11:1: error: extended character   is not valid in an identifier
   11 |   sum += in;
      | ^
a.cc:11:1: error: extended character   is not valid in an identifier
a.cc:12:1: error: extended character   is not valid in an identifier
   12 |   if (in > max) max = in;
      | ^
a.cc:12:1: error: extended character   is not valid in an identifier
a.cc:13:1: error: extended character   is not valid in an identifier
   13 |  }
      | ^
a.cc:14:1: error: extended character   is not valid in an identifier
   14 |  sum -= max;
      | ^
a.cc:15:1: error: extended character   is not valid in an identifier
   15 |  if (max < sum) cout << "Yes" << endl;
      | ^
a.cc:16:1: error: extended character   is not valid in an identifier
   16 |  else cout << "No" << endl;
      | ^
a.cc:17:1: error: extended character   is not valid in an identifier
   17 |  return 0;
      | ^
a.cc: In function 'int main()':
a.cc:5:1: error: '\U000000a0int' was not declared in this scope
    5 |  int n, in, sum, max;
      | ^~~~
a.cc:6:1: error: '\U000000a0max' was not declared in this scope
    6 |  max = sum=0;
      | ^~~~
a.cc:6:8: error: 'sum' was not declared in this scope
    6 |  max = sum=0;
      |        ^~~
a.cc:7:1: error: '\U000000a0cin' was not declared in this scope
    7 |  cin >> n;
      | ^~~~
a.cc:7:9: error: 'n' was not declared in this scope
    7 |  cin >> n;
      |         ^
a.cc:8:1: error: '\U000000a0while' was not declared in this scope
    8 |  while (n--)
      | ^~~~~~
a.cc:14:1: error: '\U000000a0sum' was not declared in this scope
   14 |  sum -= max;
      | ^~~~
a.cc:15:6: error: parse error in template argument list
   15 |  if (max < sum) cout << "Yes" << endl;
      |      ^~~~~~~~~
a.cc:15:1: error: '\U000000a0if' was not declared in this scope
   15 |  if (max < sum) cout << "Yes" << endl;
      | ^~~
a.cc:16:1: error: '\U000000a0else' was not declared in this scope
   16 |  else cout << "No" << endl;
      | ^~~~~
a.cc:17:1: error: '\U000000a0return' was not declared in this scope
   17 |  return 0;
      | ^~~~~~~
Language: C

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

int maximum(int array[])
{
	int max = array[0];
	int i = 0;  int size;
	size = sizeof(*array) / sizeof(array[0]);
	while (i != size) {
		if (array[i] <= max)  continue;
		else max = array[i];
		i++;
	}
	return max;
}

int others(int array[],int max_num)
{
	int i = 0; int size = sizeof(*array) / sizeof(array[0]);
	int sum=0;
	while (i != size)
		sum += array[i++];
	return sum-max_num;
}

int main()
{
	int N; int sides[10];
	int longest_side = 0;int other_sides=0 ;
	while (scanf("%d", &N) >= 3 && scanf_s("%d", &N) <= 10) {
		for (int i = 0; i != N; i++) scanf_s("%d", &sides[i]);
		longest_side = maximum(sides);
		other_sides = others(sides, longest_side);
	}
	if (longest_side < other_sides) printf("Yes");
	else printf("No");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:30:40: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   30 |         while (scanf("%d", &N) >= 3 && scanf_s("%d", &N) <= 10) {
      |                                        ^~~~~~~
      |                                        scanf
Language: C

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

int maximum(int array[])
{
	int max = array[0];
	int i = 0;  int size;
	size = sizeof(*array) / sizeof(array[0]);
	while (i != size) {
		if (array[i] <= max)  continue;
		else max = array[i];
		i++;
	}
	return max;
}

int others(int array[],int max_num)
{
	int i = 0; int size = sizeof(*array) / sizeof(array[0]);
	int sum=0;
	while (i != size)
		sum += array[i++];
	return sum-max_num;
}

int main()
{
	int N; int sides[10];
	int longest_side = 0;int other_sides=0 ;
	while (scanf_s("%d", &N) >= 3 && scanf_s("%d", &N) <= 10) {
		for (int i = 0; i != N; i++) scanf_s("%d", &sides[i]);
		longest_side = maximum(sides);
		other_sides = others(sides, longest_side);
	}
	if (longest_side < other_sides) printf("Yes");
	else printf("No");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:30:16: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   30 |         while (scanf_s("%d", &N) >= 3 && scanf_s("%d", &N) <= 10) {
      |                ^~~~~~~
      |                scanf
Language: C

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

int maximum(int array[])
{
	int max = array[0];
	int i = 0;  int size;
	size = sizeof(array) / sizeof(array[0]);
	while (i != size) {
		if (array[i] <= max)  continue;
		else max = array[i];
		i++;
	}
	return max;
}

int others(int array[],int max_num)
{
	int i = 0; int size = sizeof(array) / sizeof(array[0]);
	int sum=0;
	while (i != size)
		sum += array[i++];
	return sum-max_num;
}

int main()
{
	int N; int sides[10];
	int longest_side, other_sides;
	while (scanf_s("%d", &N) >= 3 && scanf_s("%d", &N) <= 10) {
		for (int i = 0; i != N; i++) scanf_s("%d", sides[i]);
		longest_side = maximum(sides);
		other_sides = others(sides, longest_side);
	}
	if (longest_side < other_sides) printf("Yes");
	else printf("No");
	return 0;
}

Compiler output:
main.c: In function 'maximum':
main.c:8:22: warning: 'sizeof' on array function parameter 'array' will return size of 'int *' [-Wsizeof-array-argument]
    8 |         size = sizeof(array) / sizeof(array[0]);
      |                      ^
main.c:4:17: note: declared here
    4 | int maximum(int array[])
      |             ~~~~^~~~~~~
main.c: In function 'others':
main.c:19:37: warning: 'sizeof' on array function parameter 'array' will return size of 'int *' [-Wsizeof-array-argument]
   19 |         int i = 0; int size = sizeof(array) / sizeof(array[0]);
      |                                     ^
main.c:17:16: note: declared here
   17 | int others(int array[],int max_num)
      |            ~~~~^~~~~~~
main.c: In function 'main':
main.c:30:16: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   30 |         while (scanf_s("%d", &N) >= 3 && scanf_s("%d", &N) <= 10) {
      |                ^~~~~~~
      |                scanf
Language: C

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

int maximum(int array[])
{
	int max = array[0];
	int i = 0, int size;
	size = sizeof(array) / sizeof(array[0]);
	while (i != size) {
		if (array[i] <= max)  continue;
		else max = array[i];
		i++;
	}
	return max;
}

int others(int array[],int max_num)
{
	int i = 0, int size = sizeof(array) / sizeof(array[0]);
	int sum;
	while (i != size)
		sum += array[i++];
	return sum-max_num;
}

int main()
{
	int N,int sides[10];
	int longest_side, other_sides;
	while (scanf_s("%d", &N) >= 3 && scanf_s("%d", &N) <= 10) {
		for (int i = 0; i != N; i++) scanf_s("%d", sides[i]);
		longest_side = maximum(sides);
		other_sides = others(sides, longest_side);
	}
	if (longest_side < other_sides) printf("Yes");
	else printf("No");
	return 0;
}

Compiler output:
main.c: In function 'maximum':
main.c:7:20: error: expected identifier or '(' before 'int'
    7 |         int i = 0, int size;
      |                    ^~~
main.c:8:9: error: 'size' undeclared (first use in this function); did you mean 'size_t'?
    8 |         size = sizeof(array) / sizeof(array[0]);
      |         ^~~~
      |         size_t
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:22: warning: 'sizeof' on array function parameter 'array' will return size of 'int *' [-Wsizeof-array-argument]
    8 |         size = sizeof(array) / sizeof(array[0]);
      |                      ^
main.c:4:17: note: declared here
    4 | int maximum(int array[])
      |             ~~~~^~~~~~~
main.c: In function 'others':
main.c:19:20: error: expected identifier or '(' before 'int'
   19 |         int i = 0, int size = sizeof(array) / sizeof(array[0]);
      |                    ^~~
main.c:21:21: error: 'size' undeclared (first use in this function); did you mean 'size_t'?
   21 |         while (i != size)
      |                     ^~~~
      |                     size_t
main.c: In function 'main':
main.c:28:15: error: expected identifier or '(' before 'int'
   28 |         int N,int sides[10];
      |               ^~~
main.c:30:16: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   30 |         while (scanf_s("%d", &N) >= 3 && scanf_s("%d", &N) <= 10) {
      |                ^~~~~~~
      |                scanf
main.c:31:60: error: 'sides' undeclared (first use in this function)
   31 |                 for (int i = 0; i != N; i++) scanf_s("%d", sides[i]);
      |                                                            ^~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: 'i' was not declared in this scope
   14 |   if(b-vec.at(a-1)>vec.at(i)){
      |                           ^
Language: C++

#include<iostream>
#include <vector>
using namespace std;
bool Nsided(int n, vector<int> side)
{
	int i = side.size();
	int sum = 0, maxside = 0;
	for (int j = 0; j < i; j++)
	{
		if (side[j] > maxside)
		{
			sum += maxside;
			maxside = side[j];
		}
		else
			sum += side[j];
	}
	return maxside > sum;
}
int main()
{
	int N;
	int x;
    vector <int> side;
    cin >> N;
	while (cin >> x)
	side.puch_back(x);
	if (N >= 3 && N <= 10 && x >= 1 && x <= 100)
	{
	if (Nsided(N,side))
	cout << "Yes" << endl;
	else
	cout << "No" << endl;
	}
   else
cout << "please enter N between three and ten,Li between one and hundred" << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:14: error: 'class std::vector<int>' has no member named 'puch_back'; did you mean 'push_back'?
   27 |         side.puch_back(x);
      |              ^~~~~~~~~
      |              push_back
Language: C++

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

int main()
{
  int n;
  cin >> n;
  vector<int> l(n);
  for(int i=0; i<n; i++) cin >> l[i];
  
  vector<int>::iterator max_itr = max_element(l.begin(), l.end());
  int sum = 0;
  for(vector<int>::iterator it=l.begin(); it!=l.end(); i++)
  {
    if(it != max_itr)
      sum += *it;
  }
  
  if(*max_itr < sum)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:56: error: 'i' was not declared in this scope; did you mean 'it'?
   15 |   for(vector<int>::iterator it=l.begin(); it!=l.end(); i++)
      |                                                        ^
      |                                                        it
Language: C++

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

Compiler output:
a.cc: In function 'int man()':
a.cc:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
using namespace std;

int main()
{
    int n, l, s = 0, m = 0;
    scanf("%d", &n);
    for (int i = 0; i < n; i++)
    {
        scanf("%d", &l);
        if (l > m) m = l;
        s += l;
    }
    printf("%s", ((m*2 < s) ? "Yes" : "No"));
}

Compiler output:
main.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
Language: C

#include <stdio.h>

int main()
{
    int N;
    int L[11];
    int max=0;
    int sum=0;
    scanf("%d", &N);
    for(int i=1; i<=N; i++) scanf("%d", &L[i]);

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

    for(int i=1; i<=N; i++) {
        sum+=L[i];
    }
    if((sum-max)<=L[i]) printf("No");
    else printf("Yes");
}

Compiler output:
main.c: In function 'main':
main.c:19:21: error: 'i' undeclared (first use in this function)
   19 |     if((sum-max)<=L[i]) printf("No");
      |                     ^
main.c:19:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
#define Rep(i,n) for(int i=1;i<=n;i++)
const ll MOD = 1000000007;

struct edge{
    int to,weight;
    edge(int to,int weight):to(to),weight(weight){}
};
using Graph = vector<vector<int>> ;
using GraphEdge = vector<vector<int>> ;

long long modinv(long long a, long long m=MOD) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m; 
    if (u < 0) u += m;
    return u;
    /*MODの割り算の際に
    a/＝b;
    を
    a *= modinv(b,MOD);
    とする。
        */
}
int main(){
    int N;cin >> N;
    int L[11];
    int ma = 0;
    int sum = 0;
    rep(i,N){
        cin >> L[i];
        sum += L[i];
        ma = max(L[i],ma)
    }
    sum -= ma;

    if(ma < sum)cout << "Yes" << endl;
    else cout << "No" << endl;


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:26: error: expected ';' before '}' token
   40 |         ma = max(L[i],ma)
      |                          ^
      |                          ;
   41 |     }
      |     ~
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);
  }
  int max_num=vec.at[0];
  for(int i=1;i<N;i++){
    if(max_num<vec.at(i)){
      max_num=vec.at(i);
    }
  }
  int sum=accumulate(vec.begin(),vec.end(),0);
  if(max_num<sum-max_num)
  cout<<"Yes"<<endl;
  else
  cout<<"No"<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   11 |   int max_num=vec.at[0];
      |                     ^
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);
  }
  int M=max(vec);
  if(M<(sum(vec)-M))
  cout<<"Yes"<<endl;
  else
  cout<<"No"<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: no matching function for call to 'max(std::vector<int>&)'
   11 |   int M=max(vec);
      |         ~~~^~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:11:12: note:   'std::vector<int>' is not derived from 'std::initializer_list<_Tp>'
   11 |   int M=max(vec);
      |         ~~~^~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
a.cc:12:9: error: 'sum' was not declared in this scope
   12 |   if(M<(sum(vec)-M))
      |         ^~~
Language: C++

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

int main(){
  	int N;
  	std::cin >> N;
  	std::vector<int> lines{std::istream_iterator<int>(std::cin), std::istream_iterator<int>()};
	std::vector<int>::iterator iter = std::max_element(lines.begin(), lines.end());		
	if(2*std::distance(lines.begin(), iter) <  std::accumulate(lines.begin(), lines.begin(), 0)) std::cout << "Yes" << std::endl;
  	else std::cout << "No" << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:57: error: 'accumulate' is not a member of 'std'
   11 |         if(2*std::distance(lines.begin(), iter) <  std::accumulate(lines.begin(), lines.begin(), 0)) std::cout << "Yes" << std::endl;
      |                                                         ^~~~~~~~~~
Language: C++

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

int main(){
  	int N;
  	std::cin >> N;
  	std::vector<int> lines{std::istream_iterator<int>(std::cin), std::istream_iterator<int>()};
	std::vector<int>::iterator iter = std::max_element(lines.begin(), map.end());		
	if(2*std::distance(lines.begin()) <  std::accumulate(lines.begin(), lines.begin(), 0)) std::cout << "Yes" << std::endl;
  	else std::cout << "No" << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:75: error: 'map' was not declared in this scope
   10 |         std::vector<int>::iterator iter = std::max_element(lines.begin(), map.end());
      |                                                                           ^~~
a.cc:11:27: error: no matching function for call to 'distance(std::vector<int>::iterator)'
   11 |         if(2*std::distance(lines.begin()) <  std::accumulate(lines.begin(), lines.begin(), 0)) std::cout << "Yes" << std::endl;
      |              ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:47,
                 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_iterator_base_funcs.h:148:5: note: candidate: 'template<class _InputIterator> constexpr typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::distance(_InputIterator, _InputIterator)'
  148 |     distance(_InputIterator __first, _InputIterator __last)
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:148:5: note:   candidate expects 2 arguments, 1 provided
a.cc:11:51: error: 'accumulate' is not a member of 'std'
   11 |         if(2*std::distance(lines.begin()) <  std::accumulate(lines.begin(), lines.begin(), 0)) std::cout << "Yes" << std::endl;
      |                                                   ^~~~~~~~~~
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] a = new int[n];
		for(int i=0; i<a.length; ++i){
			a[i] = scn.nextInt();
		}
      	Arrays.sort(a);
      	int sum = 0;
      	for(int i=0; i<a.length-1; ++i){
			sum = sum + a[i];
		}
      	if(sum<=a[a/length-1]){
          System.out.println("No");
        }else{
          System.out.println("Yes");
        }
      	
	}
}

Compiler output:
Main.java:16: error: cannot find symbol
      	if(sum<=a[a/length-1]){
      	            ^
  symbol:   variable length
  location: class Main
1 error
Language: C++

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

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
Language: C++

//コンパイラ最適化用
#pragma GCC optimize("Ofast")
//インクルード(アルファベット順)
#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<chrono>//実行時間計測
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<iterator>//集合演算(積集合,和集合,差集合など)
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm,accumulate
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
#include<unordered_map>//順序保持しないmap
#include<unordered_set>//順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列
#include<bits/stdc++.h>

using namespace std;
typedef long long ll;

//マクロ
//forループ
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=ll(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=ll(b);i--)
//xにはvectorなどのコンテナ
#define ALL(x) x.begin(),x.end() 
#define SIZE(x) ll(x.size()) 
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素
#define print(a) cout << a << endl;
#define cin(x) cin >> x;

signed main(){
    //入力の高速化用のコード
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    int N;
    cin(N);
    vector<int> L(N);
    REP(i,N){cin(L.at(i))}
    
    int lon = 0, total = 0;
    REP(i,N){
        lon = max(lon,L.at(i));
        total += L.at(i);
    }

    lon<total-lon?print("Yes");:print("No");


  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:35: error: expected ':' before ';' token
   49 | #define print(a) cout << a << endl;
      |                                   ^
a.cc:67:19: note: in expansion of macro 'print'
   67 |     lon<total-lon?print("Yes");:print("No");
      |                   ^~~~~
a.cc:49:35: error: expected primary-expression before ';' token
   49 | #define print(a) cout << a << endl;
      |                                   ^
a.cc:67:19: note: in expansion of macro 'print'
   67 |     lon<total-lon?print("Yes");:print("No");
      |                   ^~~~~
a.cc:67:32: error: expected primary-expression before ':' token
   67 |     lon<total-lon?print("Yes");:print("No");
      |                                ^
Language: C++

//コンパイラ最適化用
#pragma GCC optimize("Ofast")
//インクルード(アルファベット順)
#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<chrono>//実行時間計測
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<iterator>//集合演算(積集合,和集合,差集合など)
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm,accumulate
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
#include<unordered_map>//順序保持しないmap
#include<unordered_set>//順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列
#include<bits/stdc++.h>

using namespace std;
typedef long long ll;

//マクロ
//forループ
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=ll(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=ll(b);i--)
//xにはvectorなどのコンテナ
#define ALL(x) x.begin(),x.end() 
#define SIZE(x) ll(x.size()) 
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素
#define print(a) cout << a << endl;
#define cin(x) cin >> x;

signed main(){
    //入力の高速化用のコード
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    int N;
    cin(N);
    vector<int> L(N);
    REP(i,N){cin(L.at(i))}
    
    int lon = 0, total = 0;
    REP(i,N){
        lon = max(lon,L.at(i));
        total += L.at(i);
    }

    lon<total-lon?print("Yes"):print("No");


  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:35: error: expected ':' before ';' token
   49 | #define print(a) cout << a << endl;
      |                                   ^
a.cc:67:19: note: in expansion of macro 'print'
   67 |     lon<total-lon?print("Yes"):print("No");
      |                   ^~~~~
a.cc:49:35: error: expected primary-expression before ';' token
   49 | #define print(a) cout << a << endl;
      |                                   ^
a.cc:67:19: note: in expansion of macro 'print'
   67 |     lon<total-lon?print("Yes"):print("No");
      |                   ^~~~~
a.cc:67:31: error: expected primary-expression before ':' token
   67 |     lon<total-lon?print("Yes"):print("No");
      |                               ^
Language: C++

//コンパイラ最適化用
#pragma GCC optimize("Ofast")
//インクルード(アルファベット順)
#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<chrono>//実行時間計測
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<iterator>//集合演算(積集合,和集合,差集合など)
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm,accumulate
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
#include<unordered_map>//順序保持しないmap
#include<unordered_set>//順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列
#include<bits/stdc++.h>

using namespace std;
typedef long long ll;

//マクロ
//forループ
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=ll(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=ll(b);i--)
//xにはvectorなどのコンテナ
#define ALL(x) x.begin(),x.end() 
#define SIZE(x) ll(x.size()) 
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素
#define print(a) cout << a << endl;
#define cin(x) cin >> x;

signed main(){
    //入力の高速化用のコード
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    int N;
    cin(N);
    vector<int> L(N);
    REP(i,N){cin(L.at(i))}
    
    int lon = 0, total = 0;
    REP(i,N){
        lon = max(long,L.at(i));
        total += L.at(i)
    }

    lon<total-lon?print("Yes"):print("No");


  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:19: error: expected primary-expression before 'long'
   63 |         lon = max(long,L.at(i));
      |                   ^~~~
a.cc:64:25: error: expected ';' before '}' token
   64 |         total += L.at(i)
      |                         ^
      |                         ;
   65 |     }
      |     ~                    
a.cc:49:35: error: expected ':' before ';' token
   49 | #define print(a) cout << a << endl;
      |                                   ^
a.cc:67:19: note: in expansion of macro 'print'
   67 |     lon<total-lon?print("Yes"):print("No");
      |                   ^~~~~
a.cc:49:35: error: expected primary-expression before ';' token
   49 | #define print(a) cout << a << endl;
      |                                   ^
a.cc:67:19: note: in expansion of macro 'print'
   67 |     lon<total-lon?print("Yes"):print("No");
      |                   ^~~~~
a.cc:67:31: error: expected primary-expression before ':' token
   67 |     lon<total-lon?print("Yes"):print("No");
      |                               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
typedef long long ll;
typedef pair<int,int> P;
#define F first
#define S second
const double PI=acos(-1);
//fixed<<setprecision(11)<<

int main(){
  int n;
  cin>>n;
  vector<int> L(n);
  rep(i,n) cin>>L[i];

  sort(L.begin(),L.end());
  int sum=0;
  rep(i,n-1) sum+=L[i];
  int MAX_L=L.back;
  if(MAX_L<sum) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:15: error: cannot resolve overloaded function 'back' based on conversion to type 'int'
   20 |   int MAX_L=L.back;
      |               ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
typedef long long ll;
typedef pair<int,int> P;
#define F first
#define S second
const double PI=acos(-1);
//fixed<<setprecision(11)<<

int main(){
  int n;
  cin>>n;
  vector<int> L(n);
  rep(i,n) cin>>L[i];

  sort(L.begin(),L.end());
  int sum=0;
  rep(i,n-1) sum+=L[i];
  int MAX_L=L.end;
  if(MAX_L<sum) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:15: error: cannot resolve overloaded function 'end' based on conversion to type 'int'
   20 |   int MAX_L=L.end;
      |               ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
typedef long long ll;
typedef pair<int,int> P;
#define F first
#define S second
const double PI=acos(-1);
//fixed<<setprecision(11)<<

int main(){
  int n;
  cin>>n;
  vector<int> L(n);
  rep(i,n) cin>>L[i];

  sort(L.begin(),L.end());
  int sum=0;
  rep(i,n-1) sum+=L[i];
  int MAX_L=L.end();
  if(MAX_L<sum) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: cannot convert 'std::vector<int>::iterator' to 'int' in initialization
   20 |   int MAX_L=L.end();
      |             ~~~~~^~
      |                  |
      |                  std::vector<int>::iterator
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define REP(i, n) for (LL i = 0; i < (int)(n); i++)
#define FOR(i, m, n) for (LL i = m; i n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define all(x) (x).begin(), (x).end()
#define int long long
struct initon
{
    initon()
    {
        cin.tie(0);
        ios::sync_with_stdio(false);
    };
};
signed main() {
 int n;
  cin >> n;
  vector<int> a(n);
  REP(i,n)cin>>a[i];
  SORT(a);
  int s;
  REP(i,n-1)s+=a[i];
  if(a[n-1]>s){
  cout << "Ys";
  }else{
  cout << "No"
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:15: error: expected ';' before '}' token
   29 |   cout << "No"
      |               ^
      |               ;
   30 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define rep2(i, m, n) for(int i = (int)(m); i < (int)(n); i++)
#define rep_inv(i, n, m) for(int i = (int)(n); i > (int)(m); i--)
using namespace std;
using ll = long long;
using vl = vector<ll>;
using vc = vector<char>;
using vvl = vector<vl>;
using vvc = vector<vc>;
using pll = pair<ll, ll>;
using vpll = vector<pll>;

int main(){
  ll N;
  cin >> N;
  vl L(N);
  rep(i, N) cin >> L[i];

  ll tot = accumulate(L.begin(), L.end());

  rep(i, N){
    if(tot - L[i] <= L[i]){
      cout << "No\n";
      return 0;
    }
  }

  cout << "Yes\n";
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:22: error: no matching function for call to 'accumulate(std::vector<long long int>::iterator, std::vector<long long int>::iterator)'
   20 |   ll tot = accumulate(L.begin(), L.end());
      |            ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/numeric:62,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_numeric.h:134:5: note: candidate: 'template<class _InputIterator, class _Tp> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp)'
  134 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:134:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_numeric.h:161:5: note: candidate: 'template<class _InputIterator, class _Tp, class _BinaryOperation> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation)'
  161 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:161:5: note:   candidate expects 4 arguments, 2 provided
Language: C++

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


Compiler output:
a.cc:6:9: error: extended character 　 is not valid in an identifier
    6 |   int N;　cin>>N;
      |         ^
a.cc: In function 'int main()':
a.cc:6:9: error: '\U00003000cin' was not declared in this scope
    6 |   int N;　cin>>N;
      |         ^~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vectorr' was not declared in this scope
    7 |   vectorr<int> S(N);
      |   ^~~~~~~
a.cc:7:11: error: expected primary-expression before 'int'
    7 |   vectorr<int> S(N);
      |           ^~~
a.cc:9:10: error: 'S' was not declared in this scope
    9 |     cin>>S.at(i);
      |          ^
a.cc:11:8: error: 'S' was not declared in this scope
   11 |   sort(S.begin(),S.end());
      |        ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#define int64 long long
using namespace std;

int main()
{
  int64 nn, tmp, sum = 0;
  cin >> nn;
  ventor<int64> ll(nn);
  for(int64 ii = 0;ii < nn;ii++)
  {
    cin >> tmp;
    ll[ii] = tmp;
    sum += tmp;
  }
  sort(ll.begin(), ll.end());
  sum -= ll[nn - 1];
  if(sum > ll[nn - 1])
  {
    puts("Yes");
  }
  else
  {
    puts("No");
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'ventor' was not declared in this scope
   11 |   ventor<int64> ll(nn);
      |   ^~~~~~
a.cc:4:15: error: expected primary-expression before 'long'
    4 | #define int64 long long
      |               ^~~~
a.cc:11:10: note: in expansion of macro 'int64'
   11 |   ventor<int64> ll(nn);
      |          ^~~~~
a.cc:15:5: error: 'll' was not declared in this scope
   15 |     ll[ii] = tmp;
      |     ^~
a.cc:18:8: error: 'll' was not declared in this scope
   18 |   sort(ll.begin(), ll.end());
      |        ^~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#define int64 long long
using namespace std;

int main()
{
  int64 nn, tmp, sum = 0;
  cin >> nn;
  ventor<int64> ll(nn);
  for(int64 ii = 0;ii < nn;ii++)
  {
    cin >> tmp;
    ll[ii] = tmp;
    sum += tmp;
  }
  sort(ll.begin(), ll.end());
  sum -= ll[nn - 1];
  if(sum >= ll[nn - 1])
  {
    puts("No");
  }
  else
  {
    puts("Yes");
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'ventor' was not declared in this scope
   11 |   ventor<int64> ll(nn);
      |   ^~~~~~
a.cc:4:15: error: expected primary-expression before 'long'
    4 | #define int64 long long
      |               ^~~~
a.cc:11:10: note: in expansion of macro 'int64'
   11 |   ventor<int64> ll(nn);
      |          ^~~~~
a.cc:15:5: error: 'll' was not declared in this scope
   15 |     ll[ii] = tmp;
      |     ^~
a.cc:18:8: error: 'll' was not declared in this scope
   18 |   sort(ll.begin(), ll.end());
      |        ^~
Language: Java


import java.util.Arrays;
import java.util.Scanner;

public class ABC117B {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int N =0;
		int sum =0;
		N = scan.nextInt();

		int[] array = new int[N];
		for(int i=0; i<N; i++) {
			array[i] = scan.nextInt();
		}

		Arrays.sort(array);
		for(int i = 0;i<N-1;i++) {
			sum += array[i];
		}
		if(array[N-1]<sum) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}

}


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: expected ';' before '}' token
   14 |   else cout << "No" << endl
      |                            ^
      |                            ;
   15 |  }
      |  ~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n;
  cin>>n;
  int a;
  int max = INT_MIN;
  for(int i=0;i<n;i++)
  {
    cin>>a;
    total+=a;
    if(a>max)
      max=a;
  }	
  if(total-max>max)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'INT_MIN' was not declared in this scope
    7 |   int max = INT_MIN;
      |             ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 | using namespace std;
a.cc:11:5: error: 'total' was not declared in this scope
   11 |     total+=a;
      |     ^~~~~
a.cc:15:6: error: 'total' was not declared in this scope
   15 |   if(total-max>max)
      |      ^~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: expected ',' or ';' before 'for'
   13 |   for (int i = 0; i < N-1; i++) {
      |   ^~~
a.cc:13:19: error: 'i' was not declared in this scope
   13 |   for (int i = 0; i < N-1; i++) {
      |                   ^
Language: C++

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

int main() {
  int A,;
  cin >> A;
  int X;
  int sum = 0;
  for(int i= 0;i < A+i++){
    cin >> X;
    sum += X;
  }
    int Y;
  for(int o = 0;o < A;o++){
    cin >> Y;
    if(sum - Y <= Y){
      cout << "No" << endl;
      break;
    }
    else{
       cout <, "Yes" << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before ';' token
    5 |   int A,;
      |         ^
a.cc:9:25: error: expected ';' before ')' token
    9 |   for(int i= 0;i < A+i++){
      |                         ^
      |                         ;
a.cc:21:14: error: expected primary-expression before ',' token
   21 |        cout <, "Yes" << endl;
      |              ^
a.cc:21:22: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
   21 |        cout <, "Yes" << endl;
      |                ~~~~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  int a, b;
  a = min_element(vec.cbegin(), vec.cend());
  b = accumulate(vec.cbegin(), vec.cend()) - a;
  if(a < b){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: cannot convert '__gnu_cxx::__normal_iterator<const int*, std::vector<int> >' to 'int' in assignment
   15 |   a = min_element(vec.cbegin(), vec.cend());
      |       ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                  |
      |                  __gnu_cxx::__normal_iterator<const int*, std::vector<int> >
a.cc:16:17: error: no matching function for call to 'accumulate(std::vector<int>::const_iterator, std::vector<int>::const_iterator)'
   16 |   b = accumulate(vec.cbegin(), vec.cend()) - a;
      |       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/numeric:62,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_numeric.h:134:5: note: candidate: 'template<class _InputIterator, class _Tp> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp)'
  134 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:134:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_numeric.h:161:5: note: candidate: 'template<class _InputIterator, class _Tp, class _BinaryOperation> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation)'
  161 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:161:5: note:   candidate expects 4 arguments, 2 provided