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

#include<bits/stdc++.h>
using namespace std;
 
int main(){
  int n,y;
  cin>>n>>y;
  int a=10000,b=5000,c=1000;
  int ans1,ans2,ans3;
  bool ans=false;
  for(int i=0;i<=n;i++){
    for(int j=0;j<=n;j++){
      for(int k=0;k<=n;k++){
        if((a*i+b*j+c*)==y){
          ans1=i;ans2=j;ans3=k;
          ans=true;
          break;
        }
      }
    }
  }
  if(ans){
    cout<<ans1<<" "<<ans2<<" "<<ans3<<endl;
  }else{
    cout<<-1<<" "<<-1<<" "<<-1<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: expected primary-expression before ')' token
   13 |         if((a*i+b*j+c*)==y){
      |                       ^
Language: C++

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

int main(){
  int n,y;
  cin>>n>>y;
  int a=10000,b=5000,c=1000;
  int ans1,ans2,ans3;
  bool ans=false;
  for(int i=0;i<=n;i++){
    for(int j=0;j<=n;j++){
      for(int k=0;k<=n;k++){
        if((a*i+b*j+c*)==y){
          ans1=i;ans2=j;ans3=k;
          ans=true;
          break;
        }
      }
    }
  }
  if(ans){
    cout<<i<<" "<<j<<" "<<k<<endl;
  }else{
    cout<<-1<<" "<<-1<<" "<<-1<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: expected primary-expression before ')' token
   13 |         if((a*i+b*j+c*)==y){
      |                       ^
a.cc:22:11: error: 'i' was not declared in this scope
   22 |     cout<<i<<" "<<j<<" "<<k<<endl;
      |           ^
a.cc:22:19: error: 'j' was not declared in this scope
   22 |     cout<<i<<" "<<j<<" "<<k<<endl;
      |                   ^
a.cc:22:27: error: 'k' was not declared in this scope
   22 |     cout<<i<<" "<<j<<" "<<k<<endl;
      |                           ^
Language: C++

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

int main() {
  int n,y; cin >> n >> y;
  int c10000 = -1;
  int c5000 = -1;
  int c1000 = -1;
  bool breaking = false;
  for ( int i = 0; i <= n; i++){
    for ( int j = 0; j <= n; j++){
      int k = n - a - b;
      int money = 10000*i + 5000*j + 1000*k;
      if (money == y){
        c10000 = i;
        c5000 = j;
        c1000 = k;
        breaking = true;
        break;
      }
    }
    if(breaking) break;
  }
  cout << c10000 << " " << c5000 << " " << c1000 << endl;
}
        
          
        

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'a' was not declared in this scope
   12 |       int k = n - a - b;
      |                   ^
a.cc:12:23: error: 'b' was not declared in this scope
   12 |       int k = n - a - b;
      |                       ^
Language: C++

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

int main() {
  int n,y; cin >> n >> y;
  int c10000 = -1;
  int c5000 = -1;
  int c1000 = -1;
  bool breaking = false;
  for ( int i = 0; i <= n; i++){
    for ( int j = 0; j <= n; j++){
      int k = n - a - b;
      int money = 10000*i + 5000*j + 1000*k;
      if (total == y){
        c10000 = i;
        c5000 = j;
        c1000 = k;
        breaking = true;
        break;
      }
    }
    if(breaking) break;
  }
  cout << c10000 << " " << c5000 << " " << c1000 << endl;
}
        
          
        

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'a' was not declared in this scope
   12 |       int k = n - a - b;
      |                   ^
a.cc:12:23: error: 'b' was not declared in this scope
   12 |       int k = n - a - b;
      |                       ^
a.cc:14:11: error: 'total' was not declared in this scope
   14 |       if (total == y){
      |           ^~~~~
Language: C++

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

int main() {
  int n,y; cin >> n >> y;
  int c10000,c5000,c1000 = -1;
  bool breaking = false;
  for ( int i = 0; i <= n; i++){
    for ( int j = 0; j <= n; j++){
      int k = n - a - b;
      int money = 10000*i + 5000*j + 1000*k;
      if (total == y){
        c10000 = i;
        c5000 = j;
        c1000 = k;
        breaking = true;
        break;
      }
    }
    if(breaking) break;
  }
  cout << c10000 << " " << c5000 << " " << c1000<< endl;
}
        
          
        

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'a' was not declared in this scope
   10 |       int k = n - a - b;
      |                   ^
a.cc:10:23: error: 'b' was not declared in this scope
   10 |       int k = n - a - b;
      |                       ^
a.cc:12:11: error: 'total' was not declared in this scope
   12 |       if (total == y){
      |           ^~~~~
Language: C++

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

int main() {
  int n,y; cin >> n >> y;
  int c10000,c5000,c1000 = -1;
  bool breaking = false;
  for ( int i = 0; i <= N; i++){
    for ( int j = 0; j <= N; j++){
      int k = n - a - b;
      int money = 10000*i + 5000*j + 1000*k;
      if (total == y){
        c10000 = i;
        c5000 = j;
        c1000 = k;
        breaking = true;
        break;
      }
    }
    if(breaking) break;
  }
  cout << c10000 << " " << c5000 << " " << c1000<< endl;
}
        
          
        

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: 'N' was not declared in this scope
    8 |   for ( int i = 0; i <= N; i++){
      |                         ^
a.cc:10:19: error: 'a' was not declared in this scope
   10 |       int k = n - a - b;
      |                   ^
a.cc:10:23: error: 'b' was not declared in this scope
   10 |       int k = n - a - b;
      |                       ^
a.cc:12:11: error: 'total' was not declared in this scope
   12 |       if (total == y){
      |           ^~~~~
Language: C

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

int main(){
    int N, Y;

    scanf("%d", &N);
    scanf("%d", &Y);

    Y = Y/1000;
    int a = Y - N;
    if(a <= 0){
        printf("-1 -1 -1\n");
        return 0;
    }
    for(int i = 0; i <= a/9.0; i++){
        for(int j = 0; j <= a/4.0; j++){
            if(9*i + 4*j == a){
                if(N - i - j >= 0){
                    printf("%d %d %d",i,j,N - i - j);
                    return 0;
                }
            }
        }
    }
    printf("-1 -1 -1\n");
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  int Y;
  cin >> N >> Y;
  
  for(int i = 0; i <= N ; i++){
      if((10000*i + 5000*((M-1000*N-9000*i)/4000) + 1000*(N - i - (M-1000*N-9000*i)/4000)) == Y){
        cout << i << " " << (M-1000*N-9000*i)/4000 << " " << N - i - (M-1000*N-9000*i)/4000 << endl;
        return 0;
      }
  }
  cout << "-1 -1 -1" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: 'M' was not declared in this scope
    9 |       if((10000*i + 5000*((M-1000*N-9000*i)/4000) + 1000*(N - i - (M-1000*N-9000*i)/4000)) == Y){
      |                            ^
Language: C++

#include <iostream>
using namespace std;

int main() {
    int N, Y;
    cin >> N >> Y;
for (int a = 0; a <= N; ++a) {
　for (int b = 0; b <= N; ++b) {
　　for (int c = 0; c <= N; ++c) {
　　　int total = 10000*a + 5000*b + 1000*c;
　　　if (a + b + c == N && total == Y) {
　　　　// 見つかった！
　　　　cout << a << " " << b << " " << c << endl;
　　　}
　　　cout << -1 << " " << -1 << " " << -1 << endl;
　　}
　}
}
}

Compiler output:
a.cc:8:1: error: extended character 　 is not valid in an identifier
    8 | 　for (int b = 0; b <= N; ++b) {
      | ^
a.cc:9:1: error: extended character 　 is not valid in an identifier
    9 | 　　for (int c = 0; c <= N; ++c) {
      | ^
a.cc:9:1: error: extended character 　 is not valid in an identifier
a.cc:10:1: error: extended character 　 is not valid in an identifier
   10 | 　　　int total = 10000*a + 5000*b + 1000*c;
      | ^
a.cc:10:1: error: extended character 　 is not valid in an identifier
a.cc:10:1: error: extended character 　 is not valid in an identifier
a.cc:11:1: error: extended character 　 is not valid in an identifier
   11 | 　　　if (a + b + c == N && total == Y) {
      | ^
a.cc:11:1: error: extended character 　 is not valid in an identifier
a.cc:11:1: error: extended character 　 is not valid in an identifier
a.cc:12:1: error: extended character 　 is not valid in an identifier
   12 | 　　　　// 見つかった！
      | ^
a.cc:12:1: error: extended character 　 is not valid in an identifier
a.cc:12:1: error: extended character 　 is not valid in an identifier
a.cc:12:1: error: extended character 　 is not valid in an identifier
a.cc:13:1: error: extended character 　 is not valid in an identifier
   13 | 　　　　cout << a << " " << b << " " << c << endl;
      | ^
a.cc:13:1: error: extended character 　 is not valid in an identifier
a.cc:13:1: error: extended character 　 is not valid in an identifier
a.cc:13:1: error: extended character 　 is not valid in an identifier
a.cc:14:1: error: extended character 　 is not valid in an identifier
   14 | 　　　}
      | ^
a.cc:14:1: error: extended character 　 is not valid in an identifier
a.cc:14:1: error: extended character 　 is not valid in an identifier
a.cc:15:1: error: extended character 　 is not valid in an identifier
   15 | 　　　cout << -1 << " " << -1 << " " << -1 << endl;
      | ^
a.cc:15:1: error: extended character 　 is not valid in an identifier
a.cc:15:1: error: extended character 　 is not valid in an identifier
a.cc:16:1: error: extended character 　 is not valid in an identifier
   16 | 　　}
      | ^
a.cc:16:1: error: extended character 　 is not valid in an identifier
a.cc:17:1: error: extended character 　 is not valid in an identifier
   17 | 　}
      | ^
a.cc: In function 'int main()':
a.cc:8:8: error: expected primary-expression before 'int'
    8 | 　for (int b = 0; b <= N; ++b) {
      |        ^~~
a.cc:8:19: error: 'b' was not declared in this scope
    8 | 　for (int b = 0; b <= N; ++b) {
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main(){
    bool x=false;
    int a,b,c;
    int h;
    int N,Y;
    int i,j;
    cin>>N>>Y;
    for(i=0;i<=N;i++){
        for(j=0;j<=N-i;j++){
            h=N-i-j;
            if(Y==10000*i+5000*j+1000*h){
                x=true;
                a=i;
                b=j;
                c=h;
              break;
            }
        }
    }
if(x==true)cout<<c<<" "<<b<<" "<<a;
else cout<<-1<<" "-1<<" "<<-1;
 
return 0;
}
#include<bits/stdc++.h>
using namespace std;
 
int main(){
    bool x=false;
    int a,b,c;
    int h;
    int N,Y;
    int i,j;
    cin>>N>>Y;
    for(i=0;i<=N;i++){
        for(j=0;j<=N-i;j++){
            h=N-i-j;
            if(Y==1000*i+5000*j+10000*h){
                x=true;
                a=i;
                b=j;
                c=h;
              break;
            }
        }
    }
if(x==true)cout<<a<<" "<<b<<" "<<c;
else cout<<-1<<" "-1<<" "<<-1;
 
return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
 
int main(){
    bool x=false;
    int a,b,c;
    int h;
    int N,Y;
    int i,j;
    cin>>N>>Y;
    for(i=0;i<=N;i++){
        for(j=0;j<=N-i;j++){
            h=N-i-j;
            if(Y==10000*i+5000*j+1000*h){
                x=true;
                a=i;
                b=j;
                c=h;
              break;
            }
        }
    }
if(x==true)cout<<c<<" "<<b<<" "<<a;
else cout<<-1<<" "-1<<" "<<-1;
 
return 0;
}
#include<bits/stdc++.h>
using namespace std;
 
int main(){
    bool x=false;
    int a,b,c;
    int h;
    int N,Y;
    int i,j;
    cin>>N>>Y;
    for(i=0;10000*i<=Y;i++){
        for(j=0;5000*j<=Y;j++){
            h=N-i-j;
            if(Y==10000*i+5000*j+1000*h){
                x=true;
                a=i;
                b=j;
                c=h;
            }
        }
    }
if(x==true)cout<<c<<" "<<b<<" "<<a;
else cout<<-1<<" "-1<<" "<<-1;
 
return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
 
int main(){
    bool x=false;
    int a,b,c;
    int h;
    int N,Y;
    int i,j;
    cin>>N>>Y;
    for(i=0;10000*i<Y;i++){
        for(j=0;5000*j<Y;j++){
            h=N-i-j;
            if(Y==10000*i+5000*j+1000*h){
                x=true;
                a=i;
                b=j;
                c=h;
            }
        }
    }
if(x==true)cout<<a<<" "<<b<<" "<<c;
else cout<<-1<<" "-1<<" "<<-1;
 
return 0;
}
#include<bits/stdc++.h>
using namespace std;
 
int main(){
    bool x=false;
    int a,b,c;
    int h;
    int N,Y;
    int i,j;
    cin>>N>>Y;
    for(i=0;10000*i<=Y;i++){
        for(j=0;5000*j<=Y;j++){
            h=N-i-j;
            if(Y==10000*i+5000*j+1000*h){
                x=true;
                a=i;
                b=j;
                c=h;
            }
        }
    }
if(x==true)cout<<a<<" "<<b<<" "<<c;
else cout<<-1<<" "-1<<" "<<-1;
 
return 0;
}


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

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

int main(){
  int N ;
  long long Y ;
  cin >> N >> Y ;
  int a = -1;
  int b = -1;
  int c = -1;
  for(int i=0;i<=N;i++){
    for(int j=0;j<=N-i;j++){
     
        if(10000*i+5000*j+1000*(N-i-j)==Y){
          a = i;
          b = j;
          c = k;
        }
      }
    }
  
  
  cout << a << ' ' << b << ' ' << c << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: 'k' was not declared in this scope
   17 |           c = k;
      |               ^
Language: C++

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

int main(){
	int n, y;
	cin >> n >> y;

	for(int a = 0; a <= n; a++){
		for(int b = 0; b <= n-a; b++){
			int c = n-a-b;
			if(10000*a+5000*b+1000*c == y){
				cout << a << " " << b << " " << c << endl;
				return ;
			}
		}
	}
	cout << "-1 -1 -1" << endl;
}


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

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

int main() {
    int N, Y;
    cin >> N, Y;
    
    int answer = 0;
    
    for (int i=0; i > N; i++) {
                if (i * 10000 + j * 5000 + k * 1000 == Y) {
                    answer++;
                    cout << i << j << k;
                    break;
                }
                
        for (int j=0; j > N; j++) {
                if (i * 10000 + j * 5000 + k * 1000 == Y) {
                    answer++;
                    cout << i << j << k;
                    break;
                }
                
            for (int k=0; k > N; k++) {
                if (i * 10000 + j * 5000 + k * 1000 == Y) {
                    answer++;
                    cout << i << j << k;
                    break;
                }
            }
        }
    }
    
    if (answer == 0) cout << -1 << " " << -1 << " " << -1; 

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: 'j' was not declared in this scope
   11 |                 if (i * 10000 + j * 5000 + k * 1000 == Y) {
      |                                 ^
a.cc:11:44: error: 'k' was not declared in this scope
   11 |                 if (i * 10000 + j * 5000 + k * 1000 == Y) {
      |                                            ^
a.cc:18:44: error: 'k' was not declared in this scope
   18 |                 if (i * 10000 + j * 5000 + k * 1000 == Y) {
      |                                            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N
  long long Y;
  cin >> N >> Y;
  
  int a = 10000;
  int b = 5000;
  int c = 1000;
  int count_a=0;
  int count_b = 0;
  int  count_c = 0;
 
  count_a = Y / a;
  Y =Y % a;
  count_b = Y / b;
  Y = Y % b;
  count_c = Y / c;
  Y = Y % c;
  if ( (count_a + count_b + count_c ) > N ||  Y != 0 ){
    cout << "-1 -1 -1" << endl;
  } else {
    cout << count_a << " " << count_b << " " << count_c <<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: expected initializer before 'long'
    5 |   long long Y;
      |   ^~~~
a.cc:6:10: error: 'N' was not declared in this scope
    6 |   cin >> N >> Y;
      |          ^
a.cc:6:15: error: 'Y' was not declared in this scope
    6 |   cin >> N >> Y;
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N
  int64_t Y;
  cin >> N >> Y;
  
  int a = 10000;
  int b = 5000;
  int c = 1000;
  int count_a=0;
  int count_b = 0;
  int  count_c = 0;
 
  count_a = Y / a;
  Y =Y % a;
  count_b = Y / b;
  Y = Y % b;
  count_c = Y / c;
  Y = Y % c;
  if ( (count_a + count_b + count_c ) > N ||  Y != 0 ){
    cout << "-1 -1 -1" << endl;
  } else {
    cout << count_a << " " << count_b << " " << count_c <<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: expected initializer before 'int64_t'
    5 |   int64_t Y;
      |   ^~~~~~~
a.cc:6:10: error: 'N' was not declared in this scope
    6 |   cin >> N >> Y;
      |          ^
a.cc:6:15: error: 'Y' was not declared in this scope
    6 |   cin >> N >> Y;
      |               ^
Language: C++

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

int main(){
    int N;
    long long Y;
    cin >> N;
    cin >> Y;
    bool found = false;
    for(int i = 0; i <= N; i++){
        for(int j = 0; j <= N - i; j++){    
                if(Y == 10000*i + 5000*j + 1000*(N - i - j)){
                    found = true;
                    cout << i << " " << j << " " << k <<endl;
                    break;
                }
        }
        if(found){
            break;
        }
    }
    if(found == false){
        cout << -1 << " " << -1 << " " << -1 <<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:53: error: 'k' was not declared in this scope
   14 |                     cout << i << " " << j << " " << k <<endl;
      |                                                     ^
Language: C++

int main(){
    int N;
    long long Y;
    cin >> N;
    cin >> Y;
    bool found = false;
    for(int i = 0; i < N; i++){
        for(int j = 0; j < N - i; j++){
            for(int k = 0; k < N - i -j; k++){
                if(Y == 10000*i + 5000*j + 1000*k){
                    found = true;
                    cout << i << " " << j << " " << k <<endl;
                    break;
                }
            }
            if(found){
                break;
            }
        }
        if(found){
            break;
        }
    }
    if(!found){
        cout << -1 << " " << -1 << " " << -1 <<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> N;
      |     ^~~
a.cc:12:21: error: 'cout' was not declared in this scope
   12 |                     cout << i << " " << j << " " << k <<endl;
      |                     ^~~~
a.cc:12:57: error: 'endl' was not declared in this scope
   12 |                     cout << i << " " << j << " " << k <<endl;
      |                                                         ^~~~
a.cc:25:9: error: 'cout' was not declared in this scope
   25 |         cout << -1 << " " << -1 << " " << -1 <<endl;
      |         ^~~~
a.cc:25:48: error: 'endl' was not declared in this scope
   25 |         cout << -1 << " " << -1 << " " << -1 <<endl;
      |                                                ^~~~
Language: C++

int main(){
    int N;
    long long Y;
    cin >> N >> Y;
    bool found = false;
    for(int i = 0; i < N; i++){
        for(int j = 0; j < N - i; j++){
            for(int k = 0; k < N - i -j; k++){
                if(Y == 10000*i + 5000*j + 1000*k){
                    found = true;
                    cout << i << " " << j << " " << k;
                    break;
                }
            }
            if(found){
                break;
            }
        }
        if(found){
            break;
        }
    }
    if(!found){
        cout << -1 << " " << -1 << " " << -1;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> N >> Y;
      |     ^~~
a.cc:11:21: error: 'cout' was not declared in this scope
   11 |                     cout << i << " " << j << " " << k;
      |                     ^~~~
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout << -1 << " " << -1 << " " << -1;
      |         ^~~~
Language: C++

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

int main(){
    int N;
    long long Y;
    cin >> N >> Y;
    bool found = false
    for(int i = 0; i < N; i++){
        for(int j = 0; j < N - i; j++){
            for(int k = 0; k < N - i -j; k++){
                if(Y == 10000*i + 5000*j + 1000*k){
                    found = true;
                    cout << i << " " << j << " " << k;
                    break;
                }
            }
            if(found){
                break;
            }
        }
        if(found){
            break;
        }
    }
    if(!found){
        cout << -1 << " " << -1 << " " << -1;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'for'
    9 |     for(int i = 0; i < N; i++){
      |     ^~~
a.cc:9:20: error: 'i' was not declared in this scope
    9 |     for(int i = 0; i < N; i++){
      |                    ^
Language: C++

int main()
{
    int bc,ta;
    cin >> bc >> ta;
    for (int yc = 0; yc <= bc; yc++) {
        for (int hc = 0; yc + hc <= bc; hc++) {
            int nc = bc - yc - hc;
            if (10000 * yc + 5000 * hc + 1000 * nc == ta ) {
                cout << yc << " " << hc << " " << nc << endl;
                return 0;
            }
        }
    }
    
    cout << "-1 -1 -1" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> bc >> ta;
      |     ^~~
a.cc:9:17: error: 'cout' was not declared in this scope
    9 |                 cout << yc << " " << hc << " " << nc << endl;
      |                 ^~~~
a.cc:9:57: error: 'endl' was not declared in this scope
    9 |                 cout << yc << " " << hc << " " << nc << endl;
      |                                                         ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << "-1 -1 -1" << endl;
      |     ^~~~
a.cc:15:27: error: 'endl' was not declared in this scope
   15 |     cout << "-1 -1 -1" << endl;
      |                           ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
    int bc,ta;
    string result = "";
    cin >> bc >> ta;
    for (int yc = 0; yc < bc; yc++) {
        for (int hc = 0; hc < bc; hc++) {
            int nc = bc - yc - hc;
            if (10000 * yc + 5000 * hc + 1000 * nc == ta ) {
                result = strcat(yc, " ", hc, " ", nc);
            }
        }
    }
    if (empty(result)) {
        cout << "-1 -1 -1" << endl;
    } else {
        cout << result << endl;
    }
   
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:33: error: invalid conversion from 'int' to 'char*' [-fpermissive]
   13 |                 result = strcat(yc, " ", hc, " ", nc);
      |                                 ^~
      |                                 |
      |                                 int
a.cc:13:32: error: too many arguments to function 'char* strcat(char*, const char*)'
   13 |                 result = strcat(yc, " ", hc, " ", nc);
      |                          ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:149:14: note: declared here
  149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src)
      |              ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
    int bc,ta;
    string result = "";
    cin >> bc >> ta;
    for (int yc = 0; yc < bc; yc++) {
        for (int hc = 0; hc < bc; hc++) {
            int nc = bc - yc - hc;
            if (10000 * yc + 5000 * hc + 1000 * nc == $ta ) {
                result = strcat(yc, " ", hc, " ", nc);
            }
        }
    }
    if (empty(result)) {
        cout << "-1 -1 -1" << endl;
    } else {
        cout << result << endl;
    }
   
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:55: error: '$ta' was not declared in this scope; did you mean 'ta'?
   12 |             if (10000 * yc + 5000 * hc + 1000 * nc == $ta ) {
      |                                                       ^~~
      |                                                       ta
a.cc:13:33: error: invalid conversion from 'int' to 'char*' [-fpermissive]
   13 |                 result = strcat(yc, " ", hc, " ", nc);
      |                                 ^~
      |                                 |
      |                                 int
a.cc:13:32: error: too many arguments to function 'char* strcat(char*, const char*)'
   13 |                 result = strcat(yc, " ", hc, " ", nc);
      |                          ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:149:14: note: declared here
  149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src)
      |              ^~~~~~
Language: C++

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
#include <map>
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;

int main() {
	int n, y;
	cin >> n >> y;
	int k=0, l=0, m=0;
	int ans = 0;
	for (int k= 0; k <= n; k++){
		if (10000 * k >= y) break;
		for (int l = 0; l <= n; l++) {
			int m = n - k - l;
			if (m>=0 && m<=n && y == 10000 * k + 5000 * l + 1000 * m) {
				ans++;
				cout << k <<" "<< l <<" "<< m << endl;
				goto label;
			}
		}
	}
	label:;
	if (ans == 0) cout << -1 << " " << -1 << " " << -1 << endl;
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:29:18: error: expected '}' at end of input
   29 |         return 0;
      |                  ^
a.cc:11:12: note: to match this '{'
   11 | int main() {
      |            ^
Language: Java

import java.io.*;

public class Otoshidama {
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String input = br.readLine();
        int notes = Integer.parseInt(input.substring(0,input.indexOf(" ")));
        input = input.substring(input.indexOf(" ") + 1);
        int money_l = Integer.parseInt(input);
        int money = money_l/1000;
        String result = "-1 -1 -1";


        if(notes<=money && money<=notes*10){//too much notes or too much mooney
            OUTSIDE:for(int x = 0; x<=notes; x++){
                if(money > x*10 + (notes-x)*5){continue;}
                else if(x*10>money){break;}
                else if(x*10 <= money){
                    for(int y = 0; y<=notes-x; y++){
                        if(money > x*10 + y*5 + (notes-x-y)){continue;}
                        else if(x*10 + y*5 > money){break;}
                        else if(x*10 + y*5 <= money){
                            result = String.valueOf(x) + " " + String.valueOf(y) + " " + String.valueOf(notes-x-y);
                            break OUTSIDE;
                        }
                    }
                }
            }
        }
    System.out.println(result);
    }
}

Compiler output:
Main.java:3: error: class Otoshidama is public, should be declared in a file named Otoshidama.java
public class Otoshidama {
       ^
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 Y = sc.nextInt();
        Y/1000;
        int a10000 = -1;
        int a5000  = -1;
        int a1000  = -1;
        int flag   = 0;
      
	    for(int i=0; i<=N; i++){
          for(int j=0; j<=N; j++){
            int c = N-i-j;
            int M = 10*i + 5*j + c;
            if(M == Y){
              a10000 = i;
              a5000  = j;
              a1000  = c;
              flag   = 1;
              break;
            }
            if(flag == 1){
              break;
            }
          }
        }
		System.out.println(a10000+" "+a5000+" "+a1000);
    }
}


Compiler output:
Main.java:7: error: not a statement
        Y/1000;
         ^
1 error
Language: C++


#include <iostream>

using namespace std;

int main() {
	int N, Y, num, y, z;
	scanf_s("%d %d", &N, &Y);

	Y /= 1000;
	const int V = Y - N;
	if (Y - N < 0) {
		printf("-1 -1 -1\n");
		return 0;
	}

	for (int x = N; x >= 0; --x) {
		num = V - 9 * x;
		if (num % 4 == 0 && num >= 0) {
			y = num / 4;
			z = N - x - y;
			if (z < 0) continue;
			else {
				printf("%d %d %d\n", x, y, N - x - y);
				return 0;
			}
		}
	}

	printf("-1 -1 -1\n");
	return 0;

}


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

#include <bits/stdc++.h>
using namespace std;
int main(){
int N,Y;
  cin>>N>>Y;
 int yukiti=-1,hiyou=-1,hide=-1;
for(int i=0;i<=N;i++){
	for(int j=0;i+j<=N;j++){
    	int k=N-i-j;
      	int total = 10000*i + 5000*j + 1000*k;
      	if(total == Y){
        yukiti=i;
         hiyou=j;
         hide=k; 
        }
    }
}  
  
cout<<yukiti<<" "<<hiyou<<" "<<hide;
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:19:37: error: expected '}' at end of input
   19 | cout<<yukiti<<" "<<hiyou<<" "<<hide;
      |                                     ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

int main() {
    int N, Y;
    cin >> N >> Y;
    int res10000 = -1, res5000 = -1, res1000 = -1;
    for (int a = 0; a <= N; ++a) {  
        for (int b = 0; b + a <= N; ++b) { 
            int c = N - a - b;  
            int total = 10000*a + 5000*b + 1000*c;
            if (total == Y) {  
                res10000 = a;
                res5000 = b;
                res1000 = c;
            }
        }
    }

    
    cout << res10000 << " " << res5000 << " " << res1000 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:21:66: error: expected '}' at end of input
   21 |     cout << res10000 << " " << res5000 << " " << res1000 << endl;
      |                                                                  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ALL(obj) obj.begin(),obj.end()
#define pb(obj) push_back(obj)
#define REP(i,N) for(int i=0;i<N;i++)
typedef long long ll;
ll const MOD=1e9+7;
using ll = long long;

int main(){
  int n,y;
  cin>>n>>y;
  REP(i,n+1){
    REP(j,n-i+1){
      if(n==10000*i+5000*j+1000*(n-i-j)){
        cout<<i<<" "<<j<<" "<<n-i-j<<endl;
        return 0;
      } 
      else if(i==n&&){
        cout<<"-1 -1 -1"<<endl;
        return 0;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:21: error: expected primary-expression before ')' token
   19 |       else if(i==n&&){
      |                     ^
Language: C++

#include <stdio.h>
#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>

using namespace std;

int main(void) {
  int N, Y;
  cin >> N >> Y;
  
  for (int i = 0;i <= N;i++) {
    for (int ii = 0; ii <= N - i;ii++) {
      iii = N - i - ii;
      if (10000 * i + 5000 * ii + 1000 * iii == Y) {
        cout << i << " " << ii << " " << iii << endl;
        return 0;
      }
    }
  }
  
  cout << -1 << " " << -1 << " " << -1 << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: 'iii' was not declared in this scope; did you mean 'ii'?
   16 |       iii = N - i - ii;
      |       ^~~
      |       ii
Language: C++

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

int main() {
    int N,Y;
    cin >> N>>Y;
    for (int i = 0; i < 2001; i++)
    {
        for (int j = 0; j < 2001; j++)
        {
            if (9000*i+4000*j+1000*N=Y)
            {
                cout << i << j << N-i-j<<endl;
                return 0;
            }
            
        }
        
    }
    cout << -1 << -1 <<-1 <<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: lvalue required as left operand of assignment
   12 |             if (9000*i+4000*j+1000*N=Y)
      |                 ~~~~~~~~~~~~~^~~~~~~
Language: C++

using namespace std;
#include <bits/stdc++.h>
#define rep(i, s) for (int i = 0; i < s; ++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(v) (v.begin(), v.end())
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define VEC(a, n) vector<int>a(n)
#define VECV(a,n,m) vector<vector<int>> a(n, vector<int>(m));
#define PQ(a) priority_queue<int>a
#define PQmin(a) priority_queue< int, :vector<int>, greater<int> >a
#define PAIR pair<int, int>
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define EPS (1e-7)
#define INF (1e10)
#define PI (acos(-1))
const ll mod = 1000000007;
bool f(string s){
  bool ans=true;
  rep(i,s.size()/2){
    if(s[i]!=s[s.size()/2+i]){
      ans=false;
      break;
    }
  }
  return ans;
}
int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  ll Y;
  cin>>N>>Y;
  rep(i,N){
  	rep(j,N-i){
    	if(10000*i+5000*j+1000*(N-i-j)==Y){
        	cout<<i<<" "<<j<<" "<<N-i-j<<endl;
            return;
        }
    }
  }
}


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

using namespace std;
#include <bits/stdc++.h>
#define rep(i, s) for (int i = 0; i < s; ++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(v) (v.begin(), v.end())
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define VEC(a, n) vector<int>a(n)
#define VECV(a,n,m) vector<vector<int>> a(n, vector<int>(m));
#define PQ(a) priority_queue<int>a
#define PQmin(a) priority_queue< int, :vector<int>, greater<int> >a
#define PAIR pair<int, int>
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define EPS (1e-7)
#define INF (1e10)
#define PI (acos(-1))
const ll mod = 1000000007;
bool f(string s){
  bool ans=true;
  rep(i,s.size()/2){
    if(s[i]!=s[s.size()/2+i]){
      ans=false;
      break;
    }
  }
  return ans;
}
int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  ll Y;
  cin>>N>>Y;
  rep(i,N){
  	rep(j,N-i){
    	if(10000*i+5000*j+1000*(N-i-j)==Y)
        	cout<<i<<" "<<j<<" "<<N-i-j<<endl;
            return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
   40 |             return;
      |             ^~~~~~
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:36:11: note: to match this '{'
   36 |   rep(i,N){
      |           ^
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:30:11: note: to match this '{'
   30 | int main(){
      |           ^
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 Y = sc.nextInt();
        
        loop: for(int x=0; x<=N; x++){
          for(int y=0; y<=N-x; y++){
            int z = N-x-y;
            if(10000*x+5000*y+1000*z==Y){
              System.out.println(x + " " + y + " " + z);
              break loop;
            }
          }
          if(X==N){
            System.out.println("-1 -1 -1");
          }
        }
            
    }
}

Compiler output:
Main.java:16: error: cannot find symbol
          if(X==N){
             ^
  symbol:   variable X
  location: class Main
1 error
Language: C++

#include<bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
typedef vector<int,int> vii
const int mod = 1000000007;
using namespace std;
int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n,y,total=0;
    cin>>n>>y;
    for(int i = 0; 10000*i <=y;i++){
        total = 10000*i;
        int cpy2 = total;
        for(int j =0;10000*i + 5000*j <=y;j++){
            total+=5000*j;
            int cpy1 = total;
            for(int k =0;10000*i + 5000*j + 1000*k <=y;k++){
                total+=1000*k;
                if(total==y){
                    cout<<i<<" "<<j<<" "<<k<<endl;
                    return 0;
                }
                total = cpy1;
            }
            total=cpy2;
        }
    }
    cout<<"-1 -1 -1"<<<endl;













}







Compiler output:
a.cc:7:9: error: 'vector' does not name a type
    7 | typedef vector<int,int> vii
      |         ^~~~~~
a.cc: In function 'int32_t main()':
a.cc:32:23: error: expected primary-expression before '<' token
   32 |     cout<<"-1 -1 -1"<<<endl;
      |                       ^
Language: C++

#define mp make_pair
#define all(x) x.begin(), x.end()
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
typedef vector<int,int> vii
const int mod = 1000000007;
using namespace std;
int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n,y,total=0;
    cin>>n>>y;
    for(int i = 0; 10000*i <=y;i++){
        total = 10000*i;
        int cpy2 = total;
        for(int j =0;10000*i + 5000*j <=y;j++){
            total+=5000*j;
            int cpy1 = total;
            for(int k =0;10000*i + 5000*j + 1000*k <=y;k++){
                total+=1000*k;
                if(total==y){
                    cout<<i<<" "<<j<<" "<<k<<endl;
                    return 0;
                }
                total = cpy1;
            }
            total=cpy2;
        }
    }
    cout<<"-1 -1 -1"<<<endl;



Compiler output:
a.cc:4:9: error: 'vector' does not name a type
    4 | typedef vector<int,int> vii
      |         ^~~~~~
a.cc:7:1: error: 'int32_t' does not name a type
    7 | int32_t main() {
      | ^~~~~~~
a.cc:1:1: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
  +++ |+#include <cstdint>
    1 | #define mp make_pair
Language: C++

import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int a = -1;
        int b = -1;
        int c = -1;
        for (int i = 0; i <= n; i++) {
            for (int j = 0; j <= n - i; j++) {
                int j2 = n - (i + j);
                int total = 10000 * i + 5000 * j + 1000 * j2;
                if (total == y) {
                    a = i;
                    b = j;
                    c = j2;
                    break;
                }
            }
        }
        String result = a + " " + b + " " + c;

        // 出力
        System.out.println(result);
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++


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

#define ll long long
#define vecll vector<long long>
#define vec2ll vector<vector<long long>>
#define vecbool vector<bool>
#define vecpairll vector<pair<long long,long long>>
#define forll(s,a,b) for(long long s = a;s < b;s++)
#define forllde(s,a) for(long long s = a;s > 0;s--)


int main()
{
  ll n, y, a, b, c;
  cin >> n >> y;
  for(int i=0; 10000*i<=y; i++){
	for(int j=0; 5000*j<=y; j++){
	  if(i*10000+j*5000+(n-i-j)*1000==y && n-i-j>=0){
		a=i;
		b=j;
		c=x-i-j;
		break;
	  }
	}
  }
  cout << a << " " << b << " " << c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:19: error: 'x' was not declared in this scope
   23 |                 c=x-i-j;
      |                   ^
Language: Java

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int Y = sc.nextInt();

        for (int a=0; a<=N; a++) {
            for (int b=0; b<=N-a; b++) {
                int c = N - a - b;
                int total = a * 10000 + b * 5000 + c * 1000;
                if (total == Y) {
                    System.out.println(a + " " + b + " " + c);
                    return;
                }
            }
        }

        System.out.println("-1 -1 -1");
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

int main(){
    int64_t c,N,Y;
    cin >> N >>Y;

    int ans10000=-1,ans5000=-1,ans1000=-1;
    for(int a=0;a<=N;a++){
        for(int b=0;b<=N;b++){
            c=N-a-b;
            if(10000*a+5000*b+1000*c==Y){
                ans10000=a;
                ans5000=b;
                ans1000=c;
            }
        }
    }

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

#include <iostream>
#include <algorithm>

using namespace std;

bool find ( int x, int y, int &a, int &b, int &c, int aa = 0, int bb=0, int cc = 0) {
  if ( x == 0 && aa+bb+cc == y )  {
    a = aa;
    b = bb;
    c = cc;
    return true;
  }
  if ( aa+bb+cc > y ) return false;

  if ( x < 0 )  return false;

  if ( find(x-10000, y, a, b, c, aa+1, bb, cc) ) {
    return true;
  }

  if ( find(x-5000, y, a, b, c, aa, bb+1, cc) ) {
    return true;
  }

  if ( find(x-1000, y, a, b, c, aa, bb, cc+1) {
    return true;
  }

  if ( aa+bb+cc == 0 ) {
    a = b = c = -1;
    return false;
  }
}


int main()
{
  int X,Y;
  int &a, &b, &c;

  cin >> Y >> X;

  find(X,Y, a,b,c);

  cout << a <<" " << b << " " << c << "\n";
}


Compiler output:
a.cc: In function 'bool find(int, int, int&, int&, int&, int, int, int)':
a.cc:25:46: error: expected ')' before '{' token
   25 |   if ( find(x-1000, y, a, b, c, aa, bb, cc+1) {
      |      ~                                       ^~
      |                                              )
a.cc:33:1: error: expected primary-expression before '}' token
   33 | }
      | ^
a.cc: In function 'int main()':
a.cc:39:8: error: 'a' declared as reference but not initialized
   39 |   int &a, &b, &c;
      |        ^
a.cc:39:12: error: 'b' declared as reference but not initialized
   39 |   int &a, &b, &c;
      |            ^
a.cc:39:16: error: 'c' declared as reference but not initialized
   39 |   int &a, &b, &c;
      |                ^
a.cc: In function 'bool find(int, int, int&, int&, int&, int, int, int)':
a.cc:33:1: warning: control reaches end of non-void function [-Wreturn-type]
   33 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using ll=long long;
using namespace std;
int main(){
  ll N,Y;
  cin>>N>>Y;
  int flag=0;
  for(int i=0;i<=N;i++){
    for(int j=0;j<=N-i;j++){
        k=N-i-j;
        if(k<0) continue;
        ll ans=10*i+5*j+k;
        if(1000*ans==Y){
          cout<<i<<" "<<j<<" "<<k<<endl;
          flag=1;
          return 0;
        }
    }
  }
  if(flag==0){
    cout<<-1<<" "<<-1<<" "<<-1<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'k' was not declared in this scope
   10 |         k=N-i-j;
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,s;
  cin>>n>>s;
  int x=-1,y=-1,z=-1;
  for(int i=0;i<=n;i++){
    for(int j=0;j<=n;j++){
      int z=10000*i+5000*j+1000(n-j-i);
        if(z==s){
          x=n-i-j;
          y=j;
          z=i;
          break;
        }      
    }
  }
  cout<<x<<" "<<y<<"" ""<<z<<endl;
}

  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: expression cannot be used as a function
    9 |       int z=10000*i+5000*j+1000(n-j-i);
      |                            ~~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,s;
  cin>>n>>s;
  int x=-1,y=-1,z=-1;
  for(int i=0;i<=n;i++){
    for(j=0;j<=n;j++){
      int z=10000*i+5000*j+1000(n-j-i);
        if(z==s){
          x=n-i-j;
          y=j;
          z=i;
          break;
        }      
    }
  }
  cout<<x<<" "<<y<<"" ""<<z<<endl;
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'j' was not declared in this scope
    8 |     for(j=0;j<=n;j++){
      |         ^
a.cc:9:38: error: expression cannot be used as a function
    9 |       int z=10000*i+5000*j+1000(n-j-i);
      |                                      ^
Language: C++

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

typedef pair<int,int> P;
#define ll long long
#define ld long double
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
#define sz(x) ((int)(x).size())
#define chmin(x,y) x = min(x,y)
#define chmax(x,y) x = max(x,y)

const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
int main()
{
    int n
    ll otoshi;
    cin >> n >> otoshi;
    ll sum = 0;
    for (int x = 0; x <= n; x++)
    {
        for (int y = 0; y <= n; y++)
        {
            int z = n-x-y;
            sum = 10000*(ll)x+5000*(ll)y+1000*(ll)z;
            if(sum == otoshi)
            {
                cout << x << " " << y << " " << z << " " << endl;
                return 0;
            }
        }
    }
    cout << -1 << " " << -1 << " " << -1 << " " << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: expected initializer before 'long'
    5 | #define ll long long
      |            ^~~~
a.cc:19:5: note: in expansion of macro 'll'
   19 |     ll otoshi;
      |     ^~
a.cc:20:12: error: 'n' was not declared in this scope; did you mean 'yn'?
   20 |     cin >> n >> otoshi;
      |            ^
      |            yn
a.cc:20:17: error: 'otoshi' was not declared in this scope
   20 |     cin >> n >> otoshi;
      |                 ^~~~~~
Language: Java

import java.util.Scanner;

public class Atcoader {

	public static void main(String[] args) {
		int total;
		int sen = -1, gosen = -1, man = -1;
		boolean judge = false;

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int Y = sc.nextInt();

		for(int i = 0; i < N; i++) {
			for(int j = 0; i+j < N; j++) {
				total = i*1000 + j*5000 + (N-i-j)*10000;
				if(total == Y) {
					judge = true;
					sen = i;
					gosen = j;
					man = N-i-j;
				}
			if(judge) break;
			}
		if(judge) break;
		}
	System.out.println(man + " " + gosen + " " + sen);
	sc.close();
	}

}

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

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

int main()
{
  int N, Y;
  cin >> N >> Y;
  
  int a, b, c;
  
  flag = true;
  for (int a = 0; a < N; a++) {
    for (int b = 0; b < N ; b++) {
      if (10000 * a + 5000 * b + 1000 * (N-a-b) == Y) {
        cout << a << b << N-a-b << endl;
        return 0;
      }
    }
  }
  if (flag) cout << -1 << -1 << -1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'flag' was not declared in this scope
   11 |   flag = true;
      |   ^~~~