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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: invalid operands of types 'int' and 'int*' to binary 'operator-'
    8 |        a-=c;
      |        ~^~~
a.cc:8:9: note:   in evaluation of 'operator-=(int, int*)'
Language: C

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

int main()
{
    int i,H,N;
    int sum=0;
    int *pntr;
    scanf("%d %d",&H, &N);
    pntr = (int*)malloc(N*sizeof(int));
    for(i=0; i<N ;i++)
    {
        scanf("%d",&pntr[i]);
        sum += pntr[i];
    }
    if(sum >= H)
    {
        printf("yes");    
    }
    else
    {
        printf("No);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:16: warning: missing terminating " character
   22 |         printf("No);
      |                ^
main.c:22:16: error: missing terminating " character
   22 |         printf("No);
      |                ^~~~~
main.c:23:5: error: expected expression before '}' token
   23 |     }
      |     ^
main.c:22:16: error: expected ';' before '}' token
   22 |         printf("No);
      |                ^
      |                ;
   23 |     }
      |     ~
Language: C++

int main() {
    int Ai[100];
  int H,N,sum;
  cin>>H>>N;
  sum=0;
  int g= H-1;
  int flag;
  if (H>=1 && H<=1000000000 &&N>=1&&N<=100000 ){
  for(int i=0; i<N;i++){
     cin>>Ai[i];
     if (Ai[i]>=1 && Ai[i]<=10000){
        continue;
     }
  }
  for (int i=0; i<N;i++){
      sum=sum+Ai[i];
      if (sum>=H or  sum>H+1){
         flag=0;
      }
      else{
        flag=1;
      }
  }

  if (flag==0){
    cout<<("Yes");
  }
  else if (flag==1){
    cout<<("No");
  }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>H>>N;
      |   ^~~
a.cc:26:5: error: 'cout' was not declared in this scope
   26 |     cout<<("Yes");
      |     ^~~~
a.cc:29:5: error: 'cout' was not declared in this scope
   29 |     cout<<("No");
      |     ^~~~
Language: C++

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

int main() {
 int h;
  int n;
  cin>>h>>n;
  
  
  
  vector<int> vec(n);
     
  for (int i = 0; i < n; i++) {
    cin >> vec.at(i);
     int d;
    d+vec.at(i)=d;
  cout<<d<<endl;
  }
}
 


Compiler output:
a.cc: In function 'int main()':
a.cc:16:6: error: lvalue required as left operand of assignment
   16 |     d+vec.at(i)=d;
      |     ~^~~~~~~~~~
Language: C

import java.util.Scanner;

class Main{
    public static void main(String[] args) {
        int H,N,A=0;
        Scanner sc=new Scanner(System.in);
        H=sc.nextInt();
        N=sc.nextInt();
        for(int i=0;i<N;i++){
            A+=sc.nextInt();
        }
        if(H<=A)
        System.out.print("Yes");
        else
        System.out.print("No");
        sc.close();
    }
}

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:3:1: error: unknown type name 'class'
    3 | class Main{
      | ^~~~~
main.c:3:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | class Main{
      |           ^
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main(void){
	int h,a;
  	cin >> h >> a;
  	int x[a];
  	for(int i=0;i<a;i++){
    	cin >> x[i];
    }
  	sort(x.begin(),x.end(),[](int a, int b) {
        return a > b;   
    });
  	for(int i=0;i<a;i++){
    	h-=x[i];
      	if(h<0){
        	break;
        }
    }
  	if(h<0){cout << "Yes" << endl;}
  	else{cout << "No" << endl;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: request for member 'begin' in 'x', which is of non-class type 'int [a]'
   13 |         sort(x.begin(),x.end(),[](int a, int b) {
      |                ^~~~~
a.cc:13:26: error: request for member 'end' in 'x', which is of non-class type 'int [a]'
   13 |         sort(x.begin(),x.end(),[](int a, int b) {
      |                          ^~~
Language: C++

#include <iostream>
#include <alogrithm>

using namespace std;

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before ',' token
    5 | int h,,n,arr[100];
      |       ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before ',' token
    5 | int h,,n,arr[100];
      |       ^
a.cc:16:4: error: expected ';' before '}' token
   16 | i++
      |    ^
      |    ;
   17 | }
      | ~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int h,n;cin>>h>>n;
  int arr[n];
  for(int i=0; i<n; i++)cin>>arr[i];
  sort(arr,arr+n);
  for(int i=n-1; i>=0; i--){
    h-=arr[i];
    if(h<=0){
    	cout<<"Yes"<<endl;
      	return 0;
    }
  }
  cout<<"No"<<endl;
  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(arr,arr+n);
      |   ^~~~
      |   short
Language: C++

#include<bits/stdc++.h>
#define endl "\n"
#define pb push_back
#define ll long long
#define d1(x)  cerr << #x << "--> " << x << endl
#define d2(x, y)  cerr << #x << "--> " << x << " | " << #y << "--> " << y <<endl
#define d3(x, y,z)  cerr << #x << "--> " << x << " | " << #y << "--> " << y <<" | " << #z << "--> "<< z<< endl
#define vpll vector<pair<ll,ll>>
#define F first
#define S second
#define T ll tt; cin>>tt; while(tt--)
using namespace std;
ll mode=pow(10,9)+7;
bool cmp(pair<long double ,int > x, pair<long double , int> y){ return x.F<y.F && x.S<y.S; }
const ll maxn=1e4+10;
ll __lcm(ll a, ll b){ return (a*b)/__gcd(a,b); }
int main(){ 
    
//    #ifndef ONLINE_JUDGE
//  		freopen("input.txt", "r", stdin);
//    #endif
    
    ios::sync_with_stdio(0);
    cin.tie(0);
    
    ll h,n;
    cin>>h>>n;
    ll sum=0;
    for (int i=0;i<n;i++){
    	ll x;
    	cin>>x;
    	sum+=x;
    	
	}
    if (sum>=x) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:14: error: 'x' was not declared in this scope
   35 |     if (sum>=x) cout<<"Yes"<<endl;
      |              ^
Language: C++

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





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")
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:27: error: expected ';' before '{' token
   18 |   if (h <= 0) puts ("Yes")
      |                           ^
      |                           ;
   19 |   {
      |   ~
Language: C++

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





int main(){
  int h, n;
  scanf("%d%d", &h, &n );
  for (int i = 0; i < n; ++i)
  {
  int a;
  scanf("%d\n", &a);
  h -= a;
}
  if (h <= 0) puts ("Yes")
  {
      else puts("No")
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:27: error: expected ';' before '{' token
   18 |   if (h <= 0) puts ("Yes")
      |                           ^
      |                           ;
   19 |   {
      |   ~
Language: C++

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


int h, n;


int main(){
  scanf("%d%d", &h, &n );
  for (int i = 0; i < n; ++i)
  {
  int a;
  scanf("%d\n", &a);
  h -= a;
}
  if (h <= 0) puts ("Yes")
  {
      else puts("No")
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: expected ';' before '{' token
   17 |   if (h <= 0) puts ("Yes")
      |                           ^
      |                           ;
   18 |   {
      |   ~
Language: C

#include <stdio.h> int main() { signed long h,n; signed short temp; scanf("%ld%ld",&h,&n); while(n>0) { scanf("%hd",&temp); h = h - temp; n--; } if(h>0) { printf("No"); }else { printf("Yes"); } return 0; }


Compiler output:
main.c:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> int main() { signed long h,n; signed short temp; scanf("%ld%ld",&h,&n); while(n>0) { scanf("%hd",&temp); h = h - temp; n--; } if(h>0) { printf("No"); }else { printf("Yes"); } return 0; }
      |                    ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: Java

import java.util.Scanner;

public class RaccoonVsMonster {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int H = sc.nextInt();
		int n= sc.nextInt();
		int sum=0;
		for(int i =0 ;i< n; i++)
			sum+=sc.nextInt();
		if(H-sum>0)System.out.println("No");
		else System.out.println("Yes");

	}

}

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

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int h = sc.next();
        int n = sc.next();

        for(int i = 0 ; i < n ; i++){
        	h -= sc.nextInt();
        }

        System.out.println(h <= 0 ? "Yes" : "No");
    }
}

Compiler output:
Main.java:7: error: incompatible types: String cannot be converted to int
        int h = sc.next();
                       ^
Main.java:8: error: incompatible types: String cannot be converted to int
        int n = sc.next();
                       ^
2 errors
Language: C++

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

#define int long long
#define forn(i, n) for (int i = 0; i < n; ++i)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int) (x).size())


int32_t main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	int h, n;
	cin >> h >> n;
	vector<int> a(n);
	int sum = 0;
	forn(i, n) {
		cin >> a[i];
		sum += a[i];
	}
	if (sum >= a[i]) cout << "Yes\n";
	else cout << "No\n";
	return 0;
}



Compiler output:
a.cc: In function 'int32_t main()':
a.cc:21:22: error: 'i' was not declared in this scope
   21 |         if (sum >= a[i]) cout << "Yes\n";
      |                      ^
Language: C

#include <stdio.h>

int main()
{
    unsigned long H;
    unsigned long N;
    unsigned short tmp=0;
    
    scanf("%d %d", &H, &N);
    Res = H;
    
    int i;
    for(i = 0; i<N; i++)
    {
        scanf("%d ", &tmp;
        H = H - tmp;
    }
    
    if(H > 0)
    {
        printf("No");
    }
    else
    {
        printf("Yes");
    }
    

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:5: error: 'Res' undeclared (first use in this function)
   10 |     Res = H;
      |     ^~~
main.c:10:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:26: error: expected ')' before ';' token
   15 |         scanf("%d ", &tmp;
      |              ~           ^
      |                          )
main.c:16:21: error: expected ';' before '}' token
   16 |         H = H - tmp;
      |                     ^
      |                     ;
   17 |     }
      |     ~
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:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&H,&N);
      |   ^~~~~
a.cc:9:11: error: 'puts' was not declared in this scope
    9 |   if(H<=0)puts("Yes");
      |           ^~~~
a.cc:10:8: 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:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:9:11: error: 'puts' was not declared in this scope
    9 |   if(h<=0)puts("Yes");
      |           ^~~~
a.cc:10:8: 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("No");
  else puts("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:9:10: error: 'puts' was not declared in this scope
    9 |   if(h>0)puts("No");
      |          ^~~~
a.cc:10:8: error: 'puts' was not declared in this scope
   10 |   else puts("Yes");
      |        ^~~~
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("No");
  else puts("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:9:12: error: 'puts' was not declared in this scope
    9 |   if(h > 0)puts("No");
      |            ^~~~
a.cc:10:8: error: 'puts' was not declared in this scope
   10 |   else puts("Yes");
      |        ^~~~
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("No");
  else puts("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:9:12: error: 'puts' was not declared in this scope
    9 |   if(h > 0)puts("No");
      |            ^~~~
a.cc:10:8: error: 'puts' was not declared in this scope
   10 |   else puts("Yes");
      |        ^~~~
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("No");
  else puts("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:9:13: error: 'puts' was not declared in this scope
    9 |   if (h > 0)puts("No");
      |             ^~~~
a.cc:10:8: error: 'puts' was not declared in this scope
   10 |   else puts("Yes");
      |        ^~~~
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("No");
  else puts("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:9:13: error: 'puts' was not declared in this scope
    9 |   if (h > 0)puts("No");
      |             ^~~~
a.cc:10:8: error: 'puts' was not declared in this scope
   10 |   else puts("Yes");
      |        ^~~~
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("No");
  else puts("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:9:14: error: 'puts' was not declared in this scope
    9 |   if (h > 0) puts("No");
      |              ^~~~
a.cc:10:8: error: 'puts' was not declared in this scope
   10 |   else puts("Yes");
      |        ^~~~
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("No");
  else puts("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:9:14: error: 'puts' was not declared in this scope
    9 |   if (h < 0) puts("No");
      |              ^~~~
a.cc:10:8: error: 'puts' was not declared in this scope
   10 |   else puts("Yes");
      |        ^~~~
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("No");
  else puts("Yes");
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:9:14: error: 'puts' was not declared in this scope
    9 |   if (h < 0) puts("No");
      |              ^~~~
a.cc:10:8: error: 'puts' was not declared in this scope
   10 |   else puts("Yes");
      |        ^~~~
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("No");
  else puts("Yes");
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:6:11: error: expected primary-expression before '%' token
    6 |     scanf(%d, &a);
      |           ^
a.cc:6:12: error: 'd' was not declared in this scope
    6 |     scanf(%d, &a);
      |            ^
a.cc:9:14: error: 'puts' was not declared in this scope
    9 |   if (h < 0) puts("No");
      |              ^~~~
a.cc:10:8: error: 'puts' was not declared in this scope
   10 |   else puts("Yes");
      |        ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:6:11: error: expected primary-expression before '%' token
    6 |     scanf(%d, &a);
      |           ^
a.cc:6:12: error: 'd' was not declared in this scope
    6 |     scanf(%d, &a);
      |            ^
a.cc:9:14: error: 'puts' was not declared in this scope
    9 |   if (h < 0) puts("No");
      |              ^~~~
a.cc:10:8: error: 'puts' was not declared in this scope
   10 |   else puts("Yes");
      |        ^~~~
Language: C++

int main(){
  int h, n;
  scanf("%d%d",&h,&n);
  for (int i = 0; i < n; n--){
    int a;
    scanf(%d, &a);
    h -= a; 
    }
  if (h < 0) puts("No");
  else puts("Yes");
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:6:11: error: expected primary-expression before '%' token
    6 |     scanf(%d, &a);
      |           ^
a.cc:6:12: error: 'd' was not declared in this scope
    6 |     scanf(%d, &a);
      |            ^
a.cc:9:14: error: 'puts' was not declared in this scope
    9 |   if (h < 0) puts("No");
      |              ^~~~
a.cc:10:8: error: 'puts' was not declared in this scope
   10 |   else puts("Yes");
      |        ^~~~
Language: C++

int main(){
  int h, n;
  scanf("%d%d",&h,&n);
  for (; n > 0; n--){
    int a;
    scanf(%d, &a);
    h = h - a;
    }
  if (h < 0) puts("No");
  else puts("Yes");
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:6:11: error: expected primary-expression before '%' token
    6 |     scanf(%d, &a);
      |           ^
a.cc:6:12: error: 'd' was not declared in this scope
    6 |     scanf(%d, &a);
      |            ^
a.cc:9:14: error: 'puts' was not declared in this scope
    9 |   if (h < 0) puts("No");
      |              ^~~~
a.cc:10:8: error: 'puts' was not declared in this scope
   10 |   else puts("Yes");
      |        ^~~~
Language: C++

int main(){
  int h, n;
  scanf("%d%d",&h,&n);
  for (; n > 0; n--){
    int a;
    scanf(%d, &a);
    h = h - a;
    }
  if (h < 0){
    puts("No");
    }
  else
    puts("Yes");
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:6:11: error: expected primary-expression before '%' token
    6 |     scanf(%d, &a);
      |           ^
a.cc:6:12: error: 'd' was not declared in this scope
    6 |     scanf(%d, &a);
      |            ^
a.cc:10:5: error: 'puts' was not declared in this scope
   10 |     puts("No");
      |     ^~~~
a.cc:13:5: error: 'puts' was not declared in this scope
   13 |     puts("Yes");
      |     ^~~~
Language: C++

int main(){
  int h, n;
  scanf("%d%d",&h,&n);
  for (; n > 0; n--){
    int a;
    a = scanf(%d, &a);
    h = h - a;
    }
  if (h < 0){
    puts("No");
    }
  else
    puts("Yes");
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:6:15: error: expected primary-expression before '%' token
    6 |     a = scanf(%d, &a);
      |               ^
a.cc:6:16: error: 'd' was not declared in this scope
    6 |     a = scanf(%d, &a);
      |                ^
a.cc:10:5: error: 'puts' was not declared in this scope
   10 |     puts("No");
      |     ^~~~
a.cc:13:5: error: 'puts' was not declared in this scope
   13 |     puts("Yes");
      |     ^~~~
Language: C++

int main(){
  int h, n;
  scanf("%d%d",&h,&n);
  for (; n > 0; n--){
    int a;
    a = scanf(%d, &a);
    h = h - a;
    }
  if (h < 0){
    printf("No");
    }
  else
    printf("Yes");
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d%d",&h,&n);
      |   ^~~~~
a.cc:6:15: error: expected primary-expression before '%' token
    6 |     a = scanf(%d, &a);
      |               ^
a.cc:6:16: error: 'd' was not declared in this scope
    6 |     a = scanf(%d, &a);
      |                ^
a.cc:10:5: error: 'printf' was not declared in this scope
   10 |     printf("No");
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:13:5: error: 'printf' was not declared in this scope
   13 |     printf("Yes");
      |     ^~~~~~
a.cc:13:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

int main{
  int h, n;
  scanf("%d%d",&h,&n);
  for (; n > 0; n--){
    int a;
    a = scanf(%d, &a);
    h = h - a;
    }
  if (h < 0){
    printf("No");
    }
  else
    printf("Yes");
  }

Compiler output:
a.cc:1:5: error: cannot declare '::main' to be a global variable
    1 | int main{
      |     ^~~~
a.cc:2:3: error: expected primary-expression before 'int'
    2 |   int h, n;
      |   ^~~
a.cc:2:3: error: expected '}' before 'int'
a.cc:1:9: note: to match this '{'
    1 | int main{
      |         ^
a.cc:3:8: error: expected constructor, destructor, or type conversion before '(' token
    3 |   scanf("%d%d",&h,&n);
      |        ^
a.cc:4:3: error: expected unqualified-id before 'for'
    4 |   for (; n > 0; n--){
      |   ^~~
a.cc:4:10: error: 'n' does not name a type
    4 |   for (; n > 0; n--){
      |          ^
a.cc:4:17: error: 'n' does not name a type
    4 |   for (; n > 0; n--){
      |                 ^
a.cc:9:3: error: expected unqualified-id before 'if'
    9 |   if (h < 0){
      |   ^~
a.cc:12:3: error: expected unqualified-id before 'else'
   12 |   else
      |   ^~~~
a.cc:14:3: error: expected declaration before '}' token
   14 |   }
      |   ^
Language: C++

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

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

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

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


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

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

public class Main2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int h = scanner.nextInt();
        int n = scanner.nextInt();
        scanner.nextLine();
        List<Integer> list = new ArrayList<>();
        for(int i = 0; i < n; i++) {
            list.add(scanner.nextInt());
        }
        if(h > list.stream().mapToInt(m -> m).sum()){
            System.out.println("NO");
        } else {
            System.out.println("YES");
        }
    }
}


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

bool Common_Raccoon(int H, int arrA[],int size ,int start,int sum)
{
	if (sum >= H)
		return true;
	if (start == size)
		return false;
	
	return Common_Raccoon(H, arrA, size, start + 1, sum + arrA[start]) || Common_Raccoon(H, arrA, size, start + 1, sum);
}
int main()
{
	float H;
	int size;
	cin >> H >> size;
	int *arrA;
	arrA = new int[size];
	for (int i = 0; i < size; i++)
		cin >> arrA[i];

	if (Common_Raccoon(H, arrA, size,0, 0))
		cout << "Yes" << endl;
	else
		cout << "No" << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'cin' was not declared in this scope
   14 |         cin >> H >> size;
      |         ^~~
a.cc:21:17: error: 'cout' was not declared in this scope
   21 |                 cout << "Yes" << endl;
      |                 ^~~~
a.cc:21:34: error: 'endl' was not declared in this scope
   21 |                 cout << "Yes" << endl;
      |                                  ^~~~
a.cc:23:17: error: 'cout' was not declared in this scope
   23 |                 cout << "No" << endl;
      |                 ^~~~
a.cc:23:33: error: 'endl' was not declared in this scope
   23 |                 cout << "No" << endl;
      |                                 ^~~~
Language: C++

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

int main(){
  ll h,n,cnt=0;
  cin >> h >> n;
  vector<ll> a(n);
  for(ll i=0;i<n;i++){
    cin >> a.at(i);
    cnt += a.at(i);
  }
  if(cnt >= h) cout <<  "Yes" << endl;
  else cout << "No" << endl;
  
  
  return 0;
}

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

#include<algorithm>
#include<bitset>
#include<cmath>
#include<complex>
#include<deque>
#include<functional>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<vector>

using namespace std;
typedef long long ll;

#define REP(i, n) for(ll i=0;i<(ll)(n);i++)
#define RREP(i, n) for(ll i=(ll)(n-1);i>=0;i--)
#define FOR(i, a, b) for(ll i=(ll)(a), i<=(ll)(b); i++)
#define RFOR(i, a, b) for(ll i=(ll)(a);i>=(ll)(b); i--)
#define ALL(x) (x).begin(),(x).end()
#define SIZE(x) ((ll)(x).size())
#define INF 1000000000000
#define MOD 10000007
#define PB push_back
#define MP make_pair
#define F first
#define S second

signed main()
{
	ll H, N;
	REP(i, n){
		ll a;
		H-=a;
		if(H<=0){
			cout << "Yes";
			return 0;
		}
	}
	cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:16: error: 'n' was not declared in this scope
   39 |         REP(i, n){
      |                ^
a.cc:23:37: note: in definition of macro 'REP'
   23 | #define REP(i, n) for(ll i=0;i<(ll)(n);i++)
      |                                     ^
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <float.h>
#include <iomanip>
#include <iostream>
using namespace std;


int main(){
    
    long H,A[10010] = {},N,sum=0;

    cin >> H >> N;

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

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

    return;

}

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

h,n = map(int,input().split())
a_lst = list(map(int,input().split()))

if h>sum(a_lst):
    print('No')
else:
    print('Yes')


Compiler output:
a.cc:5:11: warning: multi-character character constant [-Wmultichar]
    5 |     print('No')
      |           ^~~~
a.cc:7:11: warning: multi-character character constant [-Wmultichar]
    7 |     print('Yes')
      |           ^~~~~
a.cc:1:1: error: 'h' does not name a type
    1 | h,n = map(int,input().split())
      | ^
Language: C++

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

typedef long long 			ll;
typedef unsigned long long 	ull;

const int N = 1e5 + 20;

ll a[N];

int main() {
	ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
	ll n, k, sum = 0;
	cin >> n >> k;
	for (int i = 0; i < k; i++)
		cin >> a[i]. sum += a[i];
	cout << (sum >= n? "Yes": "No") << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:30: error: request for member 'sum' in 'a[i]', which is of non-class type 'll' {aka 'long long int'}
   16 |                 cin >> a[i]. sum += a[i];
      |                              ^~~
Language: C++

using namespace std;

int main()
{
    int h;int n;int i;int c;
    int arr[n];
    c=arr[i];
    cin >>h>>n;
    for (i=0;i<n ;i++){
        cin >>arr[i];

    }
    for (i=0;i<n;i++){
        if (c>h){
            cout<< "Yes";
        }
        else{
        c=c+arr[i+1];
    }

    }
    cout<<"No";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >>h>>n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:15:13: error: 'cout' was not declared in this scope
   15 |             cout<< "Yes";
      |             ^~~~
a.cc:15:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:5: error: 'cout' was not declared in this scope
   22 |     cout<<"No";
      |     ^~~~
a.cc:22:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

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

int main{
int h,n,sum=0,scan;
scanf("%d %d",&h,&n);
for(int count=0;count<n;count++){
scanf("%d",&scan);
sum=sum+scan;
}
if(h<=sum){printf("Yes");}
else{printf("No");}
}

Compiler output:
main.c:4:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    4 | int main{
      |         ^
Language: C++

#include<cstdio>

int main()
{
	int h,n,s=0;
	scanf("%d%d",&h,&n);
	while(n--)
	{
		int x;
		scnaf("%d",&x);
		s+=x;
	}
	printf("%s\n",h<=s?"Yes":"No");
	return 0;
}

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

import java.util.*;
public class Main{
  
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int h = sc.nextInt();
      int n = sc.nextInt();
      
      for(int i = 0;i++;i<n){
      	h =- sc.nextInt();
      }
      String answer = h<=0:"Yes"?"No";
      
      System.out.println(answer);
	}
 
}


Compiler output:
Main.java:9: error: not a statement
      for(int i = 0;i++;i<n){
                         ^
Main.java:12: error: ';' expected
      String answer = h<=0:"Yes"?"No";
                          ^
2 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: 'retrun' was not declared in this scope
   18 |   retrun 0;
      |   ^~~~~~
Language: C++

fun main(args: Array<String>){
    val a = readLine()!!.split(" ").map{it.toInt()}[0]
    val b = readLine()!!.split(" ").map{it.toInt()}
    if(b.sum() >= a){
        println("Yes")
    }else{
        println("No")
    }
}


Compiler output:
a.cc:1:1: error: 'fun' does not name a type
    1 | fun main(args: Array<String>){
      | ^~~
Language: C++

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
      int H;
      int N,sum=0;
      cin>>H,N;
      int arr[N];
      for(int i=0;i<N;i++)
      {
    	cin>>a[i];
        sum+=arr[i];
      }
      if(sum==H)
      {
    	cout<<"Yes";
      }
      else {
    	printf("No");
      }
    return 0;
    }

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int H;
  int N,sum=0;
  cin>>H,N;
  int arr[N];
  for(int i=0;i<N;i++)
  {
	cin>>a[i];
    sum+=a[i];
  }
  if(sum==H)
  {
	cout<<"Yes";
  }
  else {
	printf("No");
  }
return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   rep(i,n) cin>>a,h-=a;
      |       ^
a.cc:6:3: error: 'rep' was not declared in this scope
    6 |   rep(i,n) cin>>a,h-=a;
      |   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  long long int H, N;
  cin >> H >> N;
  long long int sum;
  for(int i=0;i<N;i++){
    int A;
    cin >> A;
    sum += A;
  }
  string ans = (sum < H) ？ "No" : "Yes";
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: conversion from 'bool' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   13 |   string ans = (sum < H) ？ "No" : "Yes";
      |                ~~~~~^~~~
a.cc:13:26: error: expected ',' or ';' before '\U0000ff1f'
   13 |   string ans = (sum < H) ？ "No" : "Yes";
      |                          ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  long long int H, N;
  cin >> H >> N;
  long long int sum;
  for(i=0;i<N;i++){
    int A;
    cin >> A;
    sum += A;
  }
  string ans = sum < H ？ "No" : "Yes";
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=0;i<N;i++){
      |       ^
a.cc:13:20: error: conversion from 'bool' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   13 |   string ans = sum < H ？ "No" : "Yes";
      |                ~~~~^~~
a.cc:13:24: error: expected ',' or ';' before '\U0000ff1f'
   13 |   string ans = sum < H ？ "No" : "Yes";
      |                        ^~
Language: C++

#define ll long long
using namespace std;

int main()
{
        ll h, n;
        cin>>h>>n;
        ll attack;
        while (n--) {
                cin>>attack;
                h-=attack;
        }

        if (h > 0) {
                cout<<"No"<<endl;
        } else {
                cout<<"Yes"<<endl;
        }

        return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin>>h>>n;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define ll long long
a.cc:15:17: error: 'cout' was not declared in this scope
   15 |                 cout<<"No"<<endl;
      |                 ^~~~
a.cc:15:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:29: error: 'endl' was not declared in this scope
   15 |                 cout<<"No"<<endl;
      |                             ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #define ll long long
a.cc:17:17: error: 'cout' was not declared in this scope
   17 |                 cout<<"Yes"<<endl;
      |                 ^~~~
a.cc:17:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:30: error: 'endl' was not declared in this scope
   17 |                 cout<<"Yes"<<endl;
      |                              ^~~~
a.cc:17:30: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
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:
main.c: In function 'main':
main.c:3:2: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |  scanf ( "%d%d" ,& H ,& N );
      |  ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main (){
main.c:3:2: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |  scanf ( "%d%d" ,& H ,& N );
      |  ^~~~~
main.c:3:2: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:1: error: stray '\343' in program
    7 | <U+3000>H -= A ;
      | ^~~~~~~~
main.c:10:1: error: stray '\343' in program
   10 | <U+3000>if ( H <=0) puts ( "Yes" );
      | ^~~~~~~~
main.c:10:15: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
   10 | 　if ( H <=0) puts ( "Yes" );
      |               ^~~~
main.c:10:15: note: include '<stdio.h>' or provide a declaration of 'puts'
main.c:11:1: error: stray '\343' in program
   11 | <U+3000>else puts ( "No" );
      | ^~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:13: error: uninitialized 'const H' [-fpermissive]
    3 |   const int H,N,A,i,sum=0;
      |             ^
a.cc:3:15: error: uninitialized 'const N' [-fpermissive]
    3 |   const int H,N,A,i,sum=0;
      |               ^
a.cc:3:17: error: uninitialized 'const A' [-fpermissive]
    3 |   const int H,N,A,i,sum=0;
      |                 ^
a.cc:3:19: error: uninitialized 'const i' [-fpermissive]
    3 |   const int H,N,A,i,sum=0;
      |                   ^
a.cc:5:8: error: assignment of read-only variable 'i'
    5 |   for(i=0;i<N;i++){
      |       ~^~
a.cc:5:15: error: increment of read-only variable 'i'
    5 |   for(i=0;i<N;i++){
      |               ^
a.cc:7:9: error: assignment of read-only variable 'sum'
    7 |     sum = sum + A;
      |     ~~~~^~~~~~~~~
Language: C++

#include <iostream>
int main(){
  int hp,an,*ap,ap_sum=0;
  std::cin>>hp>>an;
  *ap=new int[an];
  for(int i=0;i<an;i++){
    std::cin>>ap[i];
    ap_sum+=ap[i];
  }
  if(hp-ap_sum<=0){
    std::cout<<"Yes\n";
  }else{
    std::cout<<"No\n";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: invalid conversion from 'int*' to 'int' [-fpermissive]
    5 |   *ap=new int[an];
      |       ^~~~~~~~~~~
      |       |
      |       int*
Language: C++

#include<iostream>
#include<vector>

using nsamespace std;

int main(){
  int h,n,x;
  int res = 0;
  for(int i=0; i<n; ++i){
    cin>>x;
    res=+x;
  }
  if(res>=h){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  return 0;
}
    


Compiler output:
a.cc:4:7: error: expected nested-name-specifier before 'nsamespace'
    4 | using nsamespace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:10:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |     cin>>x;
      |     ^~~
      |     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:14:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |     cout<<"Yes"<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |     cout<<"Yes"<<endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |     cout<<"No"<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |     cout<<"No"<<endl;
      |                 ^~~~
      |                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
#include<vector>

using nsamespace std;

int main(){
  int h,n,x;
  int res = 0;
  for(int i=0; i<n; ++i){
    cin>>x;
    res=+x;
  }
  if(res>h=){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  return 0;
}
    

Compiler output:
a.cc:4:7: error: expected nested-name-specifier before 'nsamespace'
    4 | using nsamespace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:10:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |     cin>>x;
      |     ^~~
      |     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:13:12: error: expected primary-expression before ')' token
   13 |   if(res>h=){
      |            ^
a.cc:14:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |     cout<<"Yes"<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |     cout<<"Yes"<<endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |     cout<<"No"<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |     cout<<"No"<<endl;
      |                 ^~~~
      |                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'i' was not declared in this scope
    4 |   long long h,n;i=0;
      |                 ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:5:7: error: 'i' undeclared (first use in this function)
    5 |   for(i=0;i<N;i++){
      |       ^
main.c:5:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#inclued<stdio.h>
int main(){
  int H,N;
  scanf("%d%d",&H,&N);
  for(i=0;i<N;i++){
    int A;
    scanf("%d",&A);
    H-=A;
  }
  if("H<=0")
    printf("Yes");
  else
    printf("No");
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inclued; did you mean #include?
    1 | #inclued<stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d%d",&H,&N);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inclued<stdio.h>
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d%d",&H,&N);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:7: error: 'i' undeclared (first use in this function)
    5 |   for(i=0;i<N;i++){
      |       ^
main.c:5:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   11 |     printf("Yes");
      |     ^~~~~~
main.c:11:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:11:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   13 |     printf("No");
      |     ^~~~~~
main.c:13:5: note: include '<stdio.h>' or provide a declaration of 'printf'