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

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

int main() {
  int N, Y, X, Y, Z, ; cin >> N >> Y;
  
  for(int A=0; A<=X; A++){
    for(int B=0; B<=Y; B++){
      
      if(10000*A+5000*B+(N-A-B)*1000=Y){
        cout << A << " " << B << " " << N-A-B << endl;
        break;
      }
      else {cout << -1 << " " << -1 << " " << -1 << endl;
      break;
           }
    }
  }
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: redeclaration of 'int Y'
    5 |   int N, Y, X, Y, Z, ; cin >> N >> Y;
      |                ^
a.cc:5:10: note: 'int Y' previously declared here
    5 |   int N, Y, X, Y, Z, ; cin >> N >> Y;
      |          ^
a.cc:5:22: error: expected unqualified-id before ';' token
    5 |   int N, Y, X, Y, Z, ; cin >> N >> Y;
      |                      ^
a.cc:10:24: error: lvalue required as left operand of assignment
   10 |       if(10000*A+5000*B+(N-A-B)*1000=Y){
      |          ~~~~~~~~~~~~~~^~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <queue>

using namespace std;

void ABC085C()
{
	int N;
	long long int Y;
	cin >> N >> Y;

	Y /= 1000;
	int YY = static_cast<int>(Y);
	int nA = YY / 10;
	int res1 = YY - nA * 10;
	int nB = res1 / 5;
	int nC = res1 - 5 * nB;
	int n = nA + nB + nC;
	if (n > N)
	{
		cout << "-1 -1 -1" << endl;
		return;
	}

	int nRes = N - n;
	if (nRes > 0)
	{
		int x = min(nA, nRes);
		nA -= x;
		nB += 2 * x;
		n += x;
	}
	nRes = N - n;
	if (nRes > 0)
	{
		int m = (nRes  + 3)/ 4;
		if (m > nB)
		{
			cout << "-1 -1 -1" << endl;
			return;
		}
		nB -= m;
		nC += 5 * m;
		n += 4 * m;
	}
	if (n > N)
	{
		int res = n - N;
		if (nB < res * 2)
		{
			cout << "-1 -1 -1" << endl;
			return;
		}
		nB -= res * 2;
		nA += res;
	}
	cout << nA << ' ' << nB << ' ' << nC << endl;

	// Check
//	cout << nA + nB + nC << ' ' << nA * 10 + nB * 5 + nC << endl;
}

int main()
{
	ARC085C();
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:73:9: error: 'ARC085C' was not declared in this scope; did you mean 'ABC085C'?
   73 |         ARC085C();
      |         ^~~~~~~
      |         ABC085C
Language: C++

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <queue>

using namespace std;

void ABC085C()
{
	int N;
	long long int Y;
	cin >> N >> Y;

	Y /= 1000;
	int YY = static_cast<int>(Y);
	int nA = YY / 10;
	int res1 = YY - nA * 10;
	int nB = res1 / 5;
	int nC = res1 - 5 * nB;
	int n = nA + nB + nC;
	if (n > N)
	{
		cout << "-1 -1 -1" << endl;
		return;
	}

	int nRes = N - n;
	if (nRes > 0)
	{
		int x = min(nA, nRes);
		nA -= x;
		nB += 2 * x;
		n += x;
	}
	nRes = N - n;
	if (nRes > 0)
	{
		int m = (nRes  + 3)/ 4;
		if (m > nB)
		{
			cout << "-1 -1 -1" << endl;
			return;
		}
		nB -= m;
		nC += 5 * m;
		n += 4 * m;
	}
	if (n > N)
	{
		int res = n - N;
		if (nB < res * 2)
		{
			cout << "-1 -1 -1" << endl;
			return;
		}
		nB -= res * 2;
		nA += res;
	}
	cout << nA << ' ' << nB << ' ' << nC << endl;

	// Check
//	cout << nA + nB + nC << ' ' << nA * 10 + nB * 5 + nC << endl;
}
int main()
{
	ARC061C();
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:72:9: error: 'ARC061C' was not declared in this scope
   72 |         ARC061C();
      |         ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#include <cmath>
using namespace std;
bool is_int_lround(double x){
  return std::lround(x)==x;
}
int ketasuu(int x){
  int n=0;
  while(x>0){
    x /=10 ;
    n ++;
  }
  return n;
}

int main(){
  int N,Y;
  cin >>N >>Y;
  bool ans =true;
  for(int i =0; i<=N ;i++){
    for(int j=0; j <=N; j++){
      if( N-i-j>=0 &&1000*N + 9000*i +4000*j ==Y){
        cout<< i <<" " << j << " "<<N-i-j <<endl;
        ans =false;
        
      }
      if(ans){
        continue;
      }
      else{
        break;
      }
      
    }
    if(ans){
      continue;
    }
    else{
        break;
    }  
  }
  if(ans){
    cout<<-1<<" "<<-1<< <<" "<<-1<<endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:25: error: expected primary-expression before '<<' token
   44 |     cout<<-1<<" "<<-1<< <<" "<<-1<<endl;
      |                         ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define  rep(i, n) for(int i = 0; i < n; i++) 
#define  all(x) (x).begin(),(x).end()     // 昇順ソート
#define  rall(v) (v).rbegin(), (v).rend() // 降順ソート
#define  INF 1LL << 60
typedef long long int LL;
const int MOD = 1000000007;
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return true; } return false; }
//sort(all(x))とするとソートできるよ
// 10^x は pow(10,(x)) 
// 任意のlogは　対数の底の変換を使う    log(N) / log(任意の底)

int main(){
    int N;cin >> N;
    LL Y;cin >> Y;
    int a = -1;
    int b = -1;
    int c = -1;
    LL ans;
    bool ok = false;
/*
    if(1000*N == Y){
        a = 0;
        b = 0;
        c = N;
    }
    else if(5000*N == Y){
        a = 0;
        b = N;
        c = 0;
    }
    else if(10000*N == Y){
        a = N;
        b = 0;
        c = 0;
    }

    else */if(1000*N =< Y){
        rep(i,N) {
            rep(j,N-i){
                ans = 10000*i + 5000*j + 1000*(N-i-j);
                if(ans == Y){
                    ok = true;
                    a = i;
                    b = j;
                    c = (N-i-j);
                    break;
                }
            }
            if(ok)break;
        }
    }

    cout << a << " " << b << " " << c << endl;
}

// ABC085 C - Otoshidama
// ・純粋に全探索すると、O(N^3)になるのでOUT。　なので、1000円札の枚数を決め打ちしてO(N^2)に減らす。

// 全体の枚数 N が決まってることを利用して、1000円札の枚数を　c = N-a-b　とおくと、1万円札a枚と5千円札b枚さえ求めればよくなる。
// rep(i,N) rep(j,N-i) で求まる。

// また、例外として、単一でクリアできる場合も分けてるが、

Compiler output:
a.cc: In function 'int main()':
a.cc:40:23: error: expected primary-expression before '<' token
   40 |     else */if(1000*N =< Y){
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define  rep(i, n) for(int i = 0; i < n; i++) 
#define  all(x) (x).begin(),(x).end()     // 昇順ソート
#define  rall(v) (v).rbegin(), (v).rend() // 降順ソート
#define  INF 1LL << 60
typedef long long int LL;
const int MOD = 1000000007;
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return true; } return false; }
//sort(all(x))とするとソートできるよ
// 10^x は pow(10,(x)) 
// 任意のlogは　対数の底の変換を使う    log(N) / log(任意の底)

vector<int> L(8,0);                      // sum,a++,b++,c++,bool,a,b,c の8要素を参照渡しがめんどいので一か所にまとめておく。
void DFS(int i,int now,vector<int> &L){  // index,i番目ののお札,L
    if(i > N){
        if(L[0] == Y){  //L[0] == sum
            L[4] = 1; // true
            L[5] = L[1];    //a
            L[6] = L[2];    //b
            L[7] = L[3];    //c
            return;
        }
        else{
            return;
        }
    }

    L[0] += now;
    if(now == 10000)L[1]++;
    if(now == 5000)L[2]++;
    if(now == 1000)L[3]++;

    DFS(i+1,10000.L);
    DFS(i+1,5000,L);
    DFS(i+1,1000,L);
}


int main(){
    int N;cin >> N;
    LL Y;cin >> Y;
    DFS(1,10000,L);
    DFS(1,5000,L);
    DFS(1,1000,L);

    if(L[4])cout << L[5] << " " << L[6] << " " << L[7] << endl;
    else cout << -1 << " " << -1 << " " << -1 << endl; 
}

Compiler output:
a.cc: In function 'void DFS(int, int, std::vector<int>&)':
a.cc:17:12: error: 'N' was not declared in this scope
   17 |     if(i > N){
      |            ^
a.cc:18:20: error: 'Y' was not declared in this scope
   18 |         if(L[0] == Y){  //L[0] == sum
      |                    ^
a.cc:35:8: error: too few arguments to function 'void DFS(int, int, std::vector<int>&)'
   35 |     DFS(i+1,10000.L);
      |     ~~~^~~~~~~~~~~~~
a.cc:16:6: note: declared here
   16 | void DFS(int i,int now,vector<int> &L){  // index,i番目ののお札,L
      |      ^~~
Language: C++

#include<iostream>
using namespace std;
 
int main(){
  int N,Y;
  cin>>N>>Y;
  int a,b;
  int c>=0;
  for(a=0;a<=N;a++){
    for(b=0;b<=N;b++){ 
      c=N-a-b;
          if(a+b+c<=N && a*10000+b*5000+c*1000==Y){
            cout<<a<<' '<<b<<' '<<c<<endl;
            return 0;
          
        }
      }
    }
    cout<<"-1 -1 -1"<<endl;
    return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: expected initializer before '>=' token
    8 |   int c>=0;
      |        ^~
a.cc:11:7: error: 'c' was not declared in this scope
   11 |       c=N-a-b;
      |       ^
Language: C++

#include<iostream>
using namespace std;
 
int main(){
  int N,Y;
  cin>>N>>Y;
  int a,b,c>=0;
  for(a=0;a<=N;a++){
    for(b=0;b<=N;b++){ 
      c=N-a-b;
          if(a+b+c<=N && a*10000+b*5000+c*1000==Y){
            cout<<a<<' '<<b<<' '<<c<<endl;
            return 0;
          
        }
      }
    }
    cout<<"-1 -1 -1"<<endl;
    return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected initializer before '>=' token
    7 |   int a,b,c>=0;
      |            ^~
a.cc:10:7: error: 'c' was not declared in this scope
   10 |       c=N-a-b;
      |       ^
Language: C++

#include<iostream>
using namespace std;
 
int main(){
  int N,Y;
  cin>>N>>Y;
  int a,b,c;
  for(a=0;a<=N;a++){
    for(b=0;b<=N;b++){ 
       c=N-a-b;
          if(a+b+c<=N && a*10000+b*5000+c*1000==Y){
            cout<<a<<' '<<b<<' '<<c<<endl;
            return 0;
          }
        }
      }
    }
    cout<<"-1 -1 -1"<<endl;
    return 0;
 }

Compiler output:
a.cc:18:5: error: 'cout' does not name a type
   18 |     cout<<"-1 -1 -1"<<endl;
      |     ^~~~
a.cc:19:5: error: expected unqualified-id before 'return'
   19 |     return 0;
      |     ^~~~~~
a.cc:20:2: error: expected declaration before '}' token
   20 |  }
      |  ^
Language: C

#include<stdio.h>

int main() 
{
    int sum;
    int in_n, in_y;
    int z;
    inf flg;

   
   scanf("%d %d",  &in_n, &in_y);
   flg = 0;
 for (int i = 0; i <= in_n; i++) {
   for(int j = 0; j <= in_n - i; j++) {
        z = in_n - i - j;
        sum = 10000 * i + 5000 * j + 1000 * z;
        if (sum == in_y) {
            printf("%d %d %d", i, j, z);
            flg = 1;
            break;
        }
      }
    }
    if (flg == 0) {
        prinf("-1 -1 -1");
    }
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: unknown type name 'inf'; did you mean 'int'?
    8 |     inf flg;
      |     ^~~
      |     int
main.c:25:9: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   25 |         prinf("-1 -1 -1");
      |         ^~~~~
      |         printf
Language: Java

public class Main {
  public static void main(String[] args) {
    int N = Integer.paseInt(args[0]);
    int Y = Integer.paseInt(args[1]);

    int Yukichi, Higuchi, Noguchi;
    boolean flag = false;

    for(Yukichi = 0; Yukichi <= Y; Yukichi++){
      for(Higuchi = 0; Yukichi + Higuchi <= Y; Higuchi++){
        Noguchi = N - (Yukichi + Higuchi);
        int num = 10000*Yukichi + 5000*Higuchi + 1000*Noguchi;
        if(num == N)
          flag = true;
          break;
      }
    }
    if(flag)
      System.out.println(Yukichi +" "+ Higuchi +" "+ Noguchi);
    else
      System.out.println(-1 +" "+ -1 +" "+ -1);
  }
}

Compiler output:
Main.java:3: error: cannot find symbol
    int N = Integer.paseInt(args[0]);
                   ^
  symbol:   method paseInt(String)
  location: class Integer
Main.java:4: error: cannot find symbol
    int Y = Integer.paseInt(args[1]);
                   ^
  symbol:   method paseInt(String)
  location: class Integer
2 errors
Language: Java

public class Main {
  public static void main(String[] args) {
    int N = Integer.paseInt(args[0]);
    int Y = Integer.paseInt(args[1]);

    int Yukichi, Higuchi, Noguchi;
    boolean flag = false;

    for(Yukichi = 0; Yukichi <= Y; Yukichi++){
      for(Higuchi = 0; Yukichi + Higuchi <= Y; Higuchi++){
        Noguchi = N - (Yukichi + Higuchi);
        int num = 10000*Yukichi + 5000*Higuchi + 1000*Noguchi;
        if(num == N)
          flag = true;
          break;
      }
    }
    if(flag)
      System.out.println(Yukichi +" "+ Higuchi +" "+ Noguchi);
    else
      System.out.println(-1 +" "+ -1 +" "+ -1)
  }
}

Compiler output:
Main.java:21: error: ';' expected
      System.out.println(-1 +" "+ -1 +" "+ -1)
                                              ^
1 error
Language: C++

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();
    for (int i = 0; i <= N  && i*10000 <= Y; i++) {
      for (int j = 0; i+j <= N && i*10000 + j*5000 <= Y; j++) {
        int remain = Y - (i*10000 + j*5000);
        if (remain / 1000 == N - (i+j)) {
          System.out.println(i + " " + j + " " + remain / 1000);
          return;
        }
      }
    }
    System.out.println("-1 -1 -1");
  }
}

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++

n, y = map(int, input().split())
a = -1 #10000
b = -1 #5000
c = -1 #1000
for i in range(n + 1):
    if n + 1 - i > 0:
        for j in range(n + 1 - i):
            k = n - i - j
            if 10000 * i + 5000 * j + 1000 * k == y:
                a = i
                b = j
                c = k
                break
    else:
        if 10000 * (n + 1) == y:
            a = n + 1
            b = n + 1 - i
            c = n + 1 - i
            break
        else:
            continue
print('{} {} {}'.format(a, b, c))

Compiler output:
a.cc:2:8: error: stray '#' in program
    2 | a = -1 #10000
      |        ^
a.cc:3:8: error: stray '#' in program
    3 | b = -1 #5000
      |        ^
a.cc:4:8: error: stray '#' in program
    4 | c = -1 #1000
      |        ^
a.cc:22:7: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   22 | print('{} {} {}'.format(a, b, c))
      |       ^~~~~~~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n, y = map(int, input().split())
      | ^
Language: C++

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

int main(){
  int N, Y;
  cin >> N >> Y;
  bool a = false;
  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)&&((N-i-j)>=0)&&((N-i-j)<=N){
        cout << i << j << N-i-j << endl;
        a = true;
        return 0;
      }
    }
  }
  cout <<' '<< -1 <<' '<< -1 <<' '<< -1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:72: error: expected ')' before '{' token
   10 |       if((10000*i+5000*j+1000*(N-i-j) == Y)&&((N-i-j)>=0)&&((N-i-j)<=N){
      |         ~                                                              ^
      |                                                                        )
a.cc:15:5: error: expected primary-expression before '}' token
   15 |     }
      |     ^
Language: C++

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

int main(){
  int N, Y;
  cin >> N >> Y;
  bool a = false;
  for(int i = 0; i < Y/10000; i++){
    for(int j = 0; (Y-10000*i)/5000; j++){
      if(10000*i+5000*y+1000*(N-i-j) == Y){
        cout << i << j << N-i-j << endl;
        a = true;
        return 0;
      }
    }
  }
  cout << -1 << -1 << -1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: 'y' was not declared in this scope
   10 |       if(10000*i+5000*y+1000*(N-i-j) == Y){
      |                       ^
Language: C

#include <stdio.h>

int min(int a, int b){
  return a < b ? a :b;
}

int main(){
  int n,y,
      i,j,
      ye,ne,
      flag=0;
  
  scanf("%d%d", &n, &y);
  y /= 1000;
  
  for(i = min(y/10, n); 0<=i; i--){
    ye = y-i*10;
    ne = n-i
    for(j = min((y-10*i)/5, n-i); 0<=j; j--){
      if(ne + j == ye)
        printf("%d %d %d", i, j, n-i-j);
        flag = 1;
        break;
      }
    }
    if(flag){
      break;
    }
  }
  
  if(flag==0){
    printf("-1 -1 -1");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:13: error: expected ';' before 'for'
   18 |     ne = n-i
      |             ^
      |             ;
   19 |     for(j = min((y-10*i)/5, n-i); 0<=j; j--){
      |     ~~~      
main.c:27:7: error: break statement not within loop or switch
   27 |       break;
      |       ^~~~~
main.c: At top level:
main.c:31:3: error: expected identifier or '(' before 'if'
   31 |   if(flag==0){
      |   ^~
main.c:34:3: error: expected identifier or '(' before 'return'
   34 |   return 0;
      |   ^~~~~~
main.c:35:1: error: expected identifier or '(' before '}' token
   35 | }
      | ^
Language: C++

int main(){
  int CurrencyNum, result;
  cin >> CurrencyNum >> result;
  
  //
  for(int i = 0; i <= CurrencyNum; i++){
     for(int ii = 0; ii <= CurrencyNum - i; ii++){
       int z = CurrencyNum - (i + ii);
        if(10000*i + 5000*ii + 1000*z == result){
            cout << i << " " << ii <<  " " << z;
           return 0;
        }
     }
  }
  std::cout << "-1 -1 -1";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> CurrencyNum >> result;
      |   ^~~
a.cc:10:13: error: 'cout' was not declared in this scope
   10 |             cout << i << " " << ii <<  " " << z;
      |             ^~~~
a.cc:15:8: error: 'cout' is not a member of 'std'
   15 |   std::cout << "-1 -1 -1";
      |        ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(){
Language: C++

#include<cstdio>
#include<iostream>
#include<ctype.h>
#include<string>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
	int n, b, x = -1, y = -1, z = -1;
	cin >> n >> b;
	for(int i = 0; i <= n; i++){
		for(int j = i; j <= n; j++){
			if(10000 * i + 5000 * (j - i) + 1000 * (n - j) == b){
				x = i;
				y = j - i;
				z = n - j;
				break;
			}
		}
	}
	cout << x << " " << y << " " << z << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:21:51: error: expected '}' at end of input
   21 |         cout << x << " " << y << " " << z << endl;
      |                                                   ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<cstdio>

using namespace std;

int main()
{
    int n,m;
    cin>>n>>m;
    for(int i=0;i<=n;i++)
        for(int j=0;i+j<=n;j++)
            if(i*10000+j*5000+(n-i-j)*1000==x)
            {
                cout<<i<<' '<<j<<' '<<n-i-j<<endl;
                return 0;
            }
    cout<<"-1 -1 -1\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:45: error: 'x' was not declared in this scope
   12 |             if(i*10000+j*5000+(n-i-j)*1000==x)
      |                                             ^
Language: C++

#include <iostream>
using namespace std;

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

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

public class Mian {
	
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		int n,num1,num2,num3;
		int cash;
		n = stdIn.nextInt();
		cash = stdIn.nextInt();

		num1 = cash/10000;
		cash = cash - num1*10000;		

		num2 = cash/5000;
		cash = cash - num2*5000; 
		 

		num3 = cash/1000;
		
		if(num1+num2+num3==n){
		System.out.print(num1+" ");
		System.out.print(num2+" ");
		System.out.println(num3);
		}else{
		System.out.print(-1+" ");
		System.out.print(-1+" ");
		System.out.println(-1);
		}

		
	}

}

Compiler output:
Main.java:1: error: class Mian is public, should be declared in a file named Mian.java
public class Mian {
       ^
Main.java:4: error: cannot find symbol
		Scanner stdIn = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Mian
Main.java:4: error: cannot find symbol
		Scanner stdIn = new Scanner(System.in);
		                    ^
  symbol:   class Scanner
  location: class Mian
3 errors
Language: Java

import java.util.Scanner;

public class Otoshidama {
	
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		int n,num1,num2,num3;
		int cash;
		n = stdIn.nextInt();
		cash = stdIn.nextInt();

		num1 = cash/10000;
		cash = cash - num1*10000;		

		num2 = cash/5000;
		cash = cash - num2*5000; 
		 

		num3 = cash/1000;
		

		System.out.print(num1+" ");
		System.out.print(num2+" ");
		System.out.println(num3);

		
	}

}

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: C++

#include<iostream>
using namespace std;
int main()
{
    int N,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++){
        for(int k = 0; k <= N - i - j; k++){
          if(10000 * i + 5000 * j + 1000 * k == Y && i + j + k == N){
            a = i;
            b = j;
            c = k;
            break;
          }
        }
      }
    }
    cout << cnt << endl;
    cout << a << b << c << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   22 |     cout << cnt << endl;
      |             ^~~
      |             int
Language: C++

#include <stdio.h>
#include <vector>
#include <algorithm>
#include <string>
#include <iostream>
#include <math.h>
#define rep(i,n) for(int i = 0; i <(n); i++)
using namespace std;
typedef long long ll;

int main(void) {
	int tmp, i, N, Y, a, b, c, total;
	scanf("%d%d", &N, &Y);

	rep(a, N) {
		rep(b, N) {
			c = N - (a + b);
			total = a * 10000 + b * 5000 + c * 1000;
			if (total == Y) {
				printf("%d %d %d", a, b, c);
				return;
			}
			
		}
	}
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
 
#define FOR(i, a, b) for (int i = a; i <= b; i++)
#define FORD(i, a, b) for (int i = a; i >= b; i--)
#define REP(i, n) FOR(i, 0, (int)n - 1)
#define pb push_back
#define pi 3.141592653589793
#define sll signed long long int // -10^9 to 10^9
#define ll long long int// for 0 to 10^18
#define ull unsigned long long int // for 0 to 10^18
#define endl "\n"
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define all(x) x.begin(),x.end()
#define MOD 1000000007
template<typename T> T gcd(T a,T b){if(a==0) return b; return gcd(b%a,a);}
template<typename T> T power(T x,T y,ll m=MOD){T ans=1;while(y>0){if(y&1LL) ans=(ans*x)%m;y>>=1LL;x=(x*x)%m;}return ans%m;}
typedef vector<int> vi;
/* 
ll sum_ofGP_modM(ll a , ll n, ll mod)  //// (1 + A^1 +A^2 + A^3 + A^4 + -------+ A^N) % M  usually here n= Total terms in series-1
////and  if series is something for eg 3^2 + 3^4 here a= 9,r=9  our ans can be found out as 
// let a1= first term 3^2 just do ans = a1*sum_ofGP_modM(9 , N-1, ull mod)
	if(n == 0) return 1;
	if(n == 1) return (1 + a) % mod;
	ll res;
	if(n % 2)
		res = (a + 1) * GPSumWithMod((a*a) % mod , (n-1)/2);
	else{ res = (a + 1) * GPSumWithMod((a*a) % mod , n/2 - 1);res %= mod;res = (res * a) + 1;}
    return res % mod;
}
//Whenever we have (a/b)%P == (a * fast_pow(b,P-2))%P
bool isprime(ll a){
  if(a==2)return 1;
  if(!(a&1))return 0;
  for(ll i=3;i*i<=a;i+=2)
    if(a%i==0)return 0;
  return 1;
} */



int main() {
  FAST
  int n,y;cin>>n>>y;
  int x1,x2,x3;
  int t = (y/1000)- n;
  x1 = t/9;
  int s= x1;
  x2=0;
  int h=0;
  int j=s%x1;
  while(j!=0){
    if( j==4) {x2+=1;j-=4}
    else {h+=1;j-=1}
  }
  x3= t - x1 - x2 - h;
  if(x3<0) cout<<"-1 -1 -1";
  else cout<<x1<<" "<<x2<<" "<<(x3+h);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:53:26: error: expected ';' before '}' token
   53 |     if( j==4) {x2+=1;j-=4}
      |                          ^
      |                          ;
a.cc:54:20: error: expected ';' before '}' token
   54 |     else {h+=1;j-=1}
      |                    ^
      |                    ;
Language: C++

#include <iostream>

using std::cout;
using std::endl;
using std::cin;

int main() {
	// Input
	int N;
	int Y;
	cin >> N >> Y;
	// Calculation
	LOOP: for(int z = 0; z <= N; ++z) {
		for(int y = 0; (y + z) <= N; ++y) {
			int x = N - (y + z);
			int amount = x * 10'000 + y * 5'0000 + z * 1'0000;
			if(amount > Y) {
				// Output
				cout << "-1 -1 -1" << endl;
				break LOOP;
			} else if(amount < Y) {
				// No op.
			} else {
				// Output
				cout << x << ' ' << y << ' ' << z << endl;
				break LOOP;
			}
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:38: error: expected ';' before 'LOOP'
   20 |                                 break LOOP;
      |                                      ^~~~~
      |                                      ;
a.cc:20:39: error: 'LOOP' was not declared in this scope; did you mean 'ELOOP'?
   20 |                                 break LOOP;
      |                                       ^~~~
      |                                       ELOOP
a.cc:26:38: error: expected ';' before 'LOOP'
   26 |                                 break LOOP;
      |                                      ^~~~~
      |                                      ;
a.cc:26:39: error: 'LOOP' was not declared in this scope; did you mean 'ELOOP'?
   26 |                                 break LOOP;
      |                                       ^~~~
      |                                       ELOOP
Language: Java

import java.util.Scanner;

class Main {
    public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int Y = scan.nextInt();
        boolean isFound = false;
        x: for (int i = 0; i < N; i++) {
            y: for (int j = 0; j < N; j++) {
                z: for (int k = 0; k < N; k++) {
                    int total = 10000*i + 5000*j + 1000*k;
                   if (total == Y && N == (i + j +k)) {
                       System.out.println(i +" "+ j +" "+k);
                       isFound = true;
                       break x;
                   }
                }
            }
        }
        if (!isFound) {
            System.out.println(-1 +" "+ -1 +" "+-1);
        }
    }

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: 'flag' was not declared in this scope
   16 |         if(flag==0) cout<<"-1 -1 -1";
      |            ^~~~
Language: C++

#include <bits/stdc++.h>
#define debug(x) cerr << "\n" \
                      << #x << ": " << x << "\n"
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define int long long
#define print(x) cout << (x) << endl
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int INF = (1LL << 30);
const ll MOD = 1000000007;
//=============================================================
//=============================================================
int N,Y;
void solve()
{
    int xxx,yyy,zzz;
    xxx=yyy=zzz=-1;
    bool f = false;
    rep(i,N){
        if (f)break;
        rep(j,N-i){
            int z = max(0,N-(i+j));
            if (i*10 + j*5 + z == Y){
                xxx = i; yyy = j; zzz = z;
                f = true;
                break;
            }
        }
    }


    printf("%lld %lld %lld\n", xxx, yyy, zzz);
}
signed main()
{
    cin >> N >> Y;
    Y /= 1000;
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:24:24: error: no matching function for call to 'max(int, long long int)'
   24 |             int z = max(0,N-(i+j));
      |                     ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:24:24: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   24 |             int z = max(0,N-(i+j));
      |                     ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:24:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   24 |             int z = max(0,N-(i+j));
      |                     ~~~^~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
const int INF=1e9;
const int MOD=1e9+7;
//const int MOD=998244353;
const long long LINF=1e18;
using namespace std;
#define int long long
//template
//main
signed main(){
  int N,Y;cin>>N>>Y;
  for(int i=0;i<=N;i++){
    for(int j=0;j<=N;j++){
      int k=N-i-j;
      if(i*10000+j*5000+k*1000==K){
        cout<<i<<" "<<j<<" "<<k<<endl;
        return 0;
      }
    }
  }
  cout<<-1<<" "<<-1<<" "<<-1<<endl;
}


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: 'a' was not declared in this scope
   11 |       int sum = 10000*a + 5000*b + 1000*c;
      |                       ^
a.cc:11:32: error: 'b' was not declared in this scope
   11 |       int sum = 10000*a + 5000*b + 1000*c;
      |                                ^
a.cc:11:41: error: 'c' was not declared in this scope
   11 |       int sum = 10000*a + 5000*b + 1000*c;
      |                                         ^
Language: C

#include <stdio.h>

int main(){
  int n,y;
  scanf("%d%d",&n,&y);
  int i,j,k;
  for(i=0;i<=n;i++)for(j=0;j<=n-i;j++){
    K=n-i-j;
    if(i*10000+j*5000+(k)*1000 == y){
      printf("%d %d %d\n",i,j,k);
      return 0;
    }
  }
  
  printf("-1 -1 -1\n");
  return 0;
}
 


Compiler output:
main.c: In function 'main':
main.c:8:5: error: 'K' undeclared (first use in this function)
    8 |     K=n-i-j;
      |     ^
main.c:8:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){
  int n,y;
  scanf("%d%d",&y,&y);
  int i,j,k;
  for(i=0;i=<n;i++)for(j=0;j=<n;j++){
    if(i*10000+j*5000+(n-i-j)*1000 == y){
      printf("%d %d %d\n",i,j,k);
      return 0;
    }
  }
  
  printf("-1 -1 -1\n");
  return 0;
}
  


Compiler output:
main.c: In function 'main':
main.c:7:13: error: expected expression before '<' token
    7 |   for(i=0;i=<n;i++)for(j=0;j=<n;j++){
      |             ^
main.c:7:30: error: expected expression before '<' token
    7 |   for(i=0;i=<n;i++)for(j=0;j=<n;j++){
      |                              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,y;
  cin >> n >> y;
  int res10000 = -1;
  int res5000 = -1;
  int res1000 = -1;
  int a,b,c;
  for(int a = 0; a <= n; ++i){
    for(int b = 0; b <= n - a; ++i){
      c = n - b - a;
      if(y==10000*a+5000*b+1000*c){
        res10000 = a;
        res5000 = b;
        res1000 = c;
        break;
      }
    }
  }
  cout << res10000 << res5000 << res1000 << endl;
  return 0;
}

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

#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include <algorithm>
#include <functional>

using namespace std;

int N,Y;
int num[3] = {0};

bool dfs(int x,int y,int z){
    //cout << x << " " << y << " " << z << " " <<endl;
    int sum = 10000*x + 5000*y + 1000*z;
    if( sum == Y){
        num[0] = x;
        num[1] = y;
        num[2] = z;
        return true;
    }

    else if( sum < Y ) return false;
    int b = y-1;
    int c = z+1;
    
    if( b >= 0){
        if(dfs(x,b,c)) return true;
    }
    if(dfs(x-1,N-(x-1),0)) return true;

    return false;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include <algorithm>
#include <functional>

using namespace std;

int N,Y;
int num[3] = {0};

bool dfs(int x,int y,int z){
    int sum = 10000*x + 5000*y + 1000*z;
    if( sum == Y){
        num[0] = x;
        num[1] = y;
        num[2] = z;
        return true;
    }
    else if( sum < Y ) return false;

    if(x != 0){
        if(sum-Y >= 20000){
            if(dfs(x-1,y,z+1)) return true;    
        }
        else{
            if(dfs(x-1,y,z+1)) return true;
            if(dfs(x-1,y+1,z)) return true;
            
    }
    else if(y != 0){
        if(dfs(x,y-1,z+1)) return true;
    }

    return false;
}

int main (void){
    cin >> N >> Y;
    num[0] = N;

    //どうあがいても無理
    if( N * 10000 < Y){
        cout << "-1 -1 -1" << endl;
        return 0;
    }

    //深さ優先探索
    if(dfs(num[0],num[1],num[2]) ){
        cout << num[0] << " " << num[1] << " " << num[2]<<" "<<endl;
    }
    else cout << "-1 -1 -1" << endl;

    return 0; 
}

  

Compiler output:
a.cc: In function 'bool dfs(int, int, int)':
a.cc:32:5: error: expected '}' before 'else'
   32 |     else if(y != 0){
      |     ^~~~
a.cc:23:15: note: to match this '{'
   23 |     if(x != 0){
      |               ^
Language: C++

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

int main(){
  long long n,y; cin>>n >>y;
  string ans;
  for(int i=0;i<=y/100000;i++){
    for(int j=0;j<=y/5000;j++){
      long long k=n-i-j;
      if(100000*i+5000*j+1000*k==y){
        cout<<to(i)<<" "<<to(j)<<" "<<to(k)<<endl;
        return 0;
      }
    }
  }
  cout<<"-1 -1 -1"<<endl;
}

Compiler output:
a.cc:2:9: error: 'to_string' does not name a type
    2 | typedef to_string to;
      |         ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:12:15: error: 'to' was not declared in this scope; did you mean 'tm'?
   12 |         cout<<to(i)<<" "<<to(j)<<" "<<to(k)<<endl;
      |               ^~
      |               tm
Language: C++

#include<iostream>
using namespace std;
int main() {
  int n,y; cin >> n >> y;
  y /= 1000;
  for (int ten = 0; ten <= n; ten++) {
    for(int five = 0; five + ten <= n; five++) {
      one = n - ten - five;
      if (ten * 10 + five * 5 + one == y) {
        cout << ten << " " << five << " " << one << endl;
        return 0;
      }
    }
  }
  cout << "-1 -1 -1" << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'one' was not declared in this scope
    8 |       one = n - ten - five;
      |       ^~~
Language: C++

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

int main() {

	int N,y,a,b,flag;
	unsigned long  Y;
	flag = 0;
	cin >> N >> Y;
	y = Y / 1000;
	a = floor(y / 10);
	for (int i = 0; i <= a; i++) {
		b = floor((y - 10 * i) / 5);
			for (int j = 0; j <= b; j++) {
				int k = N - i - j;
				if (10 * i + 5 * j + k == y) {
					cout << i << j << k;
					flag=1
					goto OUT;
				}
			}
	}
OUT:
	if (flag==0) cout << -1 << -1 << -1;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:47: error: expected ';' before 'goto'
   18 |                                         flag=1
      |                                               ^
      |                                               ;
   19 |                                         goto OUT;
      |                                         ~~~~
Language: C++

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

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

#include <bits/stdc++.h>

#define mod 1000000007

using namespace std;
 
int main(void){
	
	int N ,Y, x, y, z;
	
	cin >> N >> Y;
	
	for(x=0; i<=N; i++){
		for(y=0; y<=N; y++){
			z = N-x+y;
			if(x*10000+y*5000+z*1000 == Y){
				cout << x << y << z;
				return 0;
			}
		}
	}
	
	cout << -1 << -1 << -1;
	
	return 0;
}

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

#include <bits/stdc++.h>

#define mod 1000000007

using namespace std;
 
int main(void){
	
	int N ,Y, x, y, z;
	
	cin >> N >> Y;
	
	for(x=0; i<=N; i++){
		for(y=0; y<=N; j++){
			z = N-x+y;
			if(x*10000+y*5000+z*1000 == Y){
				cout << x << y << z;
				return 0;
			}
		}
	}
	
	cout << -1 << -1 << -1;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: 'i' was not declared in this scope
   13 |         for(x=0; i<=N; i++){
      |                  ^
a.cc:14:32: error: 'j' was not declared in this scope
   14 |                 for(y=0; y<=N; j++){
      |                                ^
Language: C++

#include<iostream>

using namespace std;

int main(){

    int n, y;

    cin >> n >> y;

    y /= 1000;

    for(int i=N;i>=0;i--)
        for(int j=N-i;j>=0;j--)
            if(i*10+j*5+(n-i-j)==y){
                cout << i << " " << j << " " << n-i-j << endl;
                return 0;
            }
    cout << "-1 -1 -1" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'N' was not declared in this scope
   13 |     for(int i=N;i>=0;i--)
      |               ^
Language: C++

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

int main() {
  int N,Y,z,aaa=0;
  cin >> N >> Y;
  for(int x=0;x<=N;x++){
  	for(int y=0;y<=N;y++){
      z=Y-10000*x-5000*y;
      if(z>=0&&1000*z<=Y){
      	cout << x << y << z << endl;
        aaa=1;
        break;
      }
    }
  }if(aaa) break;
  cout << "-1 -1 -1" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: break statement not within loop or switch
   16 |   }if(aaa) break;
      |            ^~~~~
Language: C++

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

int main() {
  int N,Y,z,aaa=0;
  cin >> N >> Y;
  for(int x=0;x<=N;x++){
  	for(int y=0;y<=N;y++){
      z=Y-10000*x-5000*y;
      if(z>=0&&1000*z<=Y){
      	cout << x << y << z << endl;
        aaa=1;
        break;
      }
    }
  }if(a) break;
  cout << "-1 -1 -1" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: 'a' was not declared in this scope
   16 |   }if(a) break;
      |       ^
a.cc:16:10: error: break statement not within loop or switch
   16 |   }if(a) break;
      |          ^~~~~
Language: C++

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

int main() {
  int N,Y,z,aaa=0;
  cin >> N >> Y;
  for(int x=0;x<=N;x++){
  	for(int y=0;y<=N;y++){
      z=Y-10000*x-5000*y;
      if(z>=0&&1000*z<=Y){
      	cout << x << y << z << endl;
        aaa=1;
        break;
      }
    }
  }if(a) break;
  cout << ""-1 -1 -1"" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: 'a' was not declared in this scope
   16 |   }if(a) break;
      |       ^
a.cc:16:10: error: break statement not within loop or switch
   16 |   }if(a) break;
      |          ^~~~~
a.cc:17:21: error: expected ';' before string constant
   17 |   cout << ""-1 -1 -1"" << endl;
      |                     ^~
      |                     ;
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N,Y;
  cin >> N >> Y;
  int res10000 = -1, res5000 = -1, res1000 = -1;
  for(int x=0;x<=N;x++){
    for(int x+y=0;y<=N;y++){
      int z = N-x-y;
      int total = 10000*x+5000*y+1000*z;
      if(total==Y){
        res10000 = x;
        res5000 = y;
        res1000 = z;
      }
    }
  }
  cout << res10000 << " " << res5000 << " "<< res1000;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected ';' before '+' token
    9 |     for(int x+y=0;y<=N;y++){
      |              ^
      |              ;
a.cc:9:15: error: 'y' was not declared in this scope
    9 |     for(int x+y=0;y<=N;y++){
      |               ^
a.cc:9:23: error: expected ')' before ';' token
    9 |     for(int x+y=0;y<=N;y++){
      |        ~              ^
      |                       )
a.cc:9:24: error: 'y' was not declared in this scope
    9 |     for(int x+y=0;y<=N;y++){
      |                        ^
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: expected ',' or ';' before 'if'
   12 |       if(total==Y){
      |       ^~
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'z' was not declared in this scope
   10 |       z = N-x-y;
      |       ^
Language: C++

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

int main() {
  int n,y;
  cin >> n >> y;
  int ic,go,se,kei;
  ic = y / 10000;
  go = (y % 10000) / 5000;
  se = (y % 5000) / 1000;
  kei = ic + go + se;

  if(n < kei){
      cout << "-1 -1 -1" << endl;
  }else if(n == kei){
      cout << ic << " " << go << " " << se;
  }else{
      int sa;
      sa = n - kei;
      if(sa < ic + 1){
        int a,b;
          a = ic - sa;
          b = go + 2 * sa;
          cout << a << " " << b << " " << se;
      }else{
          int p = sa - ic;
          int q = 0;
        if(ic > 0){
        for(int l = 0; l < 4; l++){
          if((p + l) % 4 == 0 && (p + l) / 4 <= go + 2 * (ic - l)){
            int a,b,c;
            a = l;
            b = go + 2 * (ic - l) - ((p + l)/ 4);
            c = se + ((p + l) / 4) * 5;
              cout << a << " " << b << " " << c;
            q = 1;
          }
          if(q = 0){
            cout << "-1 -1 -1" << endl;
          }
        }else if(p % 4 == 0 && p / 4 <= go){
            int a,b,c;
            a = 0;
            b = go - (p + l)/ 4;
            c = se + ((p + l) / 4) * 5;
              cout << a << " " << b << " " << c;
        }else{
          cout << "-1 -1 -1" << endl;
        }
      }
  }
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:10: error: expected '}' before 'else'
   42 |         }else if(p % 4 == 0 && p / 4 <= go){
      |          ^~~~
a.cc:29:19: note: to match this '{'
   29 |         if(ic > 0){
      |                   ^
a.cc:45:27: error: 'l' was not declared in this scope
   45 |             b = go - (p + l)/ 4;
      |                           ^
a.cc: At global scope:
a.cc:54:1: error: expected declaration before '}' token
   54 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <climits>
#include <vector>
#include <numeric>
#include <complex>
#include <map>
#include <bitset>
#include <stack>
#include <queue>
#include <set>
using namespace std;

#define __int64 long long
#define long __int64
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
const int Vec = 4;
const int Vecy[Vec] = {0,-1,0,1};
const int Vecx[Vec] = {1,0,-1,0};
const int Modd = 1000000007;

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

    int ans=0;
    for(int x=0; x<=N; x++){
        for(int y=0; y<=N-x; y++){
            for(int z=0; z<=N-x-y; z++){
            if(x+y+z != Y) break;
            if(10000*x + 5000*y + 1000*z ==  Y){
                cout << x <<" " << y << " " << z << endl;
                return 0;
            }
        }
    }

    cout << "-1 -1 -1" << endl;
    return 0;
}

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

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: 'k' was not declared in this scope
   12 |                 if ( i + k + j == N && i*10000 + j*5000 + k*1000 == Y )
      |                          ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n,y;
  cin >> n >> y;
  int count = 0;
  bool flag = false;
  for(int i = 0;i <= n;i++){
    for(int j = 0;j <= n;j++){
      int k = n-i-j;
      if(i*10000+j*5000+k*1000 == y  && i+j+k == n){
        flag = true;
        break;
    }
  }
  }
  if(flag = true){
    cout << i <<" "<< j <<" "<< k << endl;
  }
  else{
    cout << -1 << -1 << -1 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'i' was not declared in this scope
   19 |     cout << i <<" "<< j <<" "<< k << endl;
      |             ^
a.cc:19:23: error: 'j' was not declared in this scope
   19 |     cout << i <<" "<< j <<" "<< k << endl;
      |                       ^
a.cc:19:33: error: 'k' was not declared in this scope
   19 |     cout << i <<" "<< j <<" "<< k << endl;
      |                                 ^