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

#include<stdio.h>
int main(){

int a, b;
int c[b];
scanf("%d&d", &a, &b);

int i;
for(i = 0; i<= b; i++){
	scanf("%d", c[i]);
 }
 
 for(i = 0; i<= b; i++){
 a= a-c[i];
 }
 
 int flag;
 flag = 1;
 if(a>0){
 flag = 0;
 }
 
 if(flag = 1){
 printf("Yes");
 } else if{
 printf("No");
 
 return 0;
 }


Compiler output:
main.c: In function 'main':
main.c:25:11: error: expected '(' before '{' token
   25 |  } else if{
      |           ^
      |           (
main.c:29:2: error: expected declaration or statement at end of input
   29 |  }
      |  ^
Language: C

#include<stdio.h>
int main(){

int a, b;
int c[b];
scanf(%d&d, &a, &b);

int i;
for(i = 0; i<= b; i++){
	scanf(%d%d, c[i]);
 }
 
 for(i = 0; i<= b; i++){
 a= a-c[i];
 }
 
 int flag;
 flag = 1;
 if(a>0){
 flag = 0;
 }
 
 if(flag = 1){
 printf("Yes");
 } else if{
 printf("No");
 
 return 0;
 }


Compiler output:
main.c: In function 'main':
main.c:6:7: error: expected expression before '%' token
    6 | scanf(%d&d, &a, &b);
      |       ^
main.c:10:15: error: expected expression before '%' token
   10 |         scanf(%d%d, c[i]);
      |               ^
main.c:25:11: error: expected '(' before '{' token
   25 |  } else if{
      |           ^
      |           (
main.c:29:2: error: expected declaration or statement at end of input
   29 |  }
      |  ^
Language: C

include<stdio.h>
int main(){

int a, b;
int c[b];
scanf(%d&d, &a, &b);

int i;
for(i = 0; i<= b; i++){
	scanf(%d%d, c[i]);
 }
 
 for(i = 0; i<= b; i++){
 a= a-c[i];
 }
 
 int flag;
 flag = 1;
 if(a>0){
 flag = 0;
 }
 
 if(flag = 1){
 printf("Yes");
 } else if{
 printf("No");
 
 return 0;
 }

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
int main(){
	int H, N;
	cin >> H >> N;
	int a;
	for(int i = 0; i < n; i++){
		int a;
	    cin >> a;
	    H -= a; 
	}

	if(!H)
	    cout << "Yes\n";
	else
	    cout << "No\n";
	return 0;
}        	


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

#include <bits/stdc++.h>

using namespace std;
int main(){
	int H, N;
	cin >> H >> N;
	int a[n];
	for(int i = 0; i < n; i++){
	    cin >> a[i];
	    H -= a[i]; 
	}

	if(H)
	    cout << "Yes\n";
	else
	    cout << "No\n";
	return 0;
}        	


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'n' was not declared in this scope
    7 |         int a[n];
      |               ^
a.cc:9:20: error: 'a' was not declared in this scope
    9 |             cin >> a[i];
      |                    ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  long long h,n,sum=0;
  cin>>h>>n;
  long long a[n];
  for(int i=0;i<n;i++)
  {
    cin>>a[i];
    sum+=a[i];
  }
  if(sum>=h)
  {
    cout<<"Yes"<<endl;
    return 0;
  }
  else
  {
    cout<<"No"<<endl;
    return 0;
  }

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

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

int main() {
  int H,N,A;
  int countD = 0;
  cin >> H >> A;
  for(int i = 0; i < N; i++){
    cin >> A.at(i);
    countD += A;
  }
  if(H <= countD){
    cout << "Yes" << endl;
  }else{
    cout << "NO" << endl;
  }
}   

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: request for member 'at' in 'A', which is of non-class type 'int'
    9 |     cin >> A.at(i);
      |              ^~
Language: C++

#include<bits/stdc++.h>
#define ll long long
usgin namespace std;

int main(){
  ll h, n, i, sum=0;
  cin>>h>>n;
  ll arr[n];
  for(i=0; i<n; i++){
    cin>>arr[i];
    sum += arr[i];
  }
  cout<<(sum>=h)?"Yes\n":"No\n";
  
  return 0;
}

Compiler output:
a.cc:3:1: error: 'usgin' does not name a type
    3 | usgin namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>h>>n;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout<<(sum>=h)?"Yes\n":"No\n";
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a,;
  cin>>a>>b;
  int c[b];
  for(int i=0;i<b;i++){
    cin>>c[i];
    a-=c[i];
  }
  if(a<=0) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: expected unqualified-id before ';' token
    4 |   int a,;
      |         ^
a.cc:5:11: error: 'b' was not declared in this scope
    5 |   cin>>a>>b;
      |           ^
a.cc:8:10: error: 'c' was not declared in this scope
    8 |     cin>>c[i];
      |          ^
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: expected unqualified-id before ';' token
    4 |   int a,;
      |         ^
a.cc:5:11: error: 'b' was not declared in this scope
    5 |   cin>>a>>b;
      |           ^
a.cc:7:17: error: 'n' was not declared in this scope
    7 |   for(int i=0;i<n;i++){
      |                 ^
a.cc:8:10: error: 'c' was not declared in this scope
    8 |     cin>>c[i];
      |          ^
Language: C++

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

long long a,b,n;
string ss;
int main(){
    /*
    cin>>n;
    while(n--){
        cin>>a;
        if (a==2){
            cout<<1<<endl;
        }
        else{
            if (a%2==0){
                for (int i=0; i<a/2; i++){
                    cout<<1;
                }
                cout<<endl;
            }
            else{
                cout<<7;
                for (int i=0; i<(a-3)/2; i++){
                    cout<<1;
                }
                cout<<endl;
            }
        }
    }
    */
    int n,m;
    cin >> n>> m;
    vector<int>vc(m);
    int ans=0;
    for(int i =0;i < m;i++){
        cin >> vc[i];
        ans+=vc[i];
    }
    if (ans >= n){
        cout << "YES";
    }else{
        cout << "NO";
    }

}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | N#include<bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'N' does not name a type
    1 | N#include<bits/stdc++.h>
      | ^
a.cc:6:1: error: 'string' does not name a type
    6 | string ss;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:33:5: error: 'cin' was not declared in this scope
   33 |     cin >> n>> m;
      |     ^~~
a.cc:34:5: error: 'vector' was not declared in this scope
   34 |     vector<int>vc(m);
      |     ^~~~~~
a.cc:34:12: error: expected primary-expression before 'int'
   34 |     vector<int>vc(m);
      |            ^~~
a.cc:37:16: error: 'vc' was not declared in this scope
   37 |         cin >> vc[i];
      |                ^~
a.cc:41:9: error: 'cout' was not declared in this scope
   41 |         cout << "YES";
      |         ^~~~
a.cc:43:9: error: 'cout' was not declared in this scope
   43 |         cout << "NO";
      |         ^~~~
Language: C++

#include<iostream>
 
using namespace std;
 
int main(){
  int H,N;
  cin >> H >> N;
  int sum=0;
  for(int i=0;i<N;i++){
    int tmp;
    cin >> tmp;
    sum += tmp;
  }
  
  if(H<=tmp) cout << "Yes" << endl;
  else cout << "No" << endl;
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   15 |   if(H<=tmp) cout << "Yes" << endl;
      |         ^~~
      |         tm
Language: C++

#include<iostream>

using namespace std;

int main(){
  cin >> H >> N;
  int sum=0;
  for(int i=0;i<N;i++){
    int tmp;
    cin >> tmp;
    sum += tmp;
  }
  
  if(H<=tmp) cout << "Yes" << endl;
  else cout << "No" << endl;
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'H' was not declared in this scope
    6 |   cin >> H >> N;
      |          ^
a.cc:6:15: error: 'N' was not declared in this scope
    6 |   cin >> H >> N;
      |               ^
a.cc:14:9: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   14 |   if(H<=tmp) cout << "Yes" << endl;
      |         ^~~
      |         tm
Language: C++

int main(){
	int H,N;
	scanf("%d%d",&H,&N);
 	for(int i=0;i<N;i++){
 	int A;
 	scanf("%d",&A);
 	H-=A;
 	}
 	if(H<=0)puts("Yes");
 	else puts("No");
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 |         scanf("%d%d",&H,&N);
      |         ^~~~~
a.cc:9:17: error: 'puts' was not declared in this scope
    9 |         if(H<=0)puts("Yes");
      |                 ^~~~
a.cc:10:14: error: 'puts' was not declared in this scope
   10 |         else puts("No");
      |              ^~~~
Language: C++

int main(){
 	int H,N;
 	scanf("%d%d",&H,&N);
 	for(int i=0;i<N;i++){
 	int A;
 	scanf("%d",&A);
 	H-=A;
 	}
 	if(H<=0)puts("Yes");
 	else puts("No");
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 |         scanf("%d%d",&H,&N);
      |         ^~~~~
a.cc:9:17: error: 'puts' was not declared in this scope
    9 |         if(H<=0)puts("Yes");
      |                 ^~~~
a.cc:10:14: error: 'puts' was not declared in this scope
   10 |         else puts("No");
      |              ^~~~
Language: Java

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

Compiler output:
Main.java:6: error: cannot find symbol
      h = s.nextInt();
      ^
  symbol:   variable h
  location: class Main
Main.java:7: error: cannot find symbol
      n = s.nextInt();
      ^
  symbol:   variable n
  location: class Main
Main.java:8: error: cannot find symbol
      int a[] = new int[n];
                        ^
  symbol:   variable n
  location: class Main
Main.java:10: error: cannot find symbol
      for(int i = 0; i < n; i++)
                         ^
  symbol:   variable n
  location: class Main
Main.java:15: error: cannot find symbol
      if(sum>h){
             ^
  symbol:   variable h
  location: class Main
5 errors
Language: Java

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

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

#include <iostream>
using namespace std;

int main(){
  long long int H;int N;
  int sum=0;
  for (int i=0;i<N;i++) {
    cin>>k;sum+=k;
  }
  
  if (H-sum<=0) cout<<"Yes";else cout<<"No";
  
  return 0;
  
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'k' was not declared in this scope
    8 |     cin>>k;sum+=k;
      |          ^
Language: C++

include <iostream>
using namespace std;
int main () {
    long  a[100000],n,h,b = 0;
    cin >> h >> n;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        b += a[i];
    }
   if ( h <= b) {
       cout << "Yes";
   }
   else if (h > b) {
       cout << "No";
   }
    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> h >> n;
      |     ^~~
a.cc:11:8: error: 'cout' was not declared in this scope
   11 |        cout << "Yes";
      |        ^~~~
a.cc:14:8: error: 'cout' was not declared in this scope
   14 |        cout << "No";
      |        ^~~~
Language: C++

#include<stdio.h>
int main(void){
  int h;
  int n;
  int a[n];
  scanf("%d%d",&h,&n);
  for(int i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<n;i++){
    if(a[i]>=h){
      printf("Yes");
      break;
    }
  }
  if(i=n)
    printf("No");
}

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

#include<iostream>
using namespace std;
int main () {
  int H, N;
  cin >> H >> N;
  int a = 0;
  for (int i = 0; i < N; i ++) {
    int k;
    cin >> k;
    a += k;
    cout << (a >= H ? "Yes" : "No") << endl;
  }

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

#include <iostream>

using namespace std;

int main(){
    int h,a;

    cin >> h >> a;
    int hits = h / a;
    if(h % a!=0){
        hits++;
    }
    cout << hits << endl;
    return 0; 6
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected ';' before '}' token
   14 |     return 0; 6
      |                ^
      |                ;
   15 | }
      | ~
Language: C++

#include<iostream>
#define rep(i,n) for(ll i=0;i<(int) (n);i++)
using namespace std;
int main() {
	int h, n,cnt=0;
	cin >> h >> n;
	rep(i, n) {
		int a;
		cin >> a;
		cnt += a;
	}

	if (cnt >= h)cout << "Yes";
	else cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:22: error: 'll' was not declared in this scope
    2 | #define rep(i,n) for(ll i=0;i<(int) (n);i++)
      |                      ^~
a.cc:7:9: note: in expansion of macro 'rep'
    7 |         rep(i, n) {
      |         ^~~
a.cc:7:13: error: 'i' was not declared in this scope
    7 |         rep(i, n) {
      |             ^
a.cc:2:29: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(ll i=0;i<(int) (n);i++)
      |                             ^
Language: C

import java.util.Scanner;
import java.util.ArrayList;

public class Common{
    Scanner scan = new Scanner(System.in);

    int H;
    int N;
    ArrayList<Integer> A = new ArrayList<>();

    Common(){
        H = scan.nextInt();
        N = scan.nextInt();
        for(int i = 0; i < N; i++){
            A.add(scan.nextInt());
        }

        judge(H, A);

        /*
        for(int i = 0; i < N; i++){
            System.out.println(A.get(i));
        }*/
    }

    public void judge(int H, ArrayList<Integer> A){
        for(int i = 0; i < A.size(); i++){
            H -= A.get(i);
        }
        if(H <= 0){System.out.println("Yes");}
        else{System.out.println("No");}
    }

    public static void main(String[] args){
        new Common();
    }
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.Scanner;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Scanner;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.util.ArrayList;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.util.ArrayList;
      |            ^
main.c:4:1: error: unknown type name 'public'
    4 | public class Common{
      | ^~~~~~
main.c:4:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Common'
    4 | public class Common{
      |              ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int h, n;
  cin>>h>>n;
  int sum;
  for (int i=0; i<n; i++){
  	int a;
    cin>>a;
    sum+=a;
  }
  if (sum>=a){
  	cout<<"Yes";
  }
  else {cout<<"No";}
}

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

#include <iostream>
#include <vector>

using namespace std;

int main(){
  	int H,N;
    int input,sum=0;  
    vector<int> A;
  	cin >> H >> N;
  	for(int i=0;i<N;i++){
      cin >> input;
      A.push_back(input);
    }
  	for(int i=0;i<A.size();i++)
      sum+=A[i];
	}
	if(sum>=H)
      cout << "Yes" << endl;
	else
      cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc:18:9: error: expected unqualified-id before 'if'
   18 |         if(sum>=H)
      |         ^~
a.cc:20:9: error: expected unqualified-id before 'else'
   20 |         else
      |         ^~~~
a.cc:22:9: error: expected unqualified-id before 'return'
   22 |         return 0;
      |         ^~~~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

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

signed main(){
  int h,n;cin>>h>>n;
  while(n--){
    int a;cin>>a;
    h-=a;
  }
  cpit<<(h>0?"No":"Yes")<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'cpit' was not declared in this scope
   10 |   cpit<<(h>0?"No":"Yes")<<endl;
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	long long h, a=0;
  	int n;
  	cin >> h >> n;
  	while (n--) {
     	long long x; cin >> x;
      	a += x;
    }
  	cout << (a > x ? "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: 'x' was not declared in this scope
   11 |         cout << (a > x ? "Yes" : "No") << endl;
      |                      ^
Language: C++

#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define ll          long long
#define pb          push_back
#define eb 			emplace_back
#define mp 			make_pair
#define pii         pair<ll,ll>
#define vi          vector<ll>
#define vii         vector<pii>
#define mi          map<ll,ll>
#define mii         map<pii,ll>
#define all(a)      (a).begin(),(a).end()
#define fi          first
#define si          second
#define sz(x)       (ll)x.size()
#define endl        '\n'
#define checkbit(n, b) ((n >> b) & 1)
#define mod        1000000007
#define inf        1000000000000000000
#define puts(n)		cout<<n;
#define rep(i,a,b)  for(ll i=a;i<b;i++)
#define setbits(x) __builtin_popcount(x)
#define mset(m,v) memset(m,v,sizeof(m))
using namespace std;
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	ll h,n;
	cin>>h>>n;
	ll a[n],sum=0;
	for(ll i=0;i<n;i++){
		cin>>a[i];
		sum+=a[i];
	}
	if(h>sum) cout<<"NO";
	else cou<<"YES";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:14: error: 'cou' was not declared in this scope; did you mean 'cos'?
   38 |         else cou<<"YES";
      |              ^~~
      |              cos
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main()
{
  int h,n;
  cin>>h>>n;
  int sum=0;
  while(n--)
  {
    int a;
    cin>>a;
    sum+=a;
  }
  if(h>a)
  {
    cout<<"NO\n";
  }
  else
  {
    cout<<"YES\n";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: 'a' was not declared in this scope
   16 |   if(h>a)
      |        ^
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
#define pii pair<int,int>
#define pb push_back
#define ll long long
#define MOD 1000000007
 
ll fact[1000] = {0};
ll factorial(int n){
    if (n >= 0) {
        fact[0] = 1;
        for (int i=1;i<=n;++i) result[i] = i * result[i - 1];
        return result[n];
    } else return -1;
}
 
ll mpow(ll a, ll n) {
    ll ret=1;
    ll b=a;
    while(n) {
        if(n&1) 
            ret=(ret*b)%MOD;
        b=(b*b)%MOD;
        n>>=1;
    }
    return (ll)ret;
}
 
int toint(const string &s) { 
    stringstream ss(s);
    int x; 
    ss >> x; 
    return x; 
}
 
int main() {
  ll h,n;
  cin>>h>>n;
  
  ll sum = 0;
  
  for(int i=0;i<n;i++) {
    ll temp;
    cin>>temp;
    sum+=temp;
    
    if(sum >= h) {
      cout<<"Yes";
      break;
    }
  }
  
  if(sum < h) cout<<"No";
  
  return 0;
}

Compiler output:
a.cc: In function 'long long int factorial(int)':
a.cc:14:32: error: 'result' was not declared in this scope
   14 |         for (int i=1;i<=n;++i) result[i] = i * result[i - 1];
      |                                ^~~~~~
a.cc:15:16: error: 'result' was not declared in this scope
   15 |         return result[n];
      |                ^~~~~~
Language: C

#include <stdio.h>
int main(){
    int H,N,A[10001];
    scanf("%d %d",&H,&A);
    int i,sum;
    
    for(i=0;i<N;i++){
        scanf("%d",&A[i]);
    }
    sum = 0;
    for(i = 0;i<N ;i++){
        sum = sum + A[i];
    }
    if(sum>=H){
        printf("Yes\n");
    }else{
        prntf("No\n");
    }
    return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
 int n,m;
  cin>>n>>m;
  int k,sum=0;
  for(int i=0;i<m;i++)
  {
    cin>>k;
    sum=sum+k
    
  }
  if(sum>=n)
  {
    cout<<"Yes";
  }
  else
  {
    cout<<"No";
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: expected ';' before '}' token
   11 |     sum=sum+k
      |              ^
      |              ;
   12 | 
   13 |   }
      |   ~
Language: C

#include<stdio.h>
int main(){
  int h,n,loop;
  scanf("%d",&h);
  scanf("%d",&n);
  for(loop=0;loop<n;loop++){
    scanf("%d",&a);
    h-=a;
  }
  if(h<0)
    printf("Yes");
  else
    printf("No");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: 'a' undeclared (first use in this function)
    7 |     scanf("%d",&a);
      |                 ^
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
  int h,n,loop;
  scanf("%d",&h);
  scanf("%d",&n);
  for(loop=0;loop<n;loop++){
    scanf("%d",a);
    h-=a;
  }
  if(h<0)
    printf("Yes");
  else
    printf("No");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:16: error: 'a' undeclared (first use in this function)
    7 |     scanf("%d",a);
      |                ^
main.c:7:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
using namespace std;
int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int h,a,n,s=0;
  cin>>h>>a;
  for(i=0;i<n;i++)
  {
    cin>>a;
    s+=a;
  }
  if(s>=h)
    cout<<"yes";
  else
    cout<<"no";


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i=0;i<n;i++)
      |       ^
a.cc:18:16: error: expected '}' at end of input
   18 |     cout<<"no";
      |                ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <iostream>
using namespace std;
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);

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


Compiler output:
a.cc:3:26: error: expected constructor, destructor, or type conversion before '(' token
    3 | ios_base::sync_with_stdio(false);
      |                          ^
a.cc:4:1: error: 'cin' does not name a type
    4 | cin.tie(0);
      | ^~~
a.cc:5:1: error: 'cout' does not name a type
    5 | cout.tie(0);
      | ^~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
  	ios_base::sync_with_stdio(false);
  	cin.tie(0);
  	cout.tie(0);
  	int h,n;  
  	cin>>h>>n
    int sum;
  	int a;
  	for(int i=1;i<=n;i++){
      sum+=cin>>a
    }
	if(sum>=h) cout<<"Yes";
	else cout<< "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before 'int'
   11 |         cin>>h>>n
      |                  ^
      |                  ;
   12 |     int sum;
      |     ~~~           
a.cc:15:7: error: 'sum' was not declared in this scope
   15 |       sum+=cin>>a
      |       ^~~
a.cc:17:12: error: 'sum' was not declared in this scope
   17 |         if(sum>=h) cout<<"Yes";
      |            ^~~
Language: C++

include<iostream>
using namespace std;
int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int h,a,n,s=0;
  cin>>h>>a;
  for(i=0;i<n;i++)
  {
    cin>>a;
    s+=a;
  }
  if(s>=h)
    cout<<"yes";
  else
    cout<<"no";

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'ios_base' has not been declared
    5 |   ios_base::sync_with_stdio(false);
      |   ^~~~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin.tie(0);
      |   ^~~
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout.tie(0);
      |   ^~~~
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i=0;i<n;i++)
      |       ^
a.cc:18:16: error: expected '}' at end of input
   18 |     cout<<"no";
      |                ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <iostream>
using namespace std;

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

	ll H, N, A, sum = 0;
	std::cin >> H >> N;

	for (ll i = 0; i < N; ++i)
	{
		std::cin >> A;
		sum += A;
	}
	if (sum >= H)
		std::cout << "Yes" << std::endl;
	else
		std::cout << "No" << std::endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'll' was not declared in this scope
   10 |         ll H, N, A, sum = 0;
      |         ^~
a.cc:11:21: error: 'H' was not declared in this scope
   11 |         std::cin >> H >> N;
      |                     ^
a.cc:11:26: error: 'N' was not declared in this scope
   11 |         std::cin >> H >> N;
      |                          ^
a.cc:13:16: error: expected ';' before 'i'
   13 |         for (ll i = 0; i < N; ++i)
      |                ^~
      |                ;
a.cc:13:24: error: 'i' was not declared in this scope
   13 |         for (ll i = 0; i < N; ++i)
      |                        ^
a.cc:15:29: error: 'A' was not declared in this scope
   15 |                 std::cin >> A;
      |                             ^
a.cc:16:17: error: 'sum' was not declared in this scope
   16 |                 sum += A;
      |                 ^~~
a.cc:18:13: error: 'sum' was not declared in this scope
   18 |         if (sum >= H)
      |             ^~~
Language: C++

#include <iostream>
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

	ll H, N, A, sum = 0;
	std::cin >> H >> N;

	for (ll i = 0; i < N; ++i)
	{
		std::cin >> A;
		sum += A;
	}
	if (sum >= H)
		std::cout << "Yes" << std::endl;
	else
		std::cout << "No" << std::endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'ios_base' has not been declared
    4 |         ios_base::sync_with_stdio(false);
      |         ^~~~~~~~
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin.tie(0);
      |         ^~~
      |         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:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         cout.tie(0);
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:9: error: 'll' was not declared in this scope
    8 |         ll H, N, A, sum = 0;
      |         ^~
a.cc:9:21: error: 'H' was not declared in this scope
    9 |         std::cin >> H >> N;
      |                     ^
a.cc:9:26: error: 'N' was not declared in this scope
    9 |         std::cin >> H >> N;
      |                          ^
a.cc:11:16: error: expected ';' before 'i'
   11 |         for (ll i = 0; i < N; ++i)
      |                ^~
      |                ;
a.cc:11:24: error: 'i' was not declared in this scope
   11 |         for (ll i = 0; i < N; ++i)
      |                        ^
a.cc:13:29: error: 'A' was not declared in this scope
   13 |                 std::cin >> A;
      |                             ^
a.cc:14:17: error: 'sum' was not declared in this scope
   14 |                 sum += A;
      |                 ^~~
a.cc:16:13: error: 'sum' was not declared in this scope
   16 |         if (sum >= H)
      |             ^~~
Language: C++

#include <iostream>
using namespace std;

void main(){
  int h, n, sum, i;
  int a[n];
  cin >> h >> n;
  sum = 0;
  for (i=0; i<n; i++)
  {
    cin >> a[i];
  }
  
  for (i=0; i<n; i++)
  {
    sum+=a[i];
  }
  
  if (sum>=h)
    cout << "Yes";
  else
    cout << "No";
  
}


Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(){
      | ^~~~
Language: C++

#include <iostream.h>

using namespace std;
int main()
{
	std::ios_base::sync_with_stdio(false);
	std::cin.tie(0);
	std::cout.tie(0);

	ll H, N, A, sum = 0;
	std::cin >> H >> N;

	for (ll i = 0; i < N; ++i)
	{
		std::cin >> A;
		sum += A;
	}
	if (sum >= H)
		std::cout << "Yes" << std::endl;
	else
		std::cout << "No" << std::endl;

	return 0;
}


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

#include <iostream.h>

void main(){
  int h, n, sum, i;
  int a[n];
  cin >> h >> n;
  sum = 0;
  for (i=0; i<n; i++)
  {
    cin >> a[i];
  }
  
  for (i=0; i<n; i++)
  {
    sum+=a[i];
  }
  
  if (sum>=h)
    cout << "Yes";
  else
    cout << "No";
  
}


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

#include <stdio.h>

void main(){
  int h, n, sum, i;
  int a[n];
  cin >> h >> n;
  sum = 0;
  for (i=0; i<n; i++)
  {
    cin >> a[i];
  }
  
  for (i=0; i<n; i++)
  {
    sum+=a[i];
  }
  
  if (sum>=h)
    cout << "Yes";
  else
    cout << "No";
  
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> h >> n;
      |   ^~~
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout << "Yes";
      |     ^~~~
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout << "No";
      |     ^~~~
Language: C++

#include <iostream>
 
using namespace std;
 
int main(void)
{
  int h, n;
  cin >> h >> n;
  for(int i = 0; i < n && h > 0; ++i)
  {
    int a;
    cin >> a;
    h-=a;
  }
  
  cout << (h>0)?"No":"Yes" << endl;
  
 return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:28: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
   16 |   cout << (h>0)?"No":"Yes" << endl;
      |                      ~~~~~~^~~~~~~
Language: C++

#include <iostream>
 
using namespace std;
 
int main(void)
{
  int h, n;
  cin >> h >> n;
  for(int i = 0; i < n && h > 0; ++i)
  {
    int a;
    cin >> a;
    h-=a;
  }
  
  cout << (h>0)?"No":"Yes"; << endl;
  
 return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:29: error: expected primary-expression before '<<' token
   16 |   cout << (h>0)?"No":"Yes"; << endl;
      |                             ^~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   15 |   return ;
      |   ^~~~~~
Language: C++

#include <iostream>

using namespace std;

int main(void)
{
  int h, n;
  cin >> h >> n;
  for(int i = 0; i < n && h > 0; ++i)
  {
    int a;
    cin >> a;
    h-=a;
  }
  
  cout << (h>0)?"No":"Yes"<<endl;
  
 return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:27: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
   16 |   cout << (h>0)?"No":"Yes"<<endl;
      |                      ~~~~~^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int h, n; cin>>h>>n;
  int a[n]; 
  for(int i = 0; i < n; i++) cin>>a[i];
  sort(a, a + n);
  for(int i = n - 1; i >= 0; i--)
  {
    h -= a[i];
    if(h <= 0)
    {
      cout<<"yes";
      return 0;
    }
  }
  cout<<"no";
  return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
  int h,n,a[],l,i,cnt=0;
  cin>>h>>n;
  for(i=0;i<n;i++)
  {
    cin>>a[i];
  }
  l=h;
  for(i=0;i<n;i++)
  {
    l=l-a[i];
    cnt++;
  }
  if(l==1)
    cout<<"Yes";
  else
    cout<<"No";
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: storage size of 'a' isn't known
    5 |   int h,n,a[],l,i,cnt=0;
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int h,n,arr[],l,i,cnt=0;
  cin>>h>>n;
  for(i=0;i<n;i++)
  {
    cin>>arr[i];
  }
  l=h;
  for(i=0;i<n;i++)
  {
    l=l-a[i];
    cnt++;
  }
  if(l==1)
    cout<<"Yes";
  else
    cout<<"No";
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: storage size of 'arr' isn't known
    5 |   int h,n,arr[],l,i,cnt=0;
      |           ^~~
a.cc:14:9: error: 'a' was not declared in this scope
   14 |     l=l-a[i];
      |         ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int h,n,arr,l,,i,cnt=0;
  cin>>h>>n;
  for(i=0;i<n;i++)
  {
    cin>>arr[i];
  }
  l=h;
  for(i=0;i<n;i++)
  {
    l=l-a[i];
    cnt++;
  }
  if(l==1)
    cout<<"Yes";
  else
    cout<<"No";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: expected unqualified-id before ',' token
    5 |   int h,n,arr,l,,i,cnt=0;
      |                 ^
a.cc:9:13: error: invalid types 'int[int]' for array subscript
    9 |     cin>>arr[i];
      |             ^
a.cc:14:9: error: 'a' was not declared in this scope
   14 |     l=l-a[i];
      |         ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int h,n,arr,l,,i,cnt=0;
  cin>>h>>n;
  for(i=0;i<n;i++)
  {
    cin>>arr[i];
  }
  l=h;
  for(i=0;i<n;i++)
  {
    l=l-a[i];
    cnt++;
  }
  if(l==1)
    cout<<"Yes";
  else
    cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: expected unqualified-id before ',' token
    5 |   int h,n,arr,l,,i,cnt=0;
      |                 ^
a.cc:9:13: error: invalid types 'int[int]' for array subscript
    9 |     cin>>arr[i];
      |             ^
a.cc:14:9: error: 'a' was not declared in this scope
   14 |     l=l-a[i];
      |         ^
Language: C++

#include<iostream>
using namespace std;
void main()
{
  int h,n,arr,l,cnt=0;
  cin>>h>>n;
  for(i=0;i<n;i++)
  {
    cin>>arr[i];
  }
  l=h;
  for(i=0;i<n;i++)
  {
    l=l-a[i];
    cnt++;
  }
  if(l==1)
    cout<<"Yes";
  else
    cout<<"No";
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0;i<n;i++)
      |       ^
a.cc:12:7: error: 'i' was not declared in this scope
   12 |   for(i=0;i<n;i++)
      |       ^
a.cc:14:9: error: 'a' was not declared in this scope
   14 |     l=l-a[i];
      |         ^
Language: C++

#include <iostream>
using namespace std;
 
int main() {
  int H, N;
  cin >> H >> N;
  int all = 0;
  for (int i = 0; i < N;i++) {
    int A;
    cin >> A;
    all += A;
  }
  if (H <= all) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}
#include <iostream>
using namespace std;
 
int main() {
  int H, N;
  cin >> H >> N;
  int all = 0;
  for (int i = 0; i < N;i++) {
    int A;
    cin >> A;
    all += A;
  }
  if (H <= all) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}


Compiler output:
a.cc:22:5: error: redefinition of 'int main()'
   22 | int main() {
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main() {
      |     ^~~~
Language: C

#include <iostream>

using namespace std;

int main(){
    int h=0,n;
    int A;
    cin>>h>>n;
    for(int i=0;i<n;i++){
        cin>>A;
        h-=A;
    }
    
    if(h<=0)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    
    return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  double h,n,a;
  cin>>h>>n;
  a=0;
  for(int i=0;i<n;i++){
    cin >> a;
    h-=a;
  }
  puts(h<=0? "Yes":"No")
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: expected ';' before '}' token
   11 |   puts(h<=0? "Yes":"No")
      |                         ^
      |                         ;
   12 | }
      | ~
Language: Java

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] line1 = sc.nextLine();
        String[] line2 = sc.nextLine();
        long H = Long.parseLong(line1[0]);
        long N = Long.parseLong(line1[1]);
        sc.close();

        long sum = 0;
        for (String string : line2) {
            sum += Long.parseLong(string);
        }

        String res = "No";

        if (sum >= H) {
            res = "Yes";
        }

        System.out.println(res);
    }

}

Compiler output:
Main.java:7: error: incompatible types: String cannot be converted to String[]
        String[] line1 = sc.nextLine();
                                    ^
Main.java:8: error: incompatible types: String cannot be converted to String[]
        String[] line2 = sc.nextLine();
                                    ^
2 errors
Language: C++

#include <iostream>
using namespace std;
long long int h,n,a,b,c,m[10000],sum;
int main(){
    cin>>h>>n;
    for (int i=0;i<n;i++){
        cin>>m[i];
    }
    for (int i=0;i<n;i++){
        if (m[i]<h){
            sum+=m[i];
        }
      	else if(m[i]>h){
        	cout<<"Yes";
          	return 0;
        }
        if (sum>=h){
        	cout<<"Yes";
        	return 0;
    	}
        
    }
    
    else{
        cout<<"No";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:5: error: 'else' without a previous 'if'
   24 |     else{
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int H,N,a[10000];
  for(i=1;i<=N;i++)
  {
    cin>>a[i];
  }
  int sum=0;
  for(i=1;i<=N;i++)
  {
    sum=sum+a[i];
  }
  if(sum<H)
    cout<<"NO";
  else
    cout<<"YES";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   for(i=1;i<=N;i++)
      |       ^
a.cc:11:7: error: 'i' was not declared in this scope
   11 |   for(i=1;i<=N;i++)
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rep2(r, aa, bb) for (int r = (aa)-1; r >= (bb); r--)
#define be(x) (x.begin(), x.end())
#define pb(t) push_back(t)
#define ll long long
#define mp(a, b) make_pair(a, b)
int main(){
	int h, n, s=0;
	cin>>h>>n;
	vector<int>A(n);
	rep(i,0,n){
		cin>>A[i]
		s+=A[i];
	}
	if(s>=h)cout<<"Yes\n";
	else cout<<"No\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:26: error: expected ';' before 's'
   14 |                 cin>>A[i]
      |                          ^
      |                          ;
   15 |                 s+=A[i];
      |                 ~
Language: C++

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

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

}

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

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

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'cont' was not declared in this scope; did you mean 'const'?
   13 |     else cont<<"No"<<endl
      |          ^~~~
      |          const
Language: C

#include<stdio.h>
int main(
  int a,b,c,d=0;
  scanf("%d%d",&a,&b);
  while(b--){
    scanf("%d",&c);
    d+=c;
  }
  puts(a>d?"No":"Yes");}

Compiler output:
main.c:3:9: error: unknown type name 'b'
    3 |   int a,b,c,d=0;
      |         ^
main.c:3:11: error: unknown type name 'c'
    3 |   int a,b,c,d=0;
      |           ^
main.c:3:13: error: unknown type name 'd'
    3 |   int a,b,c,d=0;
      |             ^
main.c:4:3: error: expected declaration specifiers or '...' before 'scanf'
    4 |   scanf("%d%d",&a,&b);
      |   ^~~~~
main.c:5:3: error: expected declaration specifiers or '...' before 'while'
    5 |   while(b--){
      |   ^~~~~
main.c:9:24: error: expected declaration specifiers or '...' before '}' token
    9 |   puts(a>d?"No":"Yes");}
      |                        ^
main.c:9:24: error: expected ';', ',' or ')' before '}' token
Language: C++

#include <iostream>
#include <cstdlin>
#include <cstring>
using namespace std;

int main()
{
  int H, N;
  int A[N];
  bool TF;
  char *ans;

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

  int i = 0;
  while (i < N) {
    H = H - A[i];
    i++;
    if (H < 0) { TF = true; break; }
    else { TF = false; break;}
  }

  if (TF == true) {
    ans = (char *)malloc(3);
    strcpy(ans, "Yes");
  }
  else {
    ans = (char *)malloc(2);
    strcpy(ans, "No");
  }

  cout << ans << endl;

  return 0;
}


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

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

inline int read() {
	int x;
	scanf("%d", &x);
	return x;
}

const int S = 1e5 + 10;
int n, m, a[S]; 

int main() {
	n = read(); m = read();
	for (int i = 1; i <= m; i++)
		tot += read();
	if (tot >= n) puts("Yes");
	else puts("No");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'tot' was not declared in this scope
   16 |                 tot += read();
      |                 ^~~
a.cc:17:13: error: 'tot' was not declared in this scope
   17 |         if (tot >= n) puts("Yes");
      |             ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int Max=0x3f3f3f3f;
int main()
{
    int p,n;
    while(~scanf("%d%d",&p,&n))
    {
        int x;
        bool f=0;
        for(int i=1;i<=n;i++)
        {
            scanf("%d",&a[i]);
        }
        sort(a+1,a+1+n);
        int sum=0;
        for(int i=1;i<=n;i++)
        {
            scanf("%d",&a[i]);
            sum+=a[i];
        }
        if(sum>=p)printf("Yes\n");
        else printf("No\n");
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: 'a' was not declared in this scope
   14 |             scanf("%d",&a[i]);
      |                         ^
a.cc:16:14: error: 'a' was not declared in this scope
   16 |         sort(a+1,a+1+n);
      |              ^
Language: Java

import java.util.*;
public class jan2602{
	public static void main(String[] args) {
		try{
			Scanner sc=new Scanner(System.in);
			int h,n,c=0;
			h=sc.nextInt();
			n=sc.nextInt();
			int a[]=new int[n];
			for(int i=0;i<n;i++)
				a[i]=sc.nextInt();
			if(h<=0 || h>=10001)
			{
			 	System.out.println("EXit.....");
			 	System.exit(0);
			}

			for(int j=0;j<n;j++){
				if(a[j]<=0 || a[j]>=10001){
					System.out.println("EXit.....");
					System.exit(0);}
			}

			for(int i=0;i<n;i++)
				c+=a[i];

					if(c<=0)
					{
						System.out.println(c);
						System.exit(0);
					}
					else{
						h=h-c;
						if(h<=0)
							System.out.println("YES");
						else
							System.out.println("NO");
					}
		}
		catch(Exception e)
		{
			System.out.println("Error");
			System.exit(0);
		}
	}
}

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

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

int main(void)
{
    int H:
    cin >> H;

    int N;
    cin >> N;

    vector<int> A(N);
    for (int i = 0; i < N; i++)
        cin >> A[i];

    int sum = 0;
    for (int i = 0; i < N; i++)
        sum += A[i];

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

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: found ':' in nested-name-specifier, expected '::'
    9 |     int H:
      |          ^
      |          ::
a.cc:9:9: error: 'H' has not been declared
    9 |     int H:
      |         ^
a.cc:10:9: error: qualified-id in declaration before '>>' token
   10 |     cin >> H;
      |         ^~
a.cc:23:15: error: 'H' was not declared in this scope
   23 |     if (sum < H)
      |               ^
Language: C

#include<stdio.h>
int main(){
	long long int a[100000],n,i,m,sum=0;
	scanf("%lld %lld",&m,&n);
	for(i=0;i<n;i++){
		scanf("%lld",&a[i]);
		sum=sum+a[i];
	}
	if(sum>=m){
		printf("Yes");
	else
		printf("No");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:9: error: expected '}' before 'else'
   11 |         else
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int h, n;
  vector<int> vec(n);

   for (int i = 0; i < n; i++) {
    cin >> vec.at(i);
    if (h< sum(vec.at(i))) {
      cout << "Yes" << endl;
  }
  else cout << "No" << endl;
   }
  }
  


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'sum' was not declared in this scope
   10 |     if (h< sum(vec.at(i))) {
      |            ^~~
Language: C

#include<stdio.h>
int main()
{
  long H;
  int N;
  scanf("%ld%d",&H,&N);
  int A[N],i;
  long tot=0;
  for(i=0;i<N;i++)
  {
    scanf("%d",&A[i]);
    tot=tot+long(A[i]);
  }
  if(tot>=H)
    printf("Yes");
  else
    printf("No");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:13: error: expected expression before 'long'
   12 |     tot=tot+long(A[i]);
      |             ^~~~