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

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

// STLの練習
int main() {
  int N;
  cin >> N;
  vector<int> L(N);
  for (int i = 0; i < N; i++) cin >> L[i];
  int sum = accumulate(L.begin(), L.end(), 0);
  int Lmax = *max_element(L.begin(), L.end());
  if (sum - Lmax > Lmax)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}

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

#include <iostream>
#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);
    }
    sort(vec.begin(), vec.end());
    int sum = 0;
    for (int i = 0; i < n - 1; i++){
        sum += vec.at(i);
    }
    if (sum > vec.at(n - 1)){
        cout << "Yes" << endl;
    }
    else
        cout << "No" << endl;
}

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

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

int main() {

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


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

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

int main(){
  int N;
  cin>>N;
  vector<int> L(N);
  for(int i=0;i<N;i++){
    cint>>L.at(i);
  }
  
  bool flag=true;
  
  for(int i=0;i<N;i++){
    int sum=0;
    for(int j=0;j<N;j++){
      if(i==j){
        continue;
      }
      sum+=L.at(j);
    }
    if(sum<=L.at(i)){
      flag=false;
      break;
    }
  }
  if(flag){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'cint' was not declared in this scope; did you mean 'uint'?
    9 |     cint>>L.at(i);
      |     ^~~~
      |     uint
Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
using namespace std;
#define rep(i,x) for(int i = 0; i < x; i++)
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<ll,ll> Pll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<vector<vector<int>>> vvvi;
const ll N = 1e9+7;
const int n_max = 1e5+10;


void print() {
    cout << endl;
}
 
template <class Head, class... Tail>
void print(Head&& head, Tail&&... tail) {
    cout << head;
    if (sizeof...(tail) != 0) cout << ' ';
    print(forward<Tail>(tail)...);
}
 
template <class T>
void print(vector<T> &vec) {
    for (auto& a : vec) {
        cout << a;
        if (&a != &vec.back()) cout << ' ';
    }
    cout << endl;
}
 
template <class T>
void print(vector<vector<T>> &df) {
    for (auto& vec : df) {
        print(vec);
    }
}
 


int main(){
  ll n;cin >>n;
  vector<int> l(n);
  int sum = 0;
  for(int i = 0;i < n; i++){
    cin >> l.at(i)
    sum += l.at(i);
  }
  bool ok = true;
  for(int i = 0;i<n; i++)ok &= (sum - l.at(i) > l.at(i));
  
  cout << (ok ? ”Yes” : “No“ ) << endl;
}


Compiler output:
a.cc:63:17: error: extended character ” is not valid in an identifier
   63 |   cout << (ok ? ”Yes” : “No“ ) << endl;
      |                 ^
a.cc:63:17: error: extended character ” is not valid in an identifier
a.cc:63:25: error: extended character “ is not valid in an identifier
   63 |   cout << (ok ? ”Yes” : “No“ ) << endl;
      |                         ^
a.cc:63:25: error: extended character “ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:57:19: error: expected ';' before 'sum'
   57 |     cin >> l.at(i)
      |                   ^
      |                   ;
   58 |     sum += l.at(i);
      |     ~~~            
a.cc:63:17: error: '\U0000201dYes\U0000201d' was not declared in this scope
   63 |   cout << (ok ? ”Yes” : “No“ ) << endl;
      |                 ^~~~~
a.cc:63:25: error: '\U0000201cNo\U0000201c' was not declared in this scope
   63 |   cout << (ok ? ”Yes” : “No“ ) << endl;
      |                         ^~~~
Language: C++

#include<iostream>

int main(){
  ll n;cin >>n;
  vector<int> l(n);
  int sum = 0;
  for(int i = 0;i < n; i++){
    cin >> l.at(i)
    sum += l.at(i);
  }
  bool ok = true;
  for(int i = 0;i<n; i++)ok &= (sum - l.at(i) > l.at(i));
  
  cout << (ok ? ”Yes” : “No“ ) << endl;
}

Compiler output:
a.cc:14:17: error: extended character ” is not valid in an identifier
   14 |   cout << (ok ? ”Yes” : “No“ ) << endl;
      |                 ^
a.cc:14:17: error: extended character ” is not valid in an identifier
a.cc:14:25: error: extended character “ is not valid in an identifier
   14 |   cout << (ok ? ”Yes” : “No“ ) << endl;
      |                         ^
a.cc:14:25: error: extended character “ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:4:3: error: 'll' was not declared in this scope
    4 |   ll n;cin >>n;
      |   ^~
a.cc:4:8: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   ll n;cin >>n;
      |        ^~~
      |        std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:14: error: 'n' was not declared in this scope
    4 |   ll n;cin >>n;
      |              ^
a.cc:5:3: error: 'vector' was not declared in this scope
    5 |   vector<int> l(n);
      |   ^~~~~~
a.cc:5:10: error: expected primary-expression before 'int'
    5 |   vector<int> l(n);
      |          ^~~
a.cc:8:12: error: 'l' was not declared in this scope
    8 |     cin >> l.at(i)
      |            ^
a.cc:12:39: error: 'l' was not declared in this scope
   12 |   for(int i = 0;i<n; i++)ok &= (sum - l.at(i) > l.at(i));
      |                                       ^
a.cc:14:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |   cout << (ok ? ”Yes” : “No“ ) << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:17: error: '\U0000201dYes\U0000201d' was not declared in this scope
   14 |   cout << (ok ? ”Yes” : “No“ ) << endl;
      |                 ^~~~~
a.cc:14:25: error: '\U0000201cNo\U0000201c' was not declared in this scope
   14 |   cout << (ok ? ”Yes” : “No“ ) << endl;
      |                         ^~~~
a.cc:14:35: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |   cout << (ok ? ”Yes” : “No“ ) << endl;
      |                                   ^~~~
      |                                   std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
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.begin(),l.end());
  int sum = 0;
  for(int i = 0; i < n-1; i++){
    sum += l[i];
  }
  if(sum > l[n-1]) cout << "Yes" <<endl;
  else cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: request for member 'begin' in 'l', which is of non-class type 'int [n]'
   10 |   sort(l.begin(),l.end());
      |          ^~~~~
a.cc:10:20: error: request for member 'end' in 'l', which is of non-class type 'int [n]'
   10 |   sort(l.begin(),l.end());
      |                    ^~~
Language: C

#include <stdio.h>

int main(){
  int n;
  int i,max,total=0;
  int *line;
  
  scanf("%d",&n);
  line=(int*)malloc(sizeof(int)*n);
  max=line[0];
  for(i=0;i<n;i==){
    if(max<line[i]){
      total+=max;
      max=line[i];
    } else {
      total+=line[i];
    }
  }
  
  if(max<total){
    printf("Yes");
  } else {
    printf("No");
  }
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
    9 |   line=(int*)malloc(sizeof(int)*n);
      |              ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:9:14: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
    9 |   line=(int*)malloc(sizeof(int)*n);
      |              ^~~~~~
main.c:9:14: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:11:18: error: expected expression before ')' token
   11 |   for(i=0;i<n;i==){
      |                  ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  int p[N];
  int sum=0;
  int comp;
  for (int i = 0; i < N; ++i)
  {
  	  cin >> p[i];
  	  sum += p[i]
  }
int max =0;
  for (int i = 0; i < N; ++i)
  {
  	if (max < p[i]  )
  	{
  		max = p[i];
  	}
  }

  comp = sum - max;

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

  
}

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

a;b;c;d;i;main(){
  scanf("%d",&a);
  for(;i<a;i++){
    scanf("%d",&d);
    b<d?c+=b&&b=d:c+=d;
  }
  printf(c>b?"Yes":"No");}


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a;b;c;d;i;main(){
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: warning: data definition has no type or storage class
    1 | a;b;c;d;i;main(){
      |   ^
main.c:1:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:5: warning: data definition has no type or storage class
    1 | a;b;c;d;i;main(){
      |     ^
main.c:1:5: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:1:7: warning: data definition has no type or storage class
    1 | a;b;c;d;i;main(){
      |       ^
main.c:1:7: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:1:9: warning: data definition has no type or storage class
    1 | a;b;c;d;i;main(){
      |         ^
main.c:1:9: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:1:11: error: return type defaults to 'int' [-Wimplicit-int]
    1 | a;b;c;d;i;main(){
      |           ^~~~
main.c: In function 'main':
main.c:2:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    2 |   scanf("%d",&a);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a;b;c;d;i;main(){
main.c:2:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    2 |   scanf("%d",&a);
      |   ^~~~~
main.c:2:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:16: error: lvalue required as left operand of assignment
    5 |     b<d?c+=b&&b=d:c+=d;
      |                ^
main.c:7:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |   printf(c>b?"Yes":"No");}
      |   ^~~~~~
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

a;b;c;d;i;main(){
  scanf("%d",&a);
  for(;i<a;i++){
    scanf("%d",&d);
    if(b<d){
      c+=b;b=d;
    }else{
      c+=d;
    }
    b<d?c+=b;b=d:c+=d;
  }
  printf(c>b?"Yes":"No");}


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a;b;c;d;i;main(){
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: warning: data definition has no type or storage class
    1 | a;b;c;d;i;main(){
      |   ^
main.c:1:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:5: warning: data definition has no type or storage class
    1 | a;b;c;d;i;main(){
      |     ^
main.c:1:5: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:1:7: warning: data definition has no type or storage class
    1 | a;b;c;d;i;main(){
      |       ^
main.c:1:7: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:1:9: warning: data definition has no type or storage class
    1 | a;b;c;d;i;main(){
      |         ^
main.c:1:9: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:1:11: error: return type defaults to 'int' [-Wimplicit-int]
    1 | a;b;c;d;i;main(){
      |           ^~~~
main.c: In function 'main':
main.c:2:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    2 |   scanf("%d",&a);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a;b;c;d;i;main(){
main.c:2:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    2 |   scanf("%d",&a);
      |   ^~~~~
main.c:2:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:13: error: expected ':' before ';' token
   10 |     b<d?c+=b;b=d:c+=d;
      |             ^
      |             :
main.c:10:17: error: expected ';' before ':' token
   10 |     b<d?c+=b;b=d:c+=d;
      |                 ^
      |                 ;
main.c:12:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   12 |   printf(c>b?"Yes":"No");}
      |   ^~~~~~
main.c:12:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:12:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include<iostream>
using namespace std;
#include<bits/stdc++.h>
int main(){
  int n,sum=0;
  cin>>n;
  vector<int>a(n);
  for(int i=0;i<n;i++){
    cin>>a[i];
    sum+=a[i];
  }
  int k=(*max_elment(a.begin(),a.end()));
  if(sum-k>k)
    cout<<"Yes";
  else
    cout<<"No";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'max_elment' was not declared in this scope
   12 |   int k=(*max_elment(a.begin(),a.end()));
      |           ^~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
#include<bits/stdc++.h>
int main(){
  int n,sum=0;
  cin>>n;
  vector<int>v(n);
  for(int i=0;i<n;i++){
    cin>>a[i];
    sum+=a[i];
  }
  int k=*max_elment(a.begin(),a.end());
  if(sum-k>k)
    cout<<"Yes";
  else
    cout<<"No";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'a' was not declared in this scope
    9 |     cin>>a[i];
      |          ^
a.cc:12:21: error: 'a' was not declared in this scope
   12 |   int k=*max_elment(a.begin(),a.end());
      |                     ^
a.cc:12:10: error: 'max_elment' was not declared in this scope
   12 |   int k=*max_elment(a.begin(),a.end());
      |          ^~~~~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected ';' before '}' token
   14 |         s+=l[i]
      |                ^
      |                ;
   15 |     }
      |     ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: 'max' cannot be used as a function
   14 |         max=max(max,p);
      |             ~~~^~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: expected ',' or ';' before 'max'
   14 |         max=max(max,p);
      |         ^~~
Language: C++

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

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

#include <bits/stdc++.h>
using namespace std;
 
int main (){
 
  int n;
  cin >> n;
  int a[n];
  for(int i=0; i<n; i++) cin >> a[i];
  
  int sum=0, max=0;
  for(int i=0; i<n; i++){
  	max=max(max,a[i]);
    sum += a[i];
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: 'max' cannot be used as a function
   13 |         max=max(max,a[i]);
      |             ~~~^~~~~~~~~~
a.cc:15:4: error: expected '}' at end of input
   15 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main (){
      |            ^
Language: C++

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

int main (){

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

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

#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int INF = 1 << 30;
const ll INFll = 1ll << 60;

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_others = sum(l.begin(), l.end()) - max;
  cout << (max < sum_others ? "Yes" : "No") << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   15 |   int max = max_element(l.begin(), l.end());
      |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      |                        |
      |                        __gnu_cxx::__normal_iterator<int*, std::vector<int> >
a.cc:16:20: error: 'sum' was not declared in this scope
   16 |   int sum_others = sum(l.begin(), l.end()) - max;
      |                    ^~~
Language: C++

#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<int> v(n);
  int sum=0;
  int mx=0;
  for (int i=0;i < n;i++){
    cin >> v.at(i);
    sum+=v.at(i);
    mx=max(mx,v.at(i));
  }
  if (sum-max > max) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}
  

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

#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<int> v(n);
  int sum=0;
  int max=0;
  for (int i=0;i < n;i++){
    cin >> v.at(i);
    sum+=v.at(i);
    max=max(max,v.at(i));
  }
  if (sum-max > max) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}
  

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

#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<int> v(n);
  int sum=0;
  int max=0;
  for (int i=0;i < n;i++){
    cin >> v.at(i);
    sum+=v.at(i);
    max(max,v.at(i));
  }
  if (sum-max > max) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: 'max' cannot be used as a function
   14 |     max(max,v.at(i));
      |     ~~~^~~~~~~~~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: expected ';' before '{' token
   14 |   max = max{begin.L,end.L}
      |            ^
      |            ;
a.cc:21:26: error: expected '}' at end of input
   21 |   else cout<<"Yes"<<endl;
      |                          ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>

using namespace std;

int n, sum = 0;, max=-1;

int main() {
	cin >> n;
	int l;
	for (int i = 0; i < n; i ++) {
		cin >> l;
		if (max < l) {
			max = l;
		} else {
			sum += l;
		}
	}

	if (sum < l) {
		cout << "Yes" << endl;
	} else {
		cout << "No" << endl;
	}

	return 0;
}

Compiler output:
a.cc:5:16: error: expected unqualified-id before ',' token
    5 | int n, sum = 0;, max=-1;
      |                ^
a.cc:5:21: error: expected constructor, destructor, or type conversion before '=' token
    5 | int n, sum = 0;, max=-1;
      |                     ^
a.cc: In function 'int main()':
a.cc:12:21: error: parse error in template argument list
   12 |                 if (max < l) {
      |                     ^~~~~~~
a.cc:12:28: error: cannot resolve overloaded function 'max' based on conversion to type 'bool'
   12 |                 if (max < l) {
      |                            ^
a.cc:13:31: error: overloaded function with no contextual type information
   13 |                         max = l;
      |                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define MAX_N 100000
#define MAX_M 100000
const int MAX = 100100;
const int MOD = 1000000007;
#define vec vector<int>
#define vecll vector<ll>
#define vecllvec vector<vector<ll>>
#define vecb vector<bool>
#define vecBvec vector<vector<bool>>
#define vecst vector<string>
#define vecch vector<char>
#define vecd vector<double>
#define vecvec vector<vector<int>>
#define vecDvec vector<vector<double>>
#define vecHvec vector<vector<char>>
#define all(x) (x).begin(),(x).end()
const long long INF = 1LL<<60;
#define PI 3.141592653589793
// cout << setprecision(15) << std::fixed;

// テレンス「もしかしてACですかーッ!?」　ジョセフ「Yse! Yse! Yse!」


int main() {
  int n,g=0,m=0;
  int n;
  int A[n];
  for(int i=0;i<n;i++){
    cin>>A[i];
    g+=A[i];
    m=max(m,A[i]);
  }
  if(m<g-m){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:7: error: redeclaration of 'int n'
   29 |   int n;
      |       ^
a.cc:28:7: note: 'int n' previously declared here
   28 |   int n,g=0,m=0;
      |       ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#define ll long long; int
#define req(i,k) for(int i = 0; i < k; i++)
using namespace std;


int main(void) {
    int n;
    cin >> n;
    vector<int> l(n);
    req(i,n) {
        cin >> l.at(i);
    }
    int x = 0;
    sort(l.begin(), l.end());
    req(i,n-1) {
        x += l.at(i);
    }
    if(x > l.at(n-1)) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}

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

#include <iostream>
#include <vector>
#include <string>
#define ll long long; int
#define req(i,k) for(int i = 0; i < k; i++)
using namespace std;


int main(void) {
    int n;
    cin >> n;
    vector<int> l(n);
    req(i,n) {
        cin >> l.at(i);
    }
    int x = 0;
    sort(l.begin(), l.end());
    req(i,n-1) {
        x += l.at(i);
    }
    cout << x << endl;
    cout << l.at(n-1);
    if(x > l.at(n-1)) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}

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

#include<bits/std++.h>
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=0;
  int index=0;
  for(int i=0;i<n;i++) {
    if(MAX<=l[i]){
      MAX=l[i];
      index=i;
    }
  }
  int ans=0;
  for(int i=0;i<n;i++){
    if(index!=i){
      ans+=l[i];
    }
  }
  if(ans<MAX) cout << "Yes" << endl;
  else cout << "No"<< endl;
  return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: 'n' was not declared in this scope
   14 |   re(i,n){sum += L[i];}
      |        ^
a.cc:2:34: note: in definition of macro 're'
    2 | #define re(i,n) for(int i=0; i < n; i++)
      |                                  ^
Language: C

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

int main() {
	int n, sum = 0;
	cin >> n;
	int v[n];
	for(int i = 0; i < n; i++) {
		cin >> v[i];
		sum += v[i];
	}
	for(int i = 0; i < n; i++) {
		if(v[i] >= sum - v[i]) {
			cout << "No\n";
			return 0;
		}
	}
	cout << "Yes\n";
	return 0;
}

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

#include<stdio.h>
int main(void){
  int n;
  int l[10];
  int i;
  int tmp;
  int sum;
  scanf("%d",&n);
  for (i=0;i<n;i++){
    scanf("%d",&l[i]);
  }
  tmp = l[0];
  sum = tmp
  for(i=1;i<n;i++){
    sum += l[i];
    if(tmp < l[i]){
      tmp = l[i];
    }
  }
  if(tmp < sum - tmp){
    printf("Yes");
  }else{
    printf("No");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:12: error: expected ';' before 'for'
   13 |   sum = tmp
      |            ^
      |            ;
   14 |   for(i=1;i<n;i++){
      |   ~~~
Language: C++

//自称高知能系Vtuberの高井茅乃です。
//Twitter: https://twitter.com/takaichino
//YouTube: https://www.youtube.com/channel/UCTOxnI3eOI_o1HRgzq-LEZw

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

#define INF 1999999999
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(int i=1;i<=n;i++)
#define MODA 1000000007 

int main() {
    int ans = 0;
	int n, tmp;
	int sum = 0, ma = -1;
	cin >> n;
	REP(i, n){
		cin >> tmp;
		ma= max(max, tmp);
		sum += tmp;
	}
	if(sum - max > max) cout << "Yes" << endl;
	else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: no matching function for call to 'max(<unresolved overloaded function type>, int&)'
   21 |                 ma= max(max, tmp);
      |                     ~~~^~~~~~~~~~
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:5:
/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
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:   candidate expects 1 argument, 2 provided
/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:   template argument deduction/substitution failed:
a.cc:21:24: note:   couldn't deduce template parameter '_Tp'
   21 |                 ma= max(max, tmp);
      |                     ~~~^~~~~~~~~~
a.cc:24:16: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-'
   24 |         if(sum - max > max) cout << "Yes" << endl;
      |            ~~~~^~~~~
Language: C++


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


Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: 'n' was not declared in this scope
   20 |   for(int i=1;i<n;i++){
      |                 ^
a.cc:24:11: error: invalid types 'int[int]' for array subscript
   24 |   if(ct>ct[0])
      |           ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
  int N; cin>>N;
  vector<int> L(N);
  for(int i=0;i<N;i++){
    cin>>L[i];
  }

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

  int Csum = 0;
  for(int i=0;i<N-1;i++){
    Csum += L[i];
  }

  if(Csum>L[N-1]){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
}


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

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int N, L[10];
  cin >> N;
  for(int i=0; i<N; i++){
    cin >> N[i];
  }
  sort(L, L+N);
  int sum = 0;
  for(int i=0; i<N; i++){
    sum += L[i];
  }
  if(L[0] < sum) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: invalid types 'int[int]' for array subscript
    8 |     cin >> N[i];
      |             ^
Language: C++

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

int main(){
  int n;
  cin >> n;
  priority_queue<int> que;
  rep(i,n){
    int tmp;
    que.push(tmp);
  }
  int a,b;
  b=0:
  a = que.top();
  que.pop();
  while(!que.empty()){
    b += que.top();
    que.pop();
  }
  string ans;
  if(a<b) ans = "True";
  else ans = "False";
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: expected ';' before ':' token
   14 |   b=0:
      |      ^
      |      ;
Language: C++

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

	

int main() {
	
	int N;
	scanf("%d",&N);
	
	vector<int> A(N);
	for(int i=0; i<N; ++i){
		
		scanf("%d",&A.at(i));
		
	}
	
	int max=*max_element(A.begin(),A.end());
	
	int total=0;
	for(int x:A){
		
		total+=A.at(i);
		
	}
	
	total-=max;
	
	if(max>total){
		
		cout <<"Yes" <<endl;
		
	}
	else{
		
		cout <<"No" <<endl;
		
	}
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:29: error: 'i' was not declared in this scope
   23 |                 total+=A.at(i);
      |                             ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:6: error: 'sum' was not declared in this scope
   15 |   if(sum >= l.at(n-1)) {
      |      ^~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:6: error: 'sum' was not declared in this scope
   15 |   if(sum >= l.at(n-1)) {
      |      ^~~
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:5:13: note: to match this '{'
    5 | int main () {
      |             ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0;i < (n);i++)
using namespace std;
  
int main () {
  int n;
  cin >> n;
  vector<int> l(n);
  rep(i,n) cin >> l.at(i);
  ssort(l.begin(),l.end());
  rep(i,n-1) {
    int sum;
    sum += l.at(i);
    if(sum >= l.at(n-1) {
      cout << "No";
      return 0;
    }
  }
 cout << "Yes";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'ssort' was not declared in this scope; did you mean 'short'?
   10 |   ssort(l.begin(),l.end());
      |   ^~~~~
      |   short
a.cc:14:24: error: expected ')' before '{' token
   14 |     if(sum >= l.at(n-1) {
      |       ~                ^~
      |                        )
a.cc:18:3: error: expected primary-expression before '}' token
   18 |   }
      |   ^
Language: C++

void week_0_C()
{
    class polygon
    {
        unsigned int sided;
        int *data;
    public:
        polygon(){;}
        ~polygon(){delete [] data;}
        polygon( unsigned int &n)
        {
            sided = n;
            data = new int[n];
        }
        void input()
        {
            if (sided <= 2)
            {
                cout << "can not form a polygon\n";
                return;
            }
            int count = sided;
            while( count -- )
            {
                unsigned int temp;
                cin >> temp;
                data[count] = temp;
            }
            return;
        }
        bool form()
        {
            int max = data[0];
            int n = sided;
            while(n--)
                if(max < data[n])
                    max = data[n];
            n = sided;
            int sum = 0;
            while (n --)
                sum += data[n];
            return (max < (sum - max));
        }
    };
    
    unsigned int sided;
    cin >> sided ;
    polygon p1(sided);
    p1.input();
    if (p1.form())
        cout << "\nyes"<<endl;
    else
        cout << "\nno"<<endl;
    
    
    
    return;
}




int main ()
{
    week_0_C();
    return 0;
}



Compiler output:
a.cc: In member function 'void week_0_C()::polygon::input()':
a.cc:19:17: error: 'cout' was not declared in this scope
   19 |                 cout << "can not form a polygon\n";
      |                 ^~~~
a.cc:26:17: error: 'cin' was not declared in this scope
   26 |                 cin >> temp;
      |                 ^~~
a.cc: In function 'void week_0_C()':
a.cc:47:5: error: 'cin' was not declared in this scope
   47 |     cin >> sided ;
      |     ^~~
a.cc:51:9: error: 'cout' was not declared in this scope
   51 |         cout << "\nyes"<<endl;
      |         ^~~~
a.cc:51:26: error: 'endl' was not declared in this scope
   51 |         cout << "\nyes"<<endl;
      |                          ^~~~
a.cc:53:9: error: 'cout' was not declared in this scope
   53 |         cout << "\nno"<<endl;
      |         ^~~~
a.cc:53:25: error: 'endl' was not declared in this scope
   53 |         cout << "\nno"<<endl;
      |                         ^~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int n,sidesum=0,max=0;
    int input,i=1;
    cin>>n;
    cin>>input;
    max=input;
    sidesum+=input；
    while(i++<n){
        cin>>input;
        sidesum+=input;
        if(max<input) max=input;
    }
    if(2*max>=sidesum) cout<<"No"<<endl;
    cout<<"Yes"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'input\U0000ff1b' was not declared in this scope; did you mean 'input'?
   12 |     sidesum+=input；
      |              ^~~~~~~
      |              input
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int n,sidesum=0,max=0;
    int input,i=1;
    cin>>n;
    cin>>input;
    max=input;
    sidesum+=input
    while(i++<n){
        cin>>input;
        sidesum+=input;
        if(max<input) max=input;
    }
    if(2*max>=sidesum) cout<<"No"<<endl;
    cout<<"Yes"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: expected ';' before 'while'
   12 |     sidesum+=input
      |                   ^
      |                   ;
   13 |     while(i++<n){
      |     ~~~~~
Language: C++

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

int n, mx, sum;

int main()
{
	for (int i = 1, x; i <= n; i ++)
	{
		scanf("%d", &x);
		mx = max(mx, x);
		sum += x;
	}
	puts(x * 2 < sum ? "Yes" : "No");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: 'x' was not declared in this scope
   15 |         puts(x * 2 < sum ? "Yes" : "No");
      |              ^
Language: C++

n=input()
int(n)
all=0
a=[]
a=input().split()

for i in range(0,n):
	x=int(a[i])
	if x>mx: mx=x
	all=all+x
if all>2*mx : print("Yes")
else : print("No")

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n=input()
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: invalid types 'int[int]' for array subscript
   11 |     cin >> l[i];
      |             ^
a.cc:12:13: error: invalid types 'int[int]' for array subscript
   12 |     sum += l[i];
      |             ^
a.cc:13:15: error: invalid types 'int[int]' for array subscript
   13 |     if(max_l<l[i]) max_l = l[i];
      |               ^
a.cc:13:29: error: invalid types 'int[int]' for array subscript
   13 |     if(max_l<l[i]) max_l = l[i];
      |                             ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected initializer before 'l'
    5 |   int n l(n);
      |         ^
a.cc:6:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |   cin >> n;
      |          ^
      |          yn
a.cc:11:12: error: 'l' was not declared in this scope
   11 |     cin >> l[i];
      |            ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected initializer before 'l'
    5 |   int n l(n);
      |         ^
a.cc:6:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |   cin >> n;
      |          ^
      |          yn
a.cc:10:12: error: 'l' was not declared in this scope
   10 |     cin >> l[i];
      |            ^
Language: C++

#include <iostream>
#include<stdio.h>
using namespace std;
int main()
{
	int n[10]; int i = 0;
	int temp;
	int max = 0,sum=0;
	cin >> i;
	for (int j = 0; j < i; j++) {
		scanf_s("%d", &temp);
		n[j] = temp;
		char c = getchar();
		if (c == '\n')break;
	}
	for (int j = 0; j < i; j++) {
		if (n[j] >= max)max = n[j];
		sum += n[j];
	}
	if (max * 2 < sum)printf("Yes");
	else printf("No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   11 |                 scanf_s("%d", &temp);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin >> n;
  vector<int> l(n);
  for (int i = 0; i < n; i++) cin >> l[i];
  int max_idx = l[0];
  int total = l[0];
  for (int i = 1; i < n; i++) {
    if (l[i] > l[max_idx]) max_idx = i;
    total += l[i];
  }
  if (l[max_idx] * 2 < total)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  end
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:6: error: expected ';' before 'return'
   19 |   end
      |      ^
      |      ;
   20 |   return 0;
      |   ~~~~~~
a.cc:20:11: error: statement cannot resolve address of overloaded function
   20 |   return 0;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin >> n;
  vector<int> l(n);
  for (int i = 0; i < n; i++) cin >> c[i];
  int max_idx = l[0];
  int total = l[0];
  for (int i = 1; i < n; i++) {
    if (l[i] > max_idx) max_idx = i;
    total += l[i];
  }
  cout << ((l[max_idx] * 2 >= total) ? "No" : "Yes") << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:38: error: 'c' was not declared in this scope
    8 |   for (int i = 0; i < n; i++) cin >> c[i];
      |                                      ^
Language: C++

N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)
sum = 0
for i in range(1, N):
    sum += L[i]
if L[0] < sum:
    print("Yes")
else:
    print("No")

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

#include <iostream>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  
  int maxL = 0, S = 0;
  for (int i = 0; i < N; ++i) {
    int L;
    cin >> L;
    
    maxL = max(L, maxL);
    S += L;
  }
  
  if (Lmax < S - Lmax) cout << "Yes" << endl;
  else cout << "No" << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: 'Lmax' was not declared in this scope
   17 |   if (Lmax < S - Lmax) cout << "Yes" << endl;
      |       ^~~~
Language: C++

include <iostream>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  
  int maxL = 0, S = 0;
  for (int i = 0; i < N; ++i) {
    int L;
    cin >> L;
    
    maxL = max(L, maxL);
    S += L;
  }
  
  if (Lmax < S - Lmax) cout << "Yes" << endl;
  else cout << "No" << endl;
}
include <iostream>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  
  int maxL = 0, S = 0;
  for (int i = 0; i < N; ++i) {
    int L;
    cin >> L;
    
    maxL = max(L, maxL);
    S += L;
  }
  
  if (Lmax < S - Lmax) cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> N;
      |   ^~~
a.cc:13:12: error: 'max' was not declared in this scope; did you mean 'maxL'?
   13 |     maxL = max(L, maxL);
      |            ^~~
      |            maxL
a.cc:17:7: error: 'Lmax' was not declared in this scope
   17 |   if (Lmax < S - Lmax) cout << "Yes" << endl;
      |       ^~~~
a.cc:17:24: error: 'cout' was not declared in this scope
   17 |   if (Lmax < S - Lmax) cout << "Yes" << endl;
      |                        ^~~~
a.cc:17:41: error: 'endl' was not declared in this scope
   17 |   if (Lmax < S - Lmax) cout << "Yes" << endl;
      |                                         ^~~~
a.cc:18:8: error: 'cout' was not declared in this scope
   18 |   else cout << "No" << endl;
      |        ^~~~
a.cc:18:24: error: 'endl' was not declared in this scope
   18 |   else cout << "No" << endl;
      |                        ^~~~
a.cc: At global scope:
a.cc:20:1: error: 'include' does not name a type
   20 | include <iostream>
      | ^~~~~~~
a.cc:23:5: error: redefinition of 'int main()'
   23 | int main() {
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main() {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:25:3: error: 'cin' was not declared in this scope
   25 |   cin >> N;
      |   ^~~
a.cc:32:12: error: 'max' was not declared in this scope; did you mean 'maxL'?
   32 |     maxL = max(L, maxL);
      |            ^~~
      |            maxL
a.cc:36:7: error: 'Lmax' was not declared in this scope
   36 |   if (Lmax < S - Lmax) cout << "Yes" << endl;
      |       ^~~~
a.cc:36:24: error: 'cout' was not declared in this scope
   36 |   if (Lmax < S - Lmax) cout << "Yes" << endl;
      |                        ^~~~
a.cc:36:41: error: 'endl' was not declared in this scope
   36 |   if (Lmax < S - Lmax) cout << "Yes" << endl;
      |                                         ^~~~
a.cc:37:8: error: 'cout' was not declared in this scope
   37 |   else cout << "No" << endl;
      |        ^~~~
a.cc:37:24: error: 'endl' was not declared in this scope
   37 |   else cout << "No" << endl;
      |                        ^~~~
Language: C++

#include <iostream>
using namespace std;
 
int N;
int L[100];
 
int main() {
  cin >> N;
  for (int i = 0; i < N; ++i) cin >> L[i];
  
  int Lmax, S = 0;
  for (int i = 0; i < N; ++i) {
    if (L[i] >= Lmax) Lmax = L[i];
    S += L[i];
  }
  
  if (S <= Lmax) cout << "Yes" << endl;
  else cout << "No" << endl;
}
#include <iostream>
using namespace std;
 
int N;
int L[100];
 
int main() {
  cin >> N;
  for (int i = 0; i < N; ++i) cin >> L[i];
  
  int Lmax, S = 0;
  for (int i = 0; i < N; ++i) {
    if (L[i] >= Lmax) Lmax = L[i];
    S += L[i];
  }
  
  if (S <= Lmax) cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc:23:5: error: redefinition of 'int N'
   23 | int N;
      |     ^
a.cc:4:5: note: 'int N' previously declared here
    4 | int N;
      |     ^
a.cc:24:5: error: redefinition of 'int L [100]'
   24 | int L[100];
      |     ^
a.cc:5:5: note: 'int L [100]' previously declared here
    5 | int L[100];
      |     ^
a.cc:26:5: error: redefinition of 'int main()'
   26 | int main() {
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main() {
      |     ^~~~