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

#include<iostream>
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
  int n, k, q ;
  cin >> n >> k >> q ;
  vector<int> a(q) ;
  for(int i=0;i<a.size();i++){
    cin >> a.at(i) ;
  }

  vector<int> score(n,k) ;
  
  for(int i=0;i<a.size();i++){
  
    int ss = a.at(i) ;
    for(int j=0;j<n){
     if(j==ss){
      continue ;
     }else{
      score.at(a.at(j))-1 ;     
     }
    }
   
   for(int i=0;i<a.size();i++){
     if(score.at(i)<=0)
    cout << "No" << endl;
       else
    cout << "Yes" << endl;
   }
     
    return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:20: error: expected ';' before ')' token
   19 |     for(int j=0;j<n){
      |                    ^
      |                    ;
a.cc:35:2: error: expected '}' at end of input
   35 | }
      |  ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include<stdlib.h>
#define N 100000
using namespace std;


int main(){
    int n,k,q,a[N],b[N];
    cin>>n>>k>>q;
    for(int i=0;i<q;i++){
    cin>>b[i];
}

for(int i=0;i<n;i++){
    a[i]=k;
}

      for(int j=0;j<n;j++){
         for(int i=0;i<q;i++){
           
    if(b[i]!=j+1)a[j]--;
    if(a[j]<=0)break; 
    
    
}}
for(int j=0;j<n;j++){
   if(a[j]>0)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin>>n>>k>>q;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<stdlib.h>
  +++ |+#include <iostream>
    2 | #define N 100000
a.cc:26:14: error: 'cout' was not declared in this scope
   26 |    if(a[j]>0)cout<<"Yes"<<endl;
      |              ^~~~
a.cc:26:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:26:27: error: 'endl' was not declared in this scope
   26 |    if(a[j]>0)cout<<"Yes"<<endl;
      |                           ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<stdlib.h>
  +++ |+#include <ostream>
    2 | #define N 100000
a.cc:27:6: error: 'cout' was not declared in this scope
   27 | else cout<<"No"<<endl;
      |      ^~~~
a.cc:27:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:18: error: 'endl' was not declared in this scope
   27 | else cout<<"No"<<endl;
      |                  ^~~~
a.cc:27:18: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int N,K,Q,a;
int main(){
  cin>>N>>K>>Q;
//  int A[N];
//  for(int j=0;j<N;j++)A[j]=K-Q;
  for(int i=0;i<Q;i++){
    cin>>a;
 //   A[a-1]++;
  }
  for(int j=0;j<N;j++){
//    if(A[i]>0)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'else' without a previous 'if'
   14 |     else cout<<"No"<<endl;
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int N,K,Q,a;
int main(){
  cin>>N>>K>>Q;
  int A[N];
  for(int j=0;j<N;j++)A[j]=K-Q;
  for(int i=0;i<Q;i++){
    cin>>a;
    A[a-1]++;
  }
  for(int j=0;j<N;j++){
    if(A[i]>0)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'i' was not declared in this scope
   13 |     if(A[i]>0)cout<<"Yes"<<endl;
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std+;
int N,K,Q,a;
int main(){
  cin>>N>>K>>Q;
/*  int A[N];
  for(int j=0;j<N;j++)A[j]=K-Q;
  for(int i=0;i<Q;i++){
    cin>>a;
    A[a-1]++;
  }
  for(int j=0;j<N;j++){
    if(A[i]>0)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
  }*/
}

Compiler output:
a.cc:2:20: error: expected ';' before '+' token
    2 | using namespace std+;
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before '+' token
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef std::vector<pii> vii;
#define INF 0x3f3f3f3f

map<int,pair<bool,int>> mp;
int main(int argc, char const *argv[])

{
	std::ios_base sync_with_stdio(false), cin.tie(false), cout.tie(false);
	//freopen("in.txt" , "r", stdin);
 	//freopen("out.txt" , "w", stdout);

  	int n, k, q;
  	cin>>n>>k>>q;
  	int pos;
 	int ara[n+1]={k};
 	//for (int i = 0; i < n; i++) ara[i]=k;
 	for(int i=0; i<q; i++){
 		int pos;
 		cin>>pos;
 		pos-=1;
 		mp[pos].first=true;
 		mp[pos].second+=1;
 		//cout<<mp[pos].second<<" ";
 	}
 	//cout<<endl;
 	for(int i=0; i<n; i++){
 		if(mp[i].first==false){
 			if( (k + (-1*q) ) > 0) cout<<"Yes\n";
 			else cout<<"No\n";
 		}
 		else{
 			if(k + (-1 * (q-mp[i].second)) > 0 ) cout<<"Yes\n";
 			else
 				cout<<"No\n";
 		}
 	}
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:12:44: error: no matching function for call to 'std::ios_base::ios_base(bool)'
   12 |         std::ios_base sync_with_stdio(false), cin.tie(false), cout.tie(false);
      |                                            ^
In file included from /usr/include/c++/14/streambuf:43,
                 from /usr/include/c++/14/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/14/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54,
                 from a.cc:1:
/usr/include/c++/14/bits/ios_base.h:912:5: note: candidate: 'std::ios_base::ios_base()'
  912 |     ios_base() throw ();
      |     ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:912:5: note:   candidate expects 0 arguments, 1 provided
a.cc:12:50: error: expected initializer before '.' token
   12 |         std::ios_base sync_with_stdio(false), cin.tie(false), cout.tie(false);
      |                                                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std+;
int N,K,Q,a;

int main(){
  cin>>N>>K>>Q;
  int A[N];
  for(int j=0;j<N;j++)A[j]=K-Q;
  for(int i=0;i<Q;i++){
    cin>>a;
    A[a-1]++;
  }
  for(int j=0;j<N;j++){
    if(A[i]>0)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
  }
}
    
    

Compiler output:
a.cc:2:20: error: expected ';' before '+' token
    2 | using namespace std+;
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before '+' token
a.cc: In function 'int main()':
a.cc:14:10: error: 'i' was not declared in this scope
   14 |     if(A[i]>0)cout<<"Yes"<<endl;
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,k,q;
  cin>>n>>k>>q;
  int a;
  int b[n]={0};
  for(int i=0;i<q;++i)
  {cin>>a;
  b[a-1]++}
  for(int i=0;i<n;++i)
  {
    b[i]=k-b[i];
    if(b[i]>0)
      cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
  }
  
  
    
  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected ';' before '}' token
   11 |   b[a-1]++}
      |           ^
      |           ;
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <math.h>

using namespace std;
 
int main() {
	size_t N;
	size_t K;
	size_t Q;
	size_t i;
	
	cin >> N >> K >> Q;
	
	vector<int> A(Q);
	for(i=0;i<Q;i++){
		cin >> A[i];
	}
	
	for(i=0;i<N;i++){
		size_t n_count = count(A.begin(), A.end(), i+1);
		if(K-(Q-n_count) > 0){
			cout << "Yes";
			cout << K-(Q-n_count);
		}else{
			cout << "No";
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:34: error: 'count' was not declared in this scope; did you mean 'n_count'?
   22 |                 size_t n_count = count(A.begin(), A.end(), i+1);
      |                                  ^~~~~
      |                                  n_count
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main()
{
	int N;
	int K;
	int Q;
	cin >> N >> K >> Q;
	vector<int> A(Q);
	for (int i = 0; i < Q; i++) cin >> A.at(i);

	for (int i = 1; i <= N; i++)
	{
		int answerCount = 0;
		auto itr = A.begin();
		while (true)
		{
			itr = find(itr, A.end(), i);
			if (itr == A.end()) break;
			itr++;
			answerCount++;
		}

		if (K - Q + answerCount > 0)
		{
			cout << "Yes" << endl;
		}
		else
		{
			cout << "No" << endl;
		}
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:35: error: no matching function for call to 'find(__gnu_cxx::__normal_iterator<int*, std::vector<int> >&, std::vector<int>::iterator, int&)'
   21 |                         itr = find(itr, A.end(), i);
      |                               ~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:21:35: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   21 |                         itr = find(itr, A.end(), i);
      |                               ~~~~^~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <math.h>

using namespace std;
 
int main() {
	int N;
	int K;
	int Q;
	int i;
	
	cin >> N >> K >> Q;
	
	vector<int> A(Q);
	for(i=0;i<Q;i++){
		cin >> A[i];
	}
	
	for(i=0;i<N;i++){
		int n_count = count(A.begin(), A.end(), i+1);
		if(K-(Q-n_count) > 0){
			cout << "Yes";
		}else{
			cout << "No";
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:31: error: 'count' was not declared in this scope; did you mean 'n_count'?
   22 |                 int n_count = count(A.begin(), A.end(), i+1);
      |                               ^~~~~
      |                               n_count
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
const int MOD = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main(){
  int n, k, q;
  int Sn, Sk, Sq;
  cin.get( Sn, Sk, Sq );
  n = Integer.valueOf(Sn).intValue();
  n = Integer.valueOf(Sk).intValue();
  n = Integer.valueOf(Sq).intValue();
  int* p = new int[n];
  int* a = new int[q];
  for (int i = 0; i < n; i++)
  {
    a[i] = k - q;
  }
  
  for (int i = 0; i < q; i++)
  {
    int a;
    cin >> a;
    p[a]++;
  }
  
  for (int i = 0; i < n; i++)
  {
    if (p[i] > 0)
    {
      cout << "Yes";
    }
    else
    {
      cout << "No";
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: invalid conversion from 'int' to 'std::basic_istream<char>::char_type*' {aka 'char*'} [-fpermissive]
   11 |   cin.get( Sn, Sk, Sq );
      |            ^~
      |            |
      |            int
In file included from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:1:
/usr/include/c++/14/istream:436:22: note:   initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::get(char_type*, std::streamsize, char_type) [with _CharT = char; _Traits = std::char_traits<char>; char_type = char; std::streamsize = long int]'
  436 |       get(char_type* __s, streamsize __n, char_type __delim);
      |           ~~~~~~~~~~~^~~
a.cc:12:7: error: 'Integer' was not declared in this scope
   12 |   n = Integer.valueOf(Sn).intValue();
      |       ^~~~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
const int MOD = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main(){
  int n, k, q;
  cin.get( n, k, q );
  int* p = new int[n];
  int* a = new int[q];
  for (int i = 0; i < n; i++)
  {
    a[i] = k - q;
  }
  
  for (int i = 0; i < q; i++)
  {
    int a;
    cin >> a;
    p[a]++;
  }
  
  for (int i = 0; i < n; i++)
  {
    if (p[i] > 0)
    {
      cout << "Yes";
    }
    else
    {
      cout << "No";
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: invalid conversion from 'int' to 'std::basic_istream<char>::char_type*' {aka 'char*'} [-fpermissive]
   10 |   cin.get( n, k, q );
      |            ^
      |            |
      |            int
In file included from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:1:
/usr/include/c++/14/istream:436:22: note:   initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::get(char_type*, std::streamsize, char_type) [with _CharT = char; _Traits = std::char_traits<char>; char_type = char; std::streamsize = long int]'
  436 |       get(char_type* __s, streamsize __n, char_type __delim);
      |           ~~~~~~~~~~~^~~
Language: C++

#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <boost/multiprecision/cpp_int.hpp>

using namespace std;
namespace mp = boost::multiprecision;

int main(){
	int n = 1; 
	int q;
	mp::cpp_int k;
	cin >> n >> k >> q;
	int j;

	int a[n];
	mp::cpp_int b[n];
	for (int i = 0; i < n; i++) {
		a[i] = 0;
		b[i] = 0;
	}

	for (int i = 0; i < q; i++) {
		cin >> j;
		a[j-1]++;
	}


	if (k > 100000) {
		for (int i = 0; i < n; i++) {
			cout << "Yes" << endl;
		}
	}

	for (int i = 0; i < n; i++) {
		b[i] = k - (q - a[i]);
	}

	for (int i = 0; i < n; i++) {
		if (b[i] <= 0) {
			cout << "No" << endl;
		} else {
			cout << "Yes" << endl;
		}
	}
	
	return 0;
}

Compiler output:
a.cc:7:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    7 | #include <boost/multiprecision/cpp_int.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(void)
{
  int n = 0,k=0,q;
  int i = 0,j = 0;
  cin >> n >> k >> q;
  
  vector<int> p;
 
  for(;i<n;i++)
  {
    p.push_back(0);
  }
  
  for(i = 0;i<q;i++)
  {
    cin >> j ;
    p[j - 1]++;
  }
  
  for(i = 0 ; i < n;i++)
  {
    if(k - q + v[i] <= 0)
      cout << "No";
    else
      cout << "Yes";
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:16: error: 'v' was not declared in this scope
   25 |     if(k - q + v[i] <= 0)
      |                ^
Language: C++

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

int main(){
  int n,k,q;
  cin n >> k >> q;
  vector<int> a(q);
  for(int i=0;i<q;i++)
    cin >> q[i];
  vector<int> b(n,k);
  for(int i=0;i<q;i++){
    for(int j=0;j<n;j++){
      if(a[i]==j+1)
        continue;
      else
        b[j]--;
    }
  }
  for(int i=0;i<n;i++){
    if(b[i]>0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;    
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'n'
    6 |   cin n >> k >> q;
      |      ^~
      |      ;
a.cc:9:13: error: invalid types 'int[int]' for array subscript
    9 |     cin >> q[i];
      |             ^
Language: Java

import java.util.*;
 
public class Main{
	public static void main(String [] args){
		Scanner sc = new Scanner(System.in);
		int people = sc.nextInt();
      	int firstPoint = sc.nextInt();
      	int correct = sc.nextInt();
      	int[] point = new int[people];
      	Arrays.fill(point, firstPoint-correct);
      	int correctPerson = 0;
      	for(int i = 0; i < correct; i++){
        	correctPerson = sc.nextInt();
          	point[correctPerson-1] += 1;
        }
      	for(int j = 0; j < correct; j++){
        	if(point[i] > 0){
            	System.out.println("YES");
            }else if(point[i] <= 0){
            	System.out.println("NO");
            }
        }     	
	}
}

Compiler output:
Main.java:17: error: cannot find symbol
        	if(point[i] > 0){
        	         ^
  symbol:   variable i
  location: class Main
Main.java:19: error: cannot find symbol
            }else if(point[i] <= 0){
                           ^
  symbol:   variable i
  location: class Main
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main (){
  int N, K, Q;
  cin >> N >> K >> Q;
  
  vector<int> A(Q);
  
  for(int i=0; i<Q; i++){
    cin >> A[i];
  }
  
  vector<int> B(N,K-Q);
  
  for(int i=0; i<Q; i++){
    B[A[i] -1]++
  }
  
  
  for(int i=0; i<N; i++){
    if(B.at(i) >= 1){
      cout << "Yes" << endl;
    }
    else{
      cout << "No" << endl;
    }
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: expected ';' before '}' token
   17 |     B[A[i] -1]++
      |                 ^
      |                 ;
   18 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;

int main(){
    int n, k, q;
    cin >> n >> k >> q;
    int score[n];
    int alist[q]

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

    for(int i = 0; i < q; i++){
        score[alist[i]-1]++;
    }
    
    for(int i = 0; i < n; i++){
        if(score[i] > k){
            cout << "Yes" << endl;
        }
        else{
            cout << "No" << endl;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected initializer before 'for'
   10 |     for(int i = 0; i < q; i++){
      |     ^~~
a.cc:10:20: error: 'i' was not declared in this scope
   10 |     for(int i = 0; i < q; i++){
      |                    ^
a.cc:15:15: error: 'alist' was not declared in this scope; did you mean 'va_list'?
   15 |         score[alist[i]-1]++;
      |               ^~~~~
      |               va_list
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <random>
#include <chrono>
#include <queue>
#include <math.h>
#define inf 10e8
using namespace std;
 
 
 
int main(){
    long n,k,q;
    cin >> n >>k >> q;
    long a[n+10];
    for (long i=0;i<n+3;i++) a[i]=0;
    for (long i=1;i<=q;i++){
        long d;
        cin >> d;
        a[d]++;
    }
    long ans=n;
    for (long i=1;i<=n;i++){
        long point;
        point=k-q+a[i];
        if(point<=0) cout <<"NO" << endl;
        else cout << "Yes" << endl;
    }
   
}
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <random>
#include <chrono>
#include <queue>
#include <math.h>
#define inf 10e8
using namespace std;



int main(){
    long n,k,q;
    cin >> n >>k >> q;
    long a[n+10];
    for (long i=0;i<n+3;i++) a[i]=0;
    for (long i=1;i<=q;i++){
        long d;
        cin >> d;
        a[d]++;
    }
    long ans=n;
    for (long i=1;i<=n;i++){
        long point;
        point=k-q+a[i];
        if(point<=0) cout <<"No" << endl;
        else cout << "Yes" << endl;
    }
   
}





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

import com.sun.javafx.image.IntPixelGetter;

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 q = sc.nextInt();

        List<Integer> list = new ArrayList<>();
        for(int i = 0; i < q; i++){
            list.add(sc.nextInt());
        }

        Collections.sort(list);
        int index = 0;
        for(int i = 0;i < n;i++){
            if(index < q && list.get(index) == (i+1)){
                int count = 0;
                while(index < q && list.get(index) == (i+1)){
                    index++;
                    count++;
                }
                if(count > q-k){
                    System.out.println("Yes");
                } else {
                    System.out.println("No");
                }
            } else {
                if(q < k){
                    System.out.println("Yes");
                } else {
                    System.out.println("No");
                }
            }
        }

    }
}

Compiler output:
Main.java:1: error: package com.sun.javafx.image does not exist
import com.sun.javafx.image.IntPixelGetter;
                           ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
using Int = long long int;
template<typename T> void swap(T *t1, T *t2){ T* tmp=t1; t1=t2; t2=tmp;}


Int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    Int n, k, q;
    Int a[100000];
    Int tmp;
    cin >> n >> k >> q;
    for(Int i=0; i<q; i++){
        a[i] = 0;
    }
    for(Int i=0; i<q; i++){
        cin >> tmp;
        a[tmp-1]++;
    }
    for(Int i=0; i<n; i++){
        if(k - (q-a[i]) <= 0){
            cout << "No" << endl;
        }else {
            cout << "Yes" << endl;
        }
    }

    return 0;
}

Compiler output:
a.cc:7:1: error: '::main' must return 'int'
    7 | Int main(){
      | ^~~
Language: Java

import com.sun.javafx.image.IntPixelGetter;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        String[] params = in.nextLine().split(" ");
        int n = Integer.parseInt(params[0]);
        long k = Long.parseLong(params[1]);
        int q = Integer.parseInt(params[2]);

        int[] scores = new int[n];

        int[] as = new int[q];
        for( int i = 0 ; i < q ; i++ ){
            as[i] = Integer.parseInt( in.nextLine() );
            scores[as[i]-1]++;
        }

        for( int i = 0 ; i < n ; i++ ){
            if( k - q + scores[i] <= 0 ){
                System.out.println("No");
            }
            else {
                System.out.println("Yes");
            }
        }

    }

}


Compiler output:
Main.java:1: error: package com.sun.javafx.image does not exist
import com.sun.javafx.image.IntPixelGetter;
                           ^
1 error
Language: Java

import java.util.*;

class Main {
	  static long mod=1_000_000_007;
  public static void main(String[] args) {
	  int flg = 0;
	  Scanner sc = new Scanner(System.in);
      long N = sc.nextLong();
      long K = sc.nextLong();
      long Q = sc.nextLong();
      long[] a = new long[(int)N];
      int tmp;
      
      for(int i=0;i<Q;i++) {
    	  tmp = sc.nextInt()-1;
    	  a[tmp] = a[tmp] +1;
      }

      for(int i=0;i<N;i++) {
    	  if(a[i]>Q-K) {
    		  System.out.println("Yes");
    	  } else {
    		  System.out.println("No");
    	  }
      }
      
  }

Compiler output:
Main.java:27: error: reached end of file while parsing
  }
   ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
using Int = long long Int;
template<typename T> void swap(T *t1, T *t2){ T* tmp=t1; t1=t2; t2=tmp;}


Int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    Int n, k, q;
    Int a[100000];
    Int tmp;
    cin >> n >> k >> q;
    for(Int i=0; i<q; i++){
        a[i] = 0;
    }
    for(Int i=0; i<q; i++){
        cin >> tmp;
        a[tmp-1]++;
    }
    for(Int i=0; i<n; i++){
        if(k - (q-a[i]) <= 0){
            cout << "No" << endl;
        }else {
            cout << "Yes" << endl;
        }
    }

    return 0;
}

Compiler output:
a.cc:3:22: error: expected ';' before 'Int'
    3 | using Int = long long Int;
      |                      ^~~~
      |                      ;
a.cc:7:1: error: 'Int' does not name a type; did you mean 'int'?
    7 | Int main(){
      | ^~~
      | int
Language: Java

import java.util.Scanner;

public class ABC141CMain {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int q = in.nextInt();
        int[] a = new int[q];
        for(int i=0; i<q; i++) {
            a[i] = in.nextInt();
        }
        int[] b = new int[n];
        for(int i=0; i<n; i++) {
            b[i] = 0;
        }
        for(int i=0; i<q; i++) {
            int winner = a[i]-1;
            b[winner]+=1;
        }
        for(int i=0; i<n; i++) {
            System.out.println(b[i]+k-q>0 ? "Yes" : "No");
        }
    }
}


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

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
template<class T>

int dx[4]={1,-1,0,0};
int dy[4]={0,0,1,-1};

vvi adl_input(int N,int M){ //N頂点M辺
  vvi L(N);
  rep(i,M){
    int a,b;
    cin >> a >> b;
    //a--;b--;
    L[a].push_back(b);
    L[b].push_back(a);
  }
  return L;
}

ll gcd(ll a,ll b){
  if (a%b==0) return(b);
  else return(gcd(b,a%b));
}
ll lcm(ll a,ll b){
  return a*b/gcd(a,b);
}

vector<int> bfs(vvi L,int S){ //List,Start
  vector<int> v(L.size(),-1);
  v[S]=0;
  queue<int> q;
  q.push(S);
  while(!q.empty()){
    int a=q.front();
    q.pop();
    for(int x:L[a]){
      if (v[x]==-1){
        v[x]=v[a]+1;
        q.push(x);
      }
    }
  }
  return v;//startからの距離
}

void initialize(){
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  //cout << fixed << setprecision(15);
}

/////////////////////////////////////////

int main(){
  initialize();
  int N,K,Q;
  cin >> N >> K >> Q;
  int A[N];
  rep(i,N) A[i]=K-Q;
  rep(i,Q){
    int a;
    cin >> a;
    A[a]++;
  }
  rep(i,N){
    cout << (A[i]>0?"Yes":"No") endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:71:32: error: expected ';' before 'endl'
   71 |     cout << (A[i]>0?"Yes":"No") endl;
      |                                ^~~~~
      |                                ;
Language: C++

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

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define long long long

int main(){
    IOS;

    long int n,k,q;
    cin>>n>>k>>q;

	long int val = q;
    vector<long int> v(n,k);
    while(q--){
        long int a;
        cin>>a;
        v[a-1]++;
    }

    for(long int i = 0; i < n; i++){
        v[i] -= val;

Compiler output:
a.cc: In function 'int main()':
a.cc:23:21: error: expected '}' at end of input
   23 |         v[i] -= val;
      |                     ^
a.cc:22:36: note: to match this '{'
   22 |     for(long int i = 0; i < n; i++){
      |                                    ^
a.cc:23:21: error: expected '}' at end of input
   23 |         v[i] -= val;
      |                     ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: Java

import java.util.Scanner;

public class C {

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		int K = scn.nextInt();
		int Q = scn.nextInt();
		int[] A = new int[N];
		for(int i = 0;i < Q;i++) {
			int a = scn.nextInt()-1;
			A[a]++;
		}
		int[] ans = new int[N];
		for(int i = 0;i < N;i++) {
			ans[i] = K -  Q + A[i];
		}

		for(int i = 0;i < N;i++) {
			System.out.println((ans[i] > 0)?"Yes":"No");
		}
	}

}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'p' was not declared in this scope
   13 |                 if(a[i]+p-q>0){
      |                         ^
Language: C++

#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#define N 100020
#define Q 100020
using namespace std;

int a[Q];
int c[N];

int main(void)
{
    int n, k, q;
    int i;

    scanf("%d %d %d", &n, &k, &q);
    for(i = 1; i <= q; i ++)
    {
        scanf("%d", &a[i]);
        ++ c[a[i]];
    }

    for(i = 1; i <= n; i ++)
        puts((q - c[i]) <z k ? "Yes" : "No");

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:26: error: 'z' was not declared in this scope
   26 |         puts((q - c[i]) <z k ? "Yes" : "No");
      |                          ^
Language: C++

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

#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1e9
#define LINF 1e18
typedef long long ll;


int main() {
    int N,M; cin >> N >> M;
    priority_queue<int> A;
    REP(i,N){
        int a; cin >> a;
        A.push(a);
    }

    REP(i,M){
        int a = A.top(); A.pop();
        A.push(a/2);
    }
    
    ll ans = 0;
    while(A.size()>0){
        int a = A.top(); A.pop();
        ans += a;
    }
    cout << ans << endl;
    return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define Rep(i,s,n) for(int i=s;i<n;i++)
#define per(i,s,n) for(int i=n-1;i>=s;i--)
#define fi first
#define se second
#define all(c) c.begin(),c.end()
typedef long long int ll;
typedef pair<int, int> P;
typedef long double ld;
void Ans(bool x){if(x) cout<<"Yes"<<endl;else cout<<"No"<<endl;}

const ll INF=1001001001;
const ll mod=1000000007;

int main(){
  ll n,m;cin>>n>>m;
  ll a;
  priority_queue<ll> q;
  rep(i,n){
    cin>>a;
    q.push(a);
  }
  
  rep(i,k){
    ll now=q.top();
    q.pop();
    now/=2;
    q.push(now);
  }
  ll ans=0;
  
  
  rep(i,n){
    ll now=q.top();
    q.pop();
    ans+=now;
  }
  
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: error: 'k' was not declared in this scope
   26 |   rep(i,k){
      |         ^
a.cc:3:38: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i=0;i<(int)(n);i++)
      |                                      ^
Language: C++

#include <iostream>
#include <math.h> 
#include <vector>
using namespace std;
int N, M;
vector<double> As;
// long long opt[2][100005];
int main(){
    scanf("%d%d", &N, &M);
    for (int i = 1; i<= N; ++i){
        int A;
        scanf("%d",&A);
        As.push_back(double(A));
    }

    make_heap(As.begin(), As.end()); 

    while(M>0){
        double top = As.front() ;
        pop_heap(As.begin(), As.end()); 
        As.pop_back(); 

        As.push_back(top/2); 
      
        // using push_heap() to reorder elements 
        push_heap(As.begin(), As.end());
        M--;
    }

    long long result = 0;
    for(int i = 0; i < As.size();++i)
        result += int(As[i]);

    // for(int i = 0; i <= M; ++i){
    //     opt[0][i] = 0;
    // }

    // for (int i = 1; i<= N; ++i){
    //     for(int j = 0; j <= M; ++j){
    //         opt[i%2][j] = opt[(i-1)%2][0] + As[i];
    //         for(int k = 0; k <= M; ++k){
    //             long long tmp = opt[(i-1)%2][k] + int(As[i]/pow(2,j-k));
    //             if (tmp >= opt[i%2][j])
    //                 break;
    //             opt[i%2][j] = tmp;
    //         }
    //     }
    // }

    printf("%lld\n",result);

}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'make_heap' was not declared in this scope
   16 |     make_heap(As.begin(), As.end());
      |     ^~~~~~~~~
a.cc:20:9: error: 'pop_heap' was not declared in this scope
   20 |         pop_heap(As.begin(), As.end());
      |         ^~~~~~~~
a.cc:26:9: error: 'push_heap' was not declared in this scope
   26 |         push_heap(As.begin(), As.end());
      |         ^~~~~~~~~
Language: C++

int main()
{
    priority_queue<int> Allitems;
    int N, M, Totalprice = 0;
    cin >> N >> M;
    
    for(int i = 0;i < N; i++)
    {
        int A;
        cin >> A;
        Allitems.push(A);
    }
    for(int i = 0;i < M; i++)
    {
        int X = Allitems.top();
        Allitems.pop();
        X = X / 2;
        Allitems.push(X);
    }
    do
    {
        Totalprice += Allitems.top();
        Allitems.pop();
    }
    while(Allitems.size() > 0);
    cout << Totalprice << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'priority_queue' was not declared in this scope
    3 |     priority_queue<int> Allitems;
      |     ^~~~~~~~~~~~~~
a.cc:3:20: error: expected primary-expression before 'int'
    3 |     priority_queue<int> Allitems;
      |                    ^~~
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> N >> M;
      |     ^~~
a.cc:11:9: error: 'Allitems' was not declared in this scope
   11 |         Allitems.push(A);
      |         ^~~~~~~~
a.cc:15:17: error: 'Allitems' was not declared in this scope
   15 |         int X = Allitems.top();
      |                 ^~~~~~~~
a.cc:22:23: error: 'Allitems' was not declared in this scope
   22 |         Totalprice += Allitems.top();
      |                       ^~~~~~~~
a.cc:25:11: error: 'Allitems' was not declared in this scope
   25 |     while(Allitems.size() > 0);
      |           ^~~~~~~~
a.cc:26:5: error: 'cout' was not declared in this scope
   26 |     cout << Totalprice << endl;
      |     ^~~~
a.cc:26:27: error: 'endl' was not declared in this scope
   26 |     cout << Totalprice << endl;
      |                           ^~~~
Language: C++

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

#pragma warning( disable : 4996 )

#define si(n) scanf("%d", &n)
#define sll(n) scanf("%lld", &n)
#define ss(s) scanf("%s", &s)
#define pi(n) printf("%d\n", n)
#define pll(n) printf("%lld\n", n)
#define ps(s) printf("%s\n", s)
#define FOR(i, a, b) for (int i=a;i<=b;i++)

typedef long long ll;



void solve() {
	int n, m;
	cin >> n >> m;
	vector<int> a(n);
	for (auto& i : a) cin >> i;

	sort(a.begin(), a.end(), greater<int>());
	while (m--) {
		a[0] /= 2;

		int i = 0;
		while (i < n - 1 && a[i] < a[i + 1]) {
			int temp = a[i];
			a[i] = a[i + 1];
			a[i + 1] = temp;
			i++;
		}
	
	int sum = 0;
	for (auto& i : a) {
		sum += i;
	}
	cout << sum << endl;
}


int main() {
	solve();
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:44:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   44 | int main() {
      |         ^~
a.cc:44:9: note: remove parentheses to default-initialize a variable
   44 | int main() {
      |         ^~
      |         --
a.cc:44:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:44:12: error: a function-definition is not allowed here before '{' token
   44 | int main() {
      |            ^
a.cc:46:2: error: expected '}' at end of input
   46 | }
      |  ^
a.cc:18:14: note: to match this '{'
   18 | void solve() {
      |              ^
Language: C++

#include <iostream>
using namespace std;
int main (){
  int n,m;
  cin >> n >> m;
  int a,i;
  priority_queue<int>
  for (i=0;i<n;i++){
    cin >> a;
    que.push(a);
  }
  for (i=0;i<m;i++){
    int x=que.top();
    que.pop();
    x=x/2;
    que push(x)
  }
  long long ans;
  for (i=0;i<n;i++){
    int x=que.top();
    que.pop();
    ans+=x;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'priority_queue' was not declared in this scope
    7 |   priority_queue<int>
      |   ^~~~~~~~~~~~~~
a.cc:2:1: note: 'std::priority_queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
    1 | #include <iostream>
  +++ |+#include <queue>
    2 | using namespace std;
a.cc:7:18: error: expected primary-expression before 'int'
    7 |   priority_queue<int>
      |                  ^~~
a.cc:8:19: error: expected ';' before ')' token
    8 |   for (i=0;i<n;i++){
      |                   ^
      |                   ;
a.cc:13:11: error: 'que' was not declared in this scope
   13 |     int x=que.top();
      |           ^~~
a.cc:16:8: error: expected ';' before 'push'
   16 |     que push(x)
      |        ^~~~~
      |        ;
a.cc:20:11: error: 'que' was not declared in this scope
   20 |     int x=que.top();
      |           ^~~
Language: C++

#include <iostream>
using namespace std;
int main (){
  int n,m;
  cin >> n >> m;
  int a,i;
  priority_queue<int>
  for (i=0;i<n;i++){
    cin >> a;
    que.push(a);
  }
  for (i=0;i<m;i++){
    int x=que.top();
    que.pop();
    x=x/2;
    que push(x)
  }
  long long ans;
  for (i=0;i<n;i++){
    int x=quw.top();
    que.pop();
    ans+=x;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'priority_queue' was not declared in this scope
    7 |   priority_queue<int>
      |   ^~~~~~~~~~~~~~
a.cc:2:1: note: 'std::priority_queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
    1 | #include <iostream>
  +++ |+#include <queue>
    2 | using namespace std;
a.cc:7:18: error: expected primary-expression before 'int'
    7 |   priority_queue<int>
      |                  ^~~
a.cc:8:19: error: expected ';' before ')' token
    8 |   for (i=0;i<n;i++){
      |                   ^
      |                   ;
a.cc:13:11: error: 'que' was not declared in this scope
   13 |     int x=que.top();
      |           ^~~
a.cc:16:8: error: expected ';' before 'push'
   16 |     que push(x)
      |        ^~~~~
      |        ;
a.cc:20:11: error: 'quw' was not declared in this scope
   20 |     int x=quw.top();
      |           ^~~
a.cc:21:5: error: 'que' was not declared in this scope
   21 |     que.pop();
      |     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
using vll = vector<vl>;
using Pll = pair<ll, ll>;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(v) v.begin(), v.end()
#define sz(x) ((int) x.size())
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
const int MOD = 1e9+7;
const ll INF = 2e15;
template<class T> void print(const T& t){ cout << t << endl; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}

int main(){
  ll n,m;
  cin >> n >> m;
  vl a(n);
  rep(i,n){
    cin >> a[i];
  }
  sort(all(a));
  while(m>0){
    while(a[n-1]>a[n-2]&&m>0){
      a[n - 1] /= 2;
      m--;
    }
    sort(all(a));
  }
  ll total = 0;
  rep(i, n)
  {
    total += a[i];
  }
  print(total);
}

Compiler output:
a.cc:44:2: error: stray '\16' in program
   44 | }<U+000E>
      |  ^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
using vll = vector<vl>;
using Pll = pair<ll, ll>;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(v) v.begin(), v.end()
#define sz(x) ((int) x.size())
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
const int MOD = 1e9+7;
const ll INF = 2e15;
template<class T> void print(const T& t){ cout << t << endl; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}

int main(){
  ll n,m;
  cin >> n >> m;
  vl a(n);
  rep(i,n){
    cin >> a[i];
  }
  sort(all(a));
  while(m>0){
    while(a[n-1]>a[n-2]&&m>0){
      a[n - 1] /= 2;
      m--;
    }
    sort(all(a));
  }
  ll total = 0;
  rep(i, n)
  {
    total += a[i];
  }
  print(total);
}

Compiler output:
a.cc:40:4: error: stray '\16' in program
   40 |   {<U+000E>
      |    ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e5 + 2;

int main(){
   int n, m;
   cin >> n >> m;
   priority_queue<int> pq;
   for(int i = 1; i <= n; i++){
      cin >> a[i];
      pq.push(a[i]);
   }
  
   while(m--){
     int x = pq.top();
     pq.pop();
     pq.push(x / 2);
   }
  
   ll ans = 0LL;
   while(!pq.empty()){
      ans += pq.top();
      pq.pop();
   }
  
   cout << ans;
 
   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;
using ll = long long;
const int N = 1e5 + 2;

int main(){
   cin >> n >> m;
   priority_queue<int> pq;
   for(int i = 1; i <= n; i++){
      cin >> a[i];
      pq.push(a[i]);
   }
  
   while(m--){
     int x = pq.top();
     pq.pop();
     pq.push(x / 2);
   }
  
   ll ans = 0LL;
   while(!pq.empty()){
      ans += pq.top();
      pq.pop();
   }
  
   cout << ans;
 
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'n' was not declared in this scope
    7 |    cin >> n >> m;
      |           ^
a.cc:7:16: error: 'm' was not declared in this scope; did you mean 'tm'?
    7 |    cin >> n >> m;
      |                ^
      |                tm
a.cc:10:14: error: 'a' was not declared in this scope
   10 |       cin >> a[i];
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e5 + 2;
ll dp[N], a[N], n, m;

ll solve(int idx, int rem){
    if(idx > n)
       return 0LL;
    ll &ans = dp[idx][y];
    if(ans != -1)
       return ans;
    
    ans = 1e18;
    for(int j = 0; j <= min(30, rem); j++){
        ans = min(ans, a[idx] / (1LL << j) + solve(idx + 1, rem - j));
    }
    
    return ans;
}

int main(){
   cin >> n >> m;
   for(int i = 1; i <= n; i++)
      cin >> a[i];
  
   memset(dp, -1, sizeof dp);
  
   ll ans = solve(1, m);
                
   cout << ans << endl;
   return 0;
}

Compiler output:
a.cc: In function 'll solve(int, int)':
a.cc:10:23: error: 'y' was not declared in this scope; did you mean 'yn'?
   10 |     ll &ans = dp[idx][y];
      |                       ^
      |                       yn
Language: C++

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

int main() {

    cin.tie(0);
    ios_base::sync_with_stdio(false);

    int n, m; cin >> n >> m;
    priority_queue<int> q;
    rep(i,n) {int a; cin >> a; q.push(a);}
    rep(i,m) {int a = q.top(); q.pop(); q.push(a/2);}
    long long ans = 0;
    rep(i,n) {ans += q.top(); q.pop();}
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'i' was not declared in this scope
   11 |     rep(i,n) {int a; cin >> a; q.push(a);}
      |         ^
a.cc:11:5: error: 'rep' was not declared in this scope
   11 |     rep(i,n) {int a; cin >> a; q.push(a);}
      |     ^~~
Language: C++


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

int main() {

    cin.tie(0);
    ios_base::sync_with_stdio(false);

    int n, m; cin >> n >> m;
    priority_queue<int> q;
    rep(i,n) {int a; cin >> a; q.push(a);}
    rep(i,m) {int a = q.top(); q.pop(); q.push(a/2);}
    long long ans = 0;
    rep(i,n) {ans += q.top(); q.pop();}
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'i' was not declared in this scope
   12 |     rep(i,n) {int a; cin >> a; q.push(a);}
      |         ^
a.cc:12:5: error: 'rep' was not declared in this scope
   12 |     rep(i,n) {int a; cin >> a; q.push(a);}
      |     ^~~
Language: Java

import java.util.Collections;
import java.util.PriorityQueue;
import java.util.Scanner;

public class Mutiply {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        PriorityQueue<Integer> q = new PriorityQueue<>(Collections.reverseOrder());
        for (int i = 0; i < n; i++) {
            int a = sc.nextInt();
            q.offer(a);
        }

        for (int i = 0; i < m; i++) {
            int a = q.poll();
            q.offer(a/2);
        }

        long res = 0;
        while (!q.isEmpty()) {
            res += (long)q.poll();
        }
        System.out.println(res);
    }
}


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

import java.util.Scanner;

public class Main {
	
	private static Scanner sc;
	
	public static void main (String args[]) {
		sc = new Scanner(System.in);
		//購入する品物数
		int nNum = sc.nextInt();
		//割引券の所持数
		int mNum = sc.nextInt();
		//品物の価格
		int[] priceArray = new int[nNum];
		for (int i = 0; i<nNum; i++) {
			priceArray[i] = sc.nextInt();
		}
		//降順ソート　高い順
		for(int i = 0; i<mNum; i++) {
			int max = 0;
			int maxIndex = 0;
			for(int k=0; k<priceArray.length; k++) {
				if (max<priceArray[k]) {
					max = priceArray[k];
					maxIndex = k;
				}
			}
			priceArray[maxIndex] = priceArray[maxIndex]/2;
		}
		long sum = 0;
		for (int price : priceArray) {
			sum+=price;
		}
		System.out.println(sum);
	}


Compiler output:
Main.java:35: error: reached end of file while parsing
	}
	 ^
1 error