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

#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
 
int main()
{
  int enemy,skill;
  cin >> enemy >> skill;
  if(enemy < skill)
  {
    cout << "0" << endl;
    return 1;
  }
  int sum,copy;
  copy=enemy;
  
  array<int, enemy> hp;
  while(enemy--)
  {
    cin >> hp[enemy-1];
  }
  sort(hp.begin(),hp.end() );
  copy -= skill;
  while(copy--)
  {
    sum += hp[skill-1];
    skill++
  }
  cout << sum << endl;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: the value of 'enemy' is not usable in a constant expression
   17 |   array<int, enemy> hp;
      |                   ^
a.cc:7:7: note: 'int enemy' is not const
    7 |   int enemy,skill;
      |       ^~~~~
a.cc:17:19: note: in template argument for type 'long unsigned int'
   17 |   array<int, enemy> hp;
      |                   ^
a.cc:20:14: error: invalid types 'int[int]' for array subscript
   20 |     cin >> hp[enemy-1];
      |              ^
a.cc:22:11: error: request for member 'begin' in 'hp', which is of non-class type 'int'
   22 |   sort(hp.begin(),hp.end() );
      |           ^~~~~
a.cc:22:22: error: request for member 'end' in 'hp', which is of non-class type 'int'
   22 |   sort(hp.begin(),hp.end() );
      |                      ^~~
a.cc:26:14: error: invalid types 'int[int]' for array subscript
   26 |     sum += hp[skill-1];
      |              ^
a.cc:27:12: error: expected ';' before '}' token
   27 |     skill++
      |            ^
      |            ;
   28 |   }
      |   ~
Language: C++

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

int main()
{
  int e,s;
  cin >> e >> s;
  if(e < s)
    cout << "0" << endl;
  int h[e],c=e,s;
  while(c--)
  {
    cin >> h[c-1];
  }
  sort(h,h+e);
  e -= s;
  while(e--)
  {
    s += h[s++];
  }
  cout << s << endl;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: redeclaration of 'int s'
   10 |   int h[e],c=e,s;
      |                ^
a.cc:6:9: note: 'int s' previously declared here
    6 |   int e,s;
      |         ^
Language: Java

import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    int arr[] = new int[n];
    long sum = 0;
    for(int i=0;i<n;i++)
      arr[i] = sc.nextInt();
    for(int i=0;i<n;i++)
      arr[i] = -arr[i];
    Arrays.sort();
    for(int i=0;i<n;i++)
      arr[i] = -arr[i];
    for(int i=k;i<n;i++){
      sum += arr[i];
    }
    System.out.println(sum);
  }
}


Compiler output:
Main.java:17: error: no suitable method found for sort(no arguments)
    Arrays.sort();
          ^
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (cannot infer type-variable(s) T#1
        (actual and formal argument lists differ in length))
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include <iostream>
#include <stdio.h>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <functional>
#include <cstdlib>
#include <map>
using namespace std;
#define REP(i,n); for(int i = 0;i < (int)(n);i++)

int main() {
	int n, k;
	long long sum, input;
	vector<long long> h;
	
	cin >> n >> k;
	
	REP(i,n){
		cin >> input;
		h.push_back(input);
		
	}
	sort(h.begin(), h.end());
	if(n <= k){
		cout << 0;
		return 0;
	}
	h.erase(h.end-k, h.end);

	sum = 0;
	REP(i, h.size()){
		sum += h[i];
	}
	cout << sum;
	
	return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:22: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator-'
   30 |         h.erase(h.end-k, h.end);
      |                 ~~~~~^~
      |                   |   |
      |                   |   int
      |                   <unresolved overloaded function type>
Language: C++

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

int main()
{
    ll n,k;
    cin>>l>>k;
    vector<ll> v(n-k);
    for(ll i=0;i<n-k;++i)cin>>v[i];
    cout<<accumulate(v.begin(),v.end(),0)<<endl;
}


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

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

int main()
{
    ll n,k;
    cin>>l>>k;
    vector<ll> v(n-k);
    for(ll i=0;i<n-k;++i)cin>>v[i];
    cout<<acumulate(v.begin(),v.end(),0)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'l' was not declared in this scope
    8 |     cin>>l>>k;
      |          ^
a.cc:11:11: error: 'acumulate' was not declared in this scope
   11 |     cout<<acumulate(v.begin(),v.end(),0)<<endl;
      |           ^~~~~~~~~
Language: Java

import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;
import java.lang.Math;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    int arr[] = new int[n];
    BigInteger sum = 0;
    for(int i=0;i<n;i++)
      arr[i] = sc.nextInt();
    Arrays.sort(arr,Collections.reverseOrder());
    for(int i=k;i<n;i++){
      sum += arr[i];
    }
    System.out.println(sum);
  }
}


Compiler output:
Main.java:13: error: cannot find symbol
    BigInteger sum = 0;
    ^
  symbol:   class BigInteger
  location: class Main
Main.java:16: error: no suitable method found for sort(int[],Comparator<Object>)
    Arrays.sort(arr,Collections.reverseOrder());
          ^
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (inference variable T#1 has incompatible bounds
        equality constraints: int
        upper bounds: Object)
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: Java

import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;
import java.util.Math;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    int arr[] = new int[n];
    BigInteger sum = 0;
    for(int i=0;i<n;i++)
      arr[i] = sc.nextInt();
    Arrays.sort(arr,Collections.reverseOrder());
    for(int i=k;i<n;i++){
      sum += arr[i];
    }
    System.out.println(sum);
  }
}


Compiler output:
Main.java:5: error: cannot find symbol
import java.util.Math;
                ^
  symbol:   class Math
  location: package java.util
Main.java:13: error: cannot find symbol
    BigInteger sum = 0;
    ^
  symbol:   class BigInteger
  location: class Main
Main.java:16: error: no suitable method found for sort(int[],Comparator<Object>)
    Arrays.sort(arr,Collections.reverseOrder());
          ^
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (inference variable T#1 has incompatible bounds
        equality constraints: int
        upper bounds: Object)
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
3 errors
Language: Java

import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    int arr[] = new int[n];
    BigInteger sum = 0;
    for(int i=0;i<n;i++)
      arr[i] = sc.nextInt();
    Arrays.sort(arr,Collections.reverseOrder());
    for(int i=k;i<n;i++){
      sum += arr[i];
    }
    System.out.println(sum);
  }
}


Compiler output:
Main.java:12: error: cannot find symbol
    BigInteger sum = 0;
    ^
  symbol:   class BigInteger
  location: class Main
Main.java:15: error: no suitable method found for sort(int[],Comparator<Object>)
    Arrays.sort(arr,Collections.reverseOrder());
          ^
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (inference variable T#1 has incompatible bounds
        equality constraints: int
        upper bounds: Object)
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: Java

import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    int arr[] = new int[n];
    long sum = 0;
    for(int i=0;i<n;i++)
      arr[i] = sc.nextInt();
    Arrays.sort(arr,Collections.reverseOrder());
    for( i=k;i<n;i++){
      sum += arr[i];
    }
    System.out.println(sum);
  }
}


Compiler output:
Main.java:15: error: no suitable method found for sort(int[],Comparator<Object>)
    Arrays.sort(arr,Collections.reverseOrder());
          ^
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (inference variable T#1 has incompatible bounds
        equality constraints: int
        upper bounds: Object)
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Main.java:16: error: cannot find symbol
    for( i=k;i<n;i++){
         ^
  symbol:   variable i
  location: class Main
Main.java:16: error: cannot find symbol
    for( i=k;i<n;i++){
             ^
  symbol:   variable i
  location: class Main
Main.java:16: error: cannot find symbol
    for( i=k;i<n;i++){
                 ^
  symbol:   variable i
  location: class Main
Main.java:17: error: cannot find symbol
      sum += arr[i];
                 ^
  symbol:   variable i
  location: class Main
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
5 errors
Language: Java

import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long k = sc.nextLong();
    long arr[] = new long[int(n)];
    long sum = 0;
    for(long i=0;i<n;i++)
      arr[i] = sc.nextLong();
    Arrays.sort(arr,Collections.reverseOrder());
    for(long i=k;i<n;i++){
      sum += arr[i];
    }
    System.out.println(sum);
  }
}


Compiler output:
Main.java:11: error: '.class' expected
    long arr[] = new long[int(n)];
                             ^
Main.java:11: error: not a statement
    long arr[] = new long[int(n)];
                              ^
Main.java:11: error: ';' expected
    long arr[] = new long[int(n)];
                               ^
3 errors
Language: Java

import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long k = sc.nextLong();
    long arr[] = new long[n];
    long sum = 0;
    for(long i=0;i<n;i++)
      arr[i] = sc.nextLong();
    Arrays.sort(arr,Collections.reverseOrder());
    for(long i=k;i<n;i++){
      sum += arr[i];
    }
    System.out.println(sum);
  }
}


Compiler output:
Main.java:11: error: incompatible types: possible lossy conversion from long to int
    long arr[] = new long[n];
                          ^
Main.java:14: error: incompatible types: possible lossy conversion from long to int
      arr[i] = sc.nextLong();
          ^
Main.java:15: error: no suitable method found for sort(long[],Comparator<Object>)
    Arrays.sort(arr,Collections.reverseOrder());
          ^
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (inference variable T#1 has incompatible bounds
        equality constraints: long
        upper bounds: Object)
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Main.java:17: error: incompatible types: possible lossy conversion from long to int
      sum += arr[i];
                 ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
4 errors
Language: Java

import java.util.Collections;
import java.io.*;
import java.util.*;
import java.util.Arrays;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    int arr[] = new int[n];
    int sum = 0;
    for(int i=0;i<n;i++)
      arr[i] = sc.nextInt();
    Arrays.sort(arr,Collections.reverseOrder());
    for(int i=k;i<n;i++){
      sum += arr[i];
    }
    System.out.println(sum);
  }
}


Compiler output:
Main.java:15: error: no suitable method found for sort(int[],Comparator<Object>)
    Arrays.sort(arr,Collections.reverseOrder());
          ^
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (inference variable T#1 has incompatible bounds
        equality constraints: int
        upper bounds: Object)
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

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

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    int arr[] = new int[n];
    int sum = 0;
    for(int i=0;i<n;i++)
      arr[i] = sc.nextInt();
    Arrays.sort(arr,Collections.reverseOrder());
    for(int i=k;i<n;i++){
      sum += arr[i];
    }
    System.out.println(sum);
  }
}


Compiler output:
Main.java:14: error: no suitable method found for sort(int[],Comparator<Object>)
    Arrays.sort(arr,Collections.reverseOrder());
          ^
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (inference variable T#1 has incompatible bounds
        equality constraints: int
        upper bounds: Object)
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

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

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    int arr[] = new int[n];
    int sum = 0;
    for(int i=0;i<n;i++)
      arr[i] = sc.nextInt();
    Arrays.sort(arr,Collections.reverseOrder());
    for(int i=k;i<n;i++){
      sum += arr[i];
    }
    System.out.println(sum);
  }
}


Compiler output:
Main.java:6: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
Main.java:13: error: cannot find symbol
    Arrays.sort(arr,Collections.reverseOrder());
    ^
  symbol:   variable Arrays
  location: class Main
3 errors
Language: Java

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

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    int arr[] = new int[n];
    int sum = 0;
    for(int i=0;i<n;i++)
      arr[i] = sc.nextInt();
    Arrays.sort(arr,Collections.reverseOrder());
    for(int i=k;i<n;i++){
      sum += arr[i];
    }
    System.out.println(sum);
  }
}

Compiler output:
Main.java:13: error: no suitable method found for sort(int[],Comparator<Object>)
    Arrays.sort(arr,Collections.reverseOrder());
          ^
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (inference variable T#1 has incompatible bounds
        equality constraints: int
        upper bounds: Object)
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

mport java.util.*;
public class Main
{
    public static void main(String[] args) 
    {
      Scanner s = new Scanner(System.in);
      int h = s.nextInt();
      int k = s.nextInt();
      
      Integer a[] = new Integer[h];
      long sum=0;
      for(int i = 0; i <= h-1 ;i++)
        {
            a[i] = s.nextInt();
        }
      Arrays.sort(a, Collections.reverseOrder()); 
       
      for(int j = k; j<h; j++ )
      {
        sum = sum + a[j];
      }
      System.out.println("" + sum);
    }
      
   
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: Java

import java.util.*;
public class Main
{
    public static void main(String[] args) 
    {
      Scanner s = new Scanner(System.in);
      long h = s.nextLong();
      long k = s.nextLong();
      
      Integer a[] = new Integer[h];
      long sum=0;
      for(int i = 0; i <= h-1 ;i++)
        {
            a[i] = s.nextInt();
        }
      Arrays.sort(a, Collections.reverseOrder()); 
       
      for(int j = k; j<h; j++ )
      {
        sum = sum + a[j];
      }
      System.out.println("" + sum);
    }
      
   
}

Compiler output:
Main.java:10: error: incompatible types: possible lossy conversion from long to int
      Integer a[] = new Integer[h];
                                ^
Main.java:18: error: incompatible types: possible lossy conversion from long to int
      for(int j = k; j<h; j++ )
                  ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namepace std;
int main(){
int n,k;
int s=0;
  cin>>n>>k;
  int a[n];
  for(int i=0;i<n;i++)
    cin>>a[i];
  if(k>=n)
    cout<<"0";
  else{
  sort(a,a+n);
  for(int j=0;j<n-k;j++)
  	s=s+a[j];
  cout<<s;
  }
  return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepace'
    2 | using namepace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>n>>k;
      |   ^~~
      |   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:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     cout<<"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:13:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   13 |   sort(a,a+n);
      |   ^~~~
      |   std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout<<s;
      |   ^~~~
      |   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 <stdio.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define max(a,b) return(a<b=?b:a)
int main(void){
  int n,k;
  scanf("%d%d",&n,&k);
  long h[n];
  rep(i,n){
    scanf("%d", h[i]);
  }
  rep(i,k){
    int ma=0;
    rep(i,n-1)
      ma=max(h[i],h[i+1]);
    rep(i,n)
      if(h[i]==ma)
        h[i]=0;
  }
  long ans=0;
  rep(i,n){
    ans+=h[i];
  }
  printf("%d",ans);
  retunr 0;
}        

Compiler output:
main.c: In function 'main':
main.c:3:18: error: expected expression before 'return'
    3 | #define max(a,b) return(a<b=?b:a)
      |                  ^~~~~~
main.c:14:10: note: in expansion of macro 'max'
   14 |       ma=max(h[i],h[i+1]);
      |          ^~~
main.c:24:3: error: 'retunr' undeclared (first use in this function)
   24 |   retunr 0;
      |   ^~~~~~
main.c:24:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:9: error: expected ';' before numeric constant
   24 |   retunr 0;
      |         ^~
      |         ;
Language: C++

#include <iostream>
using namespace std;

int main(){
  int N, K;
  int H[210000];
  cin >> N >> K ;
  for (int i = 0; i < N; i++){
   cin >> H[i];
  }
  sort(H, H + N, greater<int>());

  for (int i = 0; i < K; i++) {
    H[i] = 0;
  }
  int res = 0;
  for (int i = K; i < N; i++) {
    res += H[i];
  }
  cout << res << endl;
 }


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

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

int main() {
  int N,K;
  cin>>N>>K;
  
  vector<int> H(i);
  for (int i=0; i<N;i++){
    cin>>H(i);
  }
  int x = 0;
  
  if(N>K){
    int d = N - K;
    vector<int> X(j);
    
  }
  

}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'i' was not declared in this scope
    8 |   vector<int> H(i);
      |                 ^
a.cc:10:11: error: no match for call to '(std::vector<int>) (int&)'
   10 |     cin>>H(i);
      |          ~^~~
a.cc:16:19: error: 'j' was not declared in this scope
   16 |     vector<int> X(j);
      |                   ^
Language: Java

import java.util.*;
public class Main { 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        
        if(k >= n) {
            System.out.println(0);
            return;
        }
        int[] arr = new int[n];
        for(int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        Arrays.sort(arr);
        int sum = 0;
        for(int i = 0; i < n - k; i++) {
            sum += arr[i];
        }
        return sum;
    }
}

Compiler output:
Main.java:21: error: incompatible types: unexpected return value
        return sum;
               ^
1 error
Language: C++

#include <iostream>
#define MOD 1000000007
using namespace std;

typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)

long long modinv(long long a, long long m=MOD) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m; 
    if (u < 0) u += m;
    return u;
    /*MODの割り算の際に
    a/＝b;
    を
    a *= modinv(b,MOD);
    とする。
        */
}

bool com(const int &a,const int &b){
    return a>b;
}

int N,K;
#define MAXN 200001
int H[MAXN];

int main(){
    cin >> N >> K;
    rep(i,N)cin >> H[i];
    sort(H,H+N,com);
    ll sum = 0;
    for(int i=K;i<N;i++){
        sum += H[i] ;
    }
    cout << sum << endl;
    return 0;
}

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

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdint>

using namespace std;
int main() {
  uint64_t n, k;
  cin >> n >> k;

  vector<uint64_t> h(n);

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

  sort(h.begin(), h.end(), greater<uint64_t>());

  if(k >= n) {
    cout << 0 << endl;
  } else {
    h.erase(h.begin(), h.begin() + k);
    auto count = accumulate(h.begin(), h.end(), 0);
    cout << count << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: 'accumulate' was not declared in this scope
   23 |     auto count = accumulate(h.begin(), h.end(), 0);
      |                  ^~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
 
int main(){
  
    int n, k;
    cin >> n >> k;
    long long int h[n],
  	long long int ans = 0;
    for(int i=0; i<n; i++) 
      cin >> h[i];
    sort(h, h+n);
    for(int i=0; i<n-k; i++) 
    {
      ans += h[i];
    }
    cout << ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected unqualified-id before 'long'
    9 |         long long int ans = 0;
      |         ^~~~
a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 |     sort(h, h+n);
      |     ^~~~
      |     short
a.cc:15:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |       ans += h[i];
      |       ^~~
      |       abs
a.cc:17:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |     cout << ans;
      |             ^~~
      |             abs
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextLong();
		Long [] in = new Long [a];
        for(int i=0;i<a;i++){in[i] = sc.nextLong();
                            }
        Arrays.sort(in);
		Long c = in[0]-in[0];
        for(int i=0;i<a-b;i++){c+=in[i];}      
		System.out.println(c);
	}
}


Compiler output:
Main.java:6: error: incompatible types: possible lossy conversion from long to int
        int b = sc.nextLong();
                           ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long a = sc.nextLong();
        Long b = sc.nextLong();
		Long [] in = new Long [a];
        for(int i=0;i<a;i++){in[i] = sc.nextLong();
                            }
        Arrays.sort(in);
		Long c = a-a;
        for(Long i=0;i<a-b;i++){c+=in[i];}      
		System.out.println(c);
	}
}


Compiler output:
Main.java:7: error: incompatible types: Long cannot be converted to int
		Long [] in = new Long [a];
		                       ^
Main.java:12: error: incompatible types: int cannot be converted to Long
        for(Long i=0;i<a-b;i++){c+=in[i];}      
                   ^
Main.java:12: error: incompatible types: Long cannot be converted to int
        for(Long i=0;i<a-b;i++){c+=in[i];}      
                                      ^
3 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long a = sc.nextLong();
        Long b = sc.nextLong();
		Long [] in = new Long [a];
        for(int i=0;i<a;i++){in[i] = sc.nextInt();
                            }
        Arrays.sort(in);
		Long c = a-a;
        for(int i=0;i<a-b;i++){c+=in[i];}      
		System.out.println(c);
	}
}


Compiler output:
Main.java:7: error: incompatible types: Long cannot be converted to int
		Long [] in = new Long [a];
		                       ^
Main.java:8: error: incompatible types: int cannot be converted to Long
        for(int i=0;i<a;i++){in[i] = sc.nextInt();
                                               ^
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
		Long [] in = new int [a];
        for(int i=0;i<a;i++){in[i] = sc.nextInt();
                            }
        Arrays.sort(in);
		Long c = 0;
        for(int i=0;i<a-b;i++){c+=in[i];}      
		System.out.println(c);
	}
}


Compiler output:
Main.java:7: error: incompatible types: int[] cannot be converted to Long[]
		Long [] in = new int [a];
		             ^
Main.java:8: error: incompatible types: int cannot be converted to Long
        for(int i=0;i<a;i++){in[i] = sc.nextInt();
                                               ^
Main.java:11: error: incompatible types: int cannot be converted to Long
		Long c = 0;
		         ^
3 errors
Language: C++

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

int main(){
    ll n,k,ans;
    cin >> n >> k;
    vector<ll> h(n);
    rep(i,n) cin >> h[i];
    sort(h.begin(),h.end(),greater<ll>());
    for(int i = k-1,n){
        ans += h[i];
    }
    cout << ans;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: expected ';' before ')' token
   12 |     for(int i = k-1,n){
      |                      ^
      |                      ;
a.cc:12:22: error: expected primary-expression before ')' token
a.cc:12:22: error: expected ';' before ')' token
   12 |     for(int i = k-1,n){
      |                      ^
      |                      ;
Language: C

#include<stdio.h>
int main(void)
{
  int enemy,k,i,j,count=0,temp;
  scanf("%d%d",&enemy,&k);
  int health[enemy];
  for(i=0;i<enemy;i++){
    scanf("%d",&health[i]);
  }
   for (i = 0; i < enemy-1; i++){
    for (j = enemy - 1; j > =i-1; j--){   //　右から左に操作
      if (health[j] < health[j-1]) { 
        temp = health[j-1];
        health[j-1] = health[j];
        health[j] = temp;}
    }
  }
  for(i=0;i<enemy-k;i++){
    count=count+health[i];
  }
  printf("%d",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:29: error: expected expression before '=' token
   11 |     for (j = enemy - 1; j > =i-1; j--){   //　右から左に操作
      |                             ^
Language: C

#include<stdio.h>
int main(void)
{
  int enemy,k,i,j,count=0;
  scanf("%d%d",&enemy,&k);
  int health[enemy];
  for(i=0;i<enemy;i++){
    scanf("%d",&health[i]);
  }
   for (i = 0; i < enemy-1; i++){
    for (j = enemy - 1; j > i; j--){   //　右から左に操作
      if (health[j] < health[j-1]) { 
        temp = health[j-1];
        health[j-1] = health[j];
        health[j] = temp;}
    }
  }
  for(i=0;i<enemy-k;i++){
    count=count+health[i];
  }
  printf("%d",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:9: error: 'temp' undeclared (first use in this function)
   13 |         temp = health[j-1];
      |         ^~~~
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
void swap (int *x, int *y) {
  int temp;    // 値を一時保存する変数

  temp = *x;
  *x = *y;
  *y = temp;
}
int main(void)
{
  int enemy,k,i,j,count=0;
  scanf("%d%d",&enemy,&k);
  if(enemy==k){
    printf("0");
  }
  int health[enemy];
  for(i=0;i<enemy;i++){
    scanf("%d",&health[i]);
  }
   for (i = 0; i < enemy - 1; i++){
    for (j = enemy - 1; j >= i + 1; j--){   //　右から左に操作
      if (health[j] < health[j-1]) { 
        swap(&health[j], &health[j-1]); }
    }
  }
  for(i=0;i<enemy-k;i++){
    count=count+health[i];
  }
  printf("%d",count);
  

Compiler output:
main.c: In function 'main':
main.c:29:3: error: expected declaration or statement at end of input
   29 |   printf("%d",count);
      |   ^~~~~~
Language: C++

#include <bits/stdc++.h>
#include <ctime>
#include <sstream>
#define weewoo ios::sync_with_stdio(false);cin.tie(0)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define ld long double
#define ll long long
#define se second
#define fi first
#define ctoi(x) x-'0'
#define pi (acos(-1))
#define llputin(a,n) for(int i=0;i<n;i++){ll x;cin >> x;a.push_back(x);}
#define iputin(a,n) for(int i=0;i<n;i++){int x;cin >> x;a.push_back(x);}

#define MOD ((ll) 1e9 + (ll) 7)
using namespace std;

ll pw(ll x,ll a){
    if(a==0)
        return 1;
    ll t = pw(x,a/2);
    if(a%2==0)
        return (t*t);
    else
        return (t*t*x);
}

bool prime(int x)
{
    if(x < 2) return false;
        for(int i=2; i<= sqrt(x); i++) {
            if ((x%i) == 0) return false;
        }
    return true;
}

vector<ll>a;
int main()
{
    weewoo;
    ll n,k;
    cin >> n >> k;
    for(int i=0;i<n;i++){
        ll x;cin >> x;
        a.push_back(x);
        ans+=x;
    }
    sort(a.rbegin(),a.rend());
    int i=0;
    for(;i<n&&k>0;i++){
        i++;
        k--;
        ans-=a[i];
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   47 |         ans+=x;
      |         ^~~
      |         abs
a.cc:54:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   54 |         ans-=a[i];
      |         ^~~
      |         abs
a.cc:56:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   56 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#pragma GCC optimize("Ofast")
using namespace std;

void swap(int *x, int *y){
  int temp = *x;
  *x = *y;
  *y = temp;
}

void sort(int arr[], int n){
  int i, j;
  for (i=0; i<n-1; i++){
    for (j=n-1; j>i; j--){
      if(arr[j] < arr[i])
	swap(&arr[i], &arr[j]);
    }
  }
}

int main(void){
  int N, K, *H, i;
  long int ans = 0;
  scanf("%d %d", &N, &K);
  H = (int *)malloc(N * sizeof(int));
  for(i=0; i<N; i++)
    scanf("%d", H + i);
    
  if(N > K){
    sort(H, N);
    for(i=0; i<N-K; i++)
      ans += (long int)H[i];
  }

  free(H);
  cout << ans << '\n';
    
  return 0;
} 


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

package Atcoder;
import java.util.Scanner;

public class Main3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();//攻撃
        int K = sc.nextInt();//必殺技
        int H[] = new int[n];//体力
        int sum = 0;

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

if(K==0){
        }else if(K ==0){
                System.out.println(sum);
            }else{
                ;for(int index = 1; index < H[i].lenght; index ++);
        }
Arrays.sort(H);
if(K==0){
           for(int i =0; i <H.length; i++){
sum += H[i]}
            }else{
 for(int i =0; i <K; i++){
H.remove(H.length);
        }
for(int i =0; i <H.length-K; i++){
sum += H[i]}
}
    }

Compiler output:
Main.java:25: error: ';' expected
sum += H[i]}
           ^
Main.java:31: error: ';' expected
sum += H[i]}
           ^
Main.java:33: error: reached end of file while parsing
    }
     ^
3 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		//　敵の数
		int n = sc.nextInt();
		// 必殺技の回数
		int k = sc.nextInt();
        //攻撃回数
        float t = 0;
      
      	// 必殺技で除去できる物は除外
     	if(k>=n){
          System.out.println(t);
        }
      
      	else{
          //敵の体力
		  float a[] = new int[n];
      	
  		  for(int i=0;i<n;i++){
            a[i] = sc.nextInt();
          }
      
      	  Arrays.sort(a);
      	
          for(int i=0;i<n-k;i++){
            t = t+a[i];
          }
		  System.out.println(t);
        }
	}
}


Compiler output:
Main.java:19: error: incompatible types: int[] cannot be converted to float[]
		  float a[] = new int[n];
		              ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		//　敵の数
		int n = sc.nextInt();
		// 必殺技の回数
		int k = sc.nextInt();
        //攻撃回数
        int t = 0;
      
      	// 必殺技で除去できる物は除外
     	if(k>=h){
          System.out.println(t);
        }
      
      	else{
          //敵の体力
		  int a[] = new int[n];
      	
  		  for(int i=0;i<n;i++){
            a[i] = sc.nextInt();
          }
      
      	  Arrays.sort(a);
      	
          for(int i=0;i<n-k;i++){
            t = t+a[i];
          }
		  System.out.println(t);
        }
	}
}


Compiler output:
Main.java:13: error: cannot find symbol
     	if(k>=h){
     	      ^
  symbol:   variable h
  location: class Main
1 error
Language: C++

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define ll  long long
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define vi vector<int>
#define br cout <<"\n";
#define all(x)  (x).begin(),(x).end()
#define rall(x)  (x).rbegin(),(x).rend()
#define tr(c,i) for(auto i : c)
#define pii pair< int,int >
#define fast_io() ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define pq priority_queue< pair<ll,pii> ,vector<pair<ll,pii>>,greater <pair<ll,pii>> >p;//container adapter makes ascending q
#define er(x) cout << x << " "
#define err(x,y) cout << x << " "<<y
using namespace std;

const ll MAX =  1000 * 1000 ;
const int dx[] = { 1, -1 , 0 , 0  };
const int dy [] = { 0 ,0 , 1 , -1  };
const int MOD = 1000 * 1000 * 1000 + 7 ;
const int N = 301 ;
const int INF = INT_MAX ;
const int M = 200005;
int main ( ){
#ifndef ONLINE_JUDGE


ll  n , k ;
cin >> n >> k ; 
std::vector<ll> h (n);
for (auto &x : h )
	cin >> x ; 

sort( rall(h)) ; 
ll sum = 0 ; 
for ( int i = k ; i < n ; ++i )
	sum += h[i] ; 

cout << sum ; 
return 0 ;

}


Compiler output:
a.cc:28: error: unterminated #ifndef
   28 | #ifndef ONLINE_JUDGE
Language: C++

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

int main() {
  long N,K,H;
  long count =0;
  cin >> N >> K;
  vector<long> lineH(N);
    for(long i = 0; i < N; i++){
      cin >> lineH.at(i);
      count += lineH.at(i);
    }
  sort(lineH.begin(),lineH.end());
  reverse(lineH.begin(),lineH.end());
  if(N-K <=0){
    cout << 0 << endl;
  }else{
  for(long i = 0; i < N-K; i++){
    count -= lineH.at(i);
  }
  cout << count << endl;
}
  

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

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

int main() {
  int N, K; cin >> N >> K;
  vector<long long> H(N); for(int i = 0; i < N; ++i) cin >> H[i];
  sort(H.rbegin(), H.rend());
  long long ans = 0;
  for(int i = K; i < N; i++) ans += H[i];
  cout << ans << 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(H.rbegin(), H.rend());
      |   ^~~~
      |   short
Language: Java

import java.util.*;
public class Beginner153C {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
	
		int[] H = new int[N];
		
		int count = 0;

		for (int i=0;i<N;i++) {
			H[i] = sc.nextInt();
		}
		Arrays.sort(H);
		
		for (int i=0;i<H.length-K;i++) {
			count += H[i];
		}

		System.out.println(count);
		
	}
}


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

#include<stdio.h>
int main(){
  int N, K;
  int HP[N];
    scanf("%d%d", &N, &K);
  for(int b=1; b<=N; ++b){
    scanf("%d", &HP[b]);
  }
  
　int c; 
  for (int i=1; i<N; ++i) 
    for (int j=i+1; j<=N; ++j) {
      if (HP[i] > HP[j]) {
        c =  HP[j];
        HP[j] = HP[i];
        HP[i] = c;
      }
    }
  }
  
  long long int sum;  
    for (int i=1;i<=N-K;++i )
    {
    sum += HP[i];
    }
    printf ("%lld", sum);
    
    return 0;
  }


Compiler output:
main.c: In function 'main':
main.c:10:1: error: stray '\343' in program
   10 | <U+3000>int c;
      | ^~~~~~~~
main.c: At top level:
main.c:22:5: error: expected identifier or '(' before 'for'
   22 |     for (int i=1;i<=N-K;++i )
      |     ^~~
main.c:22:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
   22 |     for (int i=1;i<=N-K;++i )
      |                   ^~
main.c:22:25: error: expected identifier or '(' before '++' token
   22 |     for (int i=1;i<=N-K;++i )
      |                         ^~
main.c:26:13: error: expected declaration specifiers or '...' before string constant
   26 |     printf ("%lld", sum);
      |             ^~~~~~
main.c:26:21: error: expected declaration specifiers or '...' before 'sum'
   26 |     printf ("%lld", sum);
      |                     ^~~
main.c:28:5: error: expected identifier or '(' before 'return'
   28 |     return 0;
      |     ^~~~~~
main.c:29:3: error: expected identifier or '(' before '}' token
   29 |   }
      |   ^
Language: C

#include<stdio.h>

int main(){
  int N, K, c;
  int HP[N];
    scanf("%d%d", &N, &a);
  for(int b=1; b<=N; ++b){
    scanf("%d", &HP[b]);
  }
  
  for (int i=1; i<N; ++i) {
    for (int j=i+1; j<=N; ++j) {
      if (HP[i] > HP[j]) {
        c =  HP[j];
        HP[j] = HP[i];
        HP[i] = c;
      }
    }
  }
  
  long long int sum;  
    for (int i=1;i<=N-K;++i )
    {
    sum += HP[i];
    }
    printf ("%d", sum);
    
    return 0;
  }


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

#include<stdio.h>

int main(){
  int N, K, c;
  int HP[fenek];
    scanf("%d%d", &N, &a);
  for(int b=1; b<=N; ++b){
    scanf("%d", &HP[b]);
  }
  
  for (int i=1; i<N; ++i) {
    for (int j=i+1; j<=N; ++j) {
      if (HP[i] > HP[j]) {
        c =  HP[j];
        HP[j] = HP[i];
        HP[i] = c;
      }
    }
  }
  
  long long int sum;  
    for (int i=1;i<=N-K;++i )
    {
    sum += HP[i];
    }
    printf ("%d", sum);
    
    return 0;
  }


Compiler output:
main.c: In function 'main':
main.c:5:10: error: 'fenek' undeclared (first use in this function)
    5 |   int HP[fenek];
      |          ^~~~~
main.c:5:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:24: error: 'a' undeclared (first use in this function)
    6 |     scanf("%d%d", &N, &a);
      |                        ^
Language: C

#include<stdio.h>

int main(){
  double fenek, a, c, e;
  double HP[fenek];
  double e = 0;
    scanf("%d%d", &fenek, &a);
  for(double b=1; b<=fenek; ++b){
    scanf("%d", &HP[b]);
  }
  
  for (double i=1; i<fenek; ++i) {
    for (double j=i+1; j<=fenek; ++j) {
      if (HP[i] > HP[j]) {
        c =  HP[j];
        HP[j] = HP[i];
        HP[i] = c;
      }
    }
  }

  if(a>=fenek) {
    e =fenek;
  } else {
    for (double d=1;d<=fenek-a;++d ){
    e += HP[d];
    }
  }
    printf ("%d", e);
    
     return 0;
  }


Compiler output:
main.c: In function 'main':
main.c:5:10: error: size of array 'HP' has non-integer type
    5 |   double HP[fenek];
      |          ^~
main.c:6:10: error: redeclaration of 'e' with no linkage
    6 |   double e = 0;
      |          ^
main.c:4:23: note: previous declaration of 'e' with type 'double'
    4 |   double fenek, a, c, e;
      |                       ^
main.c:9:20: error: array subscript is not an integer
    9 |     scanf("%d", &HP[b]);
      |                    ^
main.c:14:13: error: array subscript is not an integer
   14 |       if (HP[i] > HP[j]) {
      |             ^
main.c:14:21: error: array subscript is not an integer
   14 |       if (HP[i] > HP[j]) {
      |                     ^
main.c:15:16: error: array subscript is not an integer
   15 |         c =  HP[j];
      |                ^
main.c:16:11: error: array subscript is not an integer
   16 |         HP[j] = HP[i];
      |           ^
main.c:16:19: error: array subscript is not an integer
   16 |         HP[j] = HP[i];
      |                   ^
main.c:17:11: error: array subscript is not an integer
   17 |         HP[i] = c;
      |           ^
main.c:26:12: error: array subscript is not an integer
   26 |     e += HP[d];
      |            ^
Language: C

#include<stdio.h>

int main(){
  double fenek, a, c, e;
  double HP[fenek];
  double e = 0;
    scanf("%d%d", &fenek, &a);
  for(doble b=1; b<=fenek; ++b){
    scanf("%d", &HP[b]);
  }
  
  for (double i=1; i<fenek; ++i) {
    for (double j=i+1; j<=fenek; ++j) {
      if (HP[i] > HP[j]) {
        c =  HP[j];
        HP[j] = HP[i];
        HP[i] = c;
      }
    }
  }

  if(a>=fenek) {
    e =fenek;
  } else {
    for (double d=1;d<=fenek-a;++d ){
    e += HP[d];
    }
  }
    printf ("%d", e);
    
     return 0;
  }


Compiler output:
main.c: In function 'main':
main.c:5:10: error: size of array 'HP' has non-integer type
    5 |   double HP[fenek];
      |          ^~
main.c:6:10: error: redeclaration of 'e' with no linkage
    6 |   double e = 0;
      |          ^
main.c:4:23: note: previous declaration of 'e' with type 'double'
    4 |   double fenek, a, c, e;
      |                       ^
main.c:8:7: error: unknown type name 'doble'; did you mean 'double'?
    8 |   for(doble b=1; b<=fenek; ++b){
      |       ^~~~~
      |       double
main.c:14:13: error: array subscript is not an integer
   14 |       if (HP[i] > HP[j]) {
      |             ^
main.c:14:21: error: array subscript is not an integer
   14 |       if (HP[i] > HP[j]) {
      |                     ^
main.c:15:16: error: array subscript is not an integer
   15 |         c =  HP[j];
      |                ^
main.c:16:11: error: array subscript is not an integer
   16 |         HP[j] = HP[i];
      |           ^
main.c:16:19: error: array subscript is not an integer
   16 |         HP[j] = HP[i];
      |                   ^
main.c:17:11: error: array subscript is not an integer
   17 |         HP[i] = c;
      |           ^
main.c:26:12: error: array subscript is not an integer
   26 |     e += HP[d];
      |            ^