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

#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define reg register
#define in cin>>
#define out cout<<
using namespace std;
int main(){
	reg int n,y;
	in n>>y;
	if(n*10000<y||n*1000>y){
		out "-1 -1 -1\n";
		return 0;
	}
	if(n*10000==y){
		out n<<" 0 0\n";
		return 0;
	}
	if(n*5000==y){
		out "0 "<<n<<" 0\n";
		return 0;
	}
	if(n*1000==y){
		out "0 0 "<<n<<endl;
		return 0;
	}
	reg int k5000=0;
	if(y%10000>=5000)k5000++;
	for(reg int i=0;i<=n;i++){
		for(reg int j=k5000;j<=n-i;j+=2){
				if(i*10000+j*5000+(n-i-j)*1000==y){
					out i<<" "<<j<<" "<<n-i-j<<endl;
					return 0;
				}
			}
		}
	}
	out "-1 -1 -1\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
    9 |         reg int n,y;
      |                 ^
a.cc:9:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
    9 |         reg int n,y;
      |                   ^
a.cc:27:17: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   27 |         reg int k5000=0;
      |                 ^~~~~
a.cc:29:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   29 |         for(reg int i=0;i<=n;i++){
      |                     ^
a.cc:30:29: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   30 |                 for(reg int j=k5000;j<=n-i;j+=2){
      |                             ^
a.cc: At global scope:
a.cc:6:13: error: 'cout' does not name a type; did you mean 'out'?
    6 | #define out cout<<
      |             ^~~~
a.cc:38:9: note: in expansion of macro 'out'
   38 |         out "-1 -1 -1\n";
      |         ^~~
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
Language: Java

import java.util.*;

Class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int Y = sc.nextInt();
    int x = -1;
    int y = -1;
    int z = -1;
    for(int i=0;i<=N;i++){
      x = i;
      for(int j=0;j<=N-i;j++){
        y = j;
        z = N-i-j;
        if((z>=0)&&(1000*x+5000*y+1000*z==Y)){
          System.out.println(x+" "+y+" "+z);
          return;
        }
      }
    }
    System.out.println(-1+" "+-1+" "+-1);
  }
}
    

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
Class Main{
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
  public static void main(String[] args){
                ^
  (use --enable-preview to enable unnamed classes)
Main.java:24: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

n,y=map(int,input().split())
ans=[]
flag=False
for i in range(0,n):
  for j in range(0,n):
    if (9000*i+4000*j)==(y-1000*n) and n>=(i+j):
      ans=[i,j,n-i-j]
      flag=True
      break
if flag:
  print(*ans)
else:
  print(-1,-1,-1)

Compiler output:
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 n,y;
int main() {
    cin>>n>>y;
	for(int i=0;i<=2000;i++){
        for(int j=0;j+i<=2000&&i+j<=n;j++){
            if(i*10000+j*5000+(n-i-j)*1000==y)
            {
                cout<<i<<" "<<j<<" "<<n-i-j<<endl;
                return;
            }
        }
    }
    cout<<-1<<" "<<-1<<" "<<-1<<endl;
    return 0;
}
//68871358
//76140264
//25446011
//200841159
//914174775

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

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

int main() {
  int N,Y;
  bool finished =false;
  cin>>N>>Y;
  Y/=1000;
  for(int i=0; i<=N;i++){
    for(int j=0; j<=N;j++){
      if(i+j>N) continue;
      if((Y-i-j*5)%10==0){
        cout<<Y-i-j<<" "<<j<<" "<<i<<endl;
        finished=true;
        break;
      }
      if(finished) break;
    }
    if(finished==false){
      cout<<"-1 -1 -1"<<endl;
    }
}


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

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

int main() {
  int N,Y;
  bool finished =false;
  cin>>N>>Y;
  Y/=1000;
  for(int i=0; i<=N;i++){
    for(int j=0; j<=N;j++){
      if(i+j>N) continue;
      if((Y-i-j*5)%10==0){
        cout<<Y-i-j<<" "<<j<<" "<<i<<endl;
        finished=true;
        break;
      }
      if(finished) break;
    }
    if(finished==false){
      cout<<"-1 -1 -1"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:9:25: note: to match this '{'
    9 |   for(int i=0; i<=N;i++){
      |                         ^
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: Java

import java.util.*;

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:12: error: ';' expected
				int total = a * 10000 + b * 5000 + c * 1000
				                                           ^
1 error
Language: C++

include <iostream>
using namespace std;
 
int main(){
  int N, Y;
  cin >> N >> Y;
  int i, j, k;
  int check = 0;
  for (i=0; i<=N; i++){
    for (j=0; j<=N-i; j++){
      k = N-i-j;
      if (10000*i+5000*j+1000*k=Y){
        cout << i << ' ' << j << ' ' << k << endl;
        check = 1;
        break;
      }
    }
    if (check == 1) {
      break;
    }
  }
  if (check ==0){
    cout << "-1 -1 -1" << endl;
  }
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> N >> Y;
      |   ^~~
a.cc:12:25: error: lvalue required as left operand of assignment
   12 |       if (10000*i+5000*j+1000*k=Y){
      |           ~~~~~~~~~~~~~~^~~~~~~
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout << i << ' ' << j << ' ' << k << endl;
      |         ^~~~
a.cc:13:46: error: 'endl' was not declared in this scope
   13 |         cout << i << ' ' << j << ' ' << k << endl;
      |                                              ^~~~
a.cc:23:5: error: 'cout' was not declared in this scope
   23 |     cout << "-1 -1 -1" << endl;
      |     ^~~~
a.cc:23:27: error: 'endl' was not declared in this scope
   23 |     cout << "-1 -1 -1" << endl;
      |                           ^~~~
Language: C++

include <iostream>
using namespace std;
 
int main(){
  cin >> N >> Y;
  int i, j, k;
  int check = 0;
  for (i=0; i<=N; i++){
    for (j=0; j<=N-i; j++){
      k = N-i-j;
      if (10000*i+5000*j+1000*k=Y){
        cout << i << ' ' << j << ' ' << k << endl;
        check = 1;
        break;
      }
    }
    if (check == 1) {
      break;
    }
  }
  if (check ==0){
    cout << "-1 -1 -1" << endl;
  }
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N >> Y;
      |   ^~~
a.cc:5:10: error: 'N' was not declared in this scope
    5 |   cin >> N >> Y;
      |          ^
a.cc:5:15: error: 'Y' was not declared in this scope
    5 |   cin >> N >> Y;
      |               ^
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout << i << ' ' << j << ' ' << k << endl;
      |         ^~~~
a.cc:12:46: error: 'endl' was not declared in this scope
   12 |         cout << i << ' ' << j << ' ' << k << endl;
      |                                              ^~~~
a.cc:22:5: error: 'cout' was not declared in this scope
   22 |     cout << "-1 -1 -1" << endl;
      |     ^~~~
a.cc:22:27: error: 'endl' was not declared in this scope
   22 |     cout << "-1 -1 -1" << endl;
      |                           ^~~~
Language: C++

include <iostream>
using namespace std;

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N >> Y;
      |   ^~~
a.cc:5:10: error: 'N' was not declared in this scope
    5 |   cin >> N >> Y;
      |          ^
a.cc:5:15: error: 'Y' was not declared in this scope
    5 |   cin >> N >> Y;
      |               ^
a.cc:9:24: error: expected ')' before ';' token
    9 |     for (j=0; j<=N-i; j;;){
      |         ~              ^
      |                        )
a.cc:9:26: error: expected primary-expression before ')' token
    9 |     for (j=0; j<=N-i; j;;){
      |                          ^
a.cc:22:5: error: 'cout' was not declared in this scope
   22 |     cout << "-1 -1 -1" << endl;
      |     ^~~~
a.cc:22:27: error: 'endl' was not declared in this scope
   22 |     cout << "-1 -1 -1" << endl;
      |                           ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
  int n, y;

  scanf("%d %d", &n, &y);

  bool can = false;

  for (int i = 0; i <= n; i++)
  {
    for (int j = 0; j <= n; j++)
    {
      if ((y - 10000 * i + 5000 * j) % 1000 == 0 && i + j + ((y - 10000 * i + 5000 * j) / 1000) == n)
      {
        printf("%d %d %d\n", i, j, n-i-j;

        can = true;
        break;
      }
    }
    if (can)
      break;
  }

  if (can == false)
    printf("-1 -1 -1");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:41: error: expected ')' before ';' token
   19 |         printf("%d %d %d\n", i, j, n-i-j;
      |               ~                         ^
      |                                         )
Language: C++

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

int main() {
	int n, y;
	cin >> n >> y;
	for (int i = 0; i <= n; ++i) {
		for (int j = 0; j <= n; ++j) {
			if (i + j > n) continue;
			if (i * 10000 + j * 5000 + (n - i - j) * 500 == y) {
				printf_s("%d %d %d", i, j, n-i-j);
				return 0;
			}
		}
	}
	printf_s("%d %d %d", -1, -1, -1);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
   14 |                                 printf_s("%d %d %d", i, j, n-i-j);
      |                                 ^~~~~~~~
      |                                 printf
a.cc:19:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
   19 |         printf_s("%d %d %d", -1, -1, -1);
      |         ^~~~~~~~
      |         printf
Language: Java

import java.util.*;
class Main
{
  public static void main(String[] args)
  {
    Scanner sc = new Scanner(System.in);
    
    int n = sc.nextInt();
    int p = sc.nextInt();
    
    for(int x=0 ; x<=n ; x++){
      for(int y=0 ; y<=(n-x); y++){
         int z=n-x-y;
          
          int total = 10000*x + 5000*y + 1000*z;
          if(p==total){
            System.out.print(x+" "+y+" "+z);
            return;
          }
      }
    }
    System.out.print(x+" "+y+" "+z);
  }
}       

Compiler output:
Main.java:22: error: cannot find symbol
    System.out.print(x+" "+y+" "+z);
                     ^
  symbol:   variable x
  location: class Main
Main.java:22: error: cannot find symbol
    System.out.print(x+" "+y+" "+z);
                           ^
  symbol:   variable y
  location: class Main
Main.java:22: error: cannot find symbol
    System.out.print(x+" "+y+" "+z);
                                 ^
  symbol:   variable z
  location: class Main
3 errors
Language: C++

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

void success(int x, int y, int z) {
  cout << x << " " << y << " " << z << endl;
  exit(0);
}

void err() {
  cout << -1 << " " << -1 << " " << -1 << endl;
  exit(0);
}

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

  int A = Y / 10000 + 1;
  int B = Y / 5000 + 1;
  rep(i,A) {
    rep(j, B) {
      int C = N - i - j;
      if (C < 0) continue;
      if (i * 10000 + j * 5000 + C * 1000 == Y) success(i, j, C);
    }
  }
  err();


Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: expected '}' at end of input
   29 |   err();
      |         ^
a.cc:16:12: note: to match this '{'
   16 | int main() {
      |            ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    int N,Y;

    cin >> N >> Y;

    for(int a=0;a < N;i++){
        for(int b=0;b < N;k++){
            c = N - a - b;
            total = 10000 * a + 5000 * b + 1000 * c;
            if(total == Y){
                printf("%d %d %d\n",a,b,c);
            }
        }
    }
        
    printf("-1 -1 -1\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: 'i' was not declared in this scope
    9 |     for(int a=0;a < N;i++){
      |                       ^
a.cc:10:27: error: 'k' was not declared in this scope
   10 |         for(int b=0;b < N;k++){
      |                           ^
a.cc:11:13: error: 'c' was not declared in this scope
   11 |             c = N - a - b;
      |             ^
a.cc:12:13: error: 'total' was not declared in this scope
   12 |             total = 10000 * a + 5000 * b + 1000 * c;
      |             ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, M, x, y, z, money;
  cin >> N >> M
    
  for(int x = 0;a <= N; x++){
    for(int y = 0;b <= N; y++){
      for(int z = 0;c <= N; z++){
        money = x * 1000 + y * 5000 + z * 10000;
        if(x + y + z == N && money == M){
        cout << x << " " << y << " " << z << endl;      
        }   
      }
    }
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected ';' before 'for'
    6 |   cin >> N >> M
      |                ^
      |                ;
    7 | 
    8 |   for(int x = 0;a <= N; x++){
      |   ~~~           
a.cc:8:17: error: 'a' was not declared in this scope
    8 |   for(int x = 0;a <= N; x++){
      |                 ^
a.cc:8:28: error: expected ';' before ')' token
    8 |   for(int x = 0;a <= N; x++){
      |                            ^
      |                            ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define sc(x) scanf("%d",&x);
int main(){
    int n, y;
    ll ßtmp;
    bool check = false;
    sc(n) sc(y)
    for (int i = 0; i <= y / 10000; i++){
        for (int j = 0; j <= (y - 10000*i) / 5000; j++){
            if (i + j > n) break;
            tmp = y - 10000*i - 5000*j;
            if (tmp % 1000 == 0 && i + j + (tmp / 1000) == n){
                check = true;
                cout << i << " " << j << " " << tmp / 1000 << endl;
                break;
            }
        }
        if (check) break;
    }
    if (!check) cout << -1 << " " << -1 << " " << -1 << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   15 |             tmp = y - 10000*i - 5000*j;
      |             ^~~
      |             tm
Language: C++

int main(){
    int N;
    int Y;
    int hoge = -1, fuga = -1, piyo = -1;
    cin >> N >> Y;
    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) {
                hoge = a;
                fuga = b;
                piyo = c;
            }
        }
    }
    cout << hoge  << " " << fuga << " " << piyo << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> N >> Y;
      |     ^~~
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout << hoge  << " " << fuga << " " << piyo << endl;
      |     ^~~~
a.cc:17:52: error: 'endl' was not declared in this scope
   17 |     cout << hoge  << " " << fuga << " " << piyo << endl;
      |                                                    ^~~~
Language: C++

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

int main(){
  int n,m;
  cin>>n>>m;
  string f="-1 -1 -1";
  if(m%1000>0)
    cout<<f<<endl;
  int a=0,b=0,c=0;
  bool baka=false;
  for(int j=0;j<=n;j++){
      for(int k=0;k<=n;k++){
        c=N-j-k;
        if(c+j+k==n&&10000*j+5000*k+1000*c==m&&c>=0){
          a=j;
          b=k;
          baka=true;
        }
        if(baka==true)
          break;
        c=0;
      }
    if(baka==true)
      break;
  }
  if(a==0&&b==0&&c==0)
    cout<<f<<endl;
  else
    cout<<a<<" "<<b<<" "<<c<<endl;
}

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

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);

//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
//	ll a, b;
//	cin >> a >> b;
//	work[i] = make_pair(a, b);
//}

int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };

//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

ll lcm(ll x, ll y) {
	if (x == 0 || y == 0)return 0;
	return (x / gcd(x, y) * y);
}

//素因数分解
vector<pair<ll, int>>factorize(ll n) {
	vector<pair<ll, int>>res;
	for (ll i = 2;i * i <= n;++i) {
		if (n % i)continue;
		res.emplace_back(i, 0);
		while (n % i == 0) {
			n /= i;
			res.back().second++;
		}
	}
	if (n != 1)res.emplace_back(n, 1);
	return res;
}

int dp[1010][1010];
int bingo[3][3];
int cnt[2][105];

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


Compiler output:
a.cc: In function 'int main()':
a.cc:70:17: error: 'rukichi' was not declared in this scope; did you mean 'yukichi'?
   70 |         cout << rukichi << " " << higuchi << " " << noguchi << endl;
      |                 ^~~~~~~
      |                 yukichi
Language: C++

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

using namespace std;
int N, Y;

int main(){

   else  cout << -1 << " "<<-1<<  " "<< -1;

   cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:4: error: 'else' without a previous 'if'
    9 |    else  cout << -1 << " "<<-1<<  " "<< -1;
      |    ^~~~
Language: C++

#include <iostream>
using namespace std;
 
int main(){
  int N;
  long long Y;
  int res[3]={0};
  bool flag=true;
  
  cin >> N >> Y;
  
  for(int x=0;x<=N;x++){
    for(int y=0;y<=N;y++){
      int z=N-x-y;
      if(z >= 0 && z <= N){
        long long sum=10000*x*5000*y+1000*z;
        if( Y % 1000 ==0 && sum == Y){
          res[0]=x;
          res[1]=y;
          res[2]=z;
          flag=false;
        } 
        if(flag==false) break;
      }
      if(flag == false) break;
    }
    if(flag == false) break;
  }
  
  if(flag){
    res[0]=-1;
    res[1]=-1;
    res[2]=-1;
  }
  
  cout << res[0] << << res[1] << << res[2] << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:21: error: expected primary-expression before '<<' token
   36 |   cout << res[0] << << res[1] << << res[2] << endl;
      |                     ^~
a.cc:36:34: error: expected primary-expression before '<<' token
   36 |   cout << res[0] << << res[1] << << res[2] << endl;
      |                                  ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<=(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
int main()	{
  int n,y,a,b;
  bool ex=false;
  cin>>n>>y;
  rep(a,n){
    rep(b,n){
      int sum=10000*a+5000*b+1000*(n-a-b);
      if(sum==y){
        cout<<a<<" "<<b<<" "<<n-a-b<<endl;
        ex=true;
        break;
    }
  }
    if(ex==false)
      cout<<-1<<" "<<-1<<" "<<-1<<endl;
}


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<=(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
int main()	{
  int n,y,a,b;
  int c=0;
  cin>>n>>y;
  rep(a,n){
    rep(b,n){
      int sum=10000*a+5000*b+1000(n-a-b);
      if(sum==y)
        cout<<a<<" "<<b<<" "<<n-a-b;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:34: error: expression cannot be used as a function
   14 |       int sum=10000*a+5000*b+1000(n-a-b);
      |                              ~~~~^~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
 
using namespace std;
 
int main(){
  int N, Y;
  cin >> N >> Y;
  for(int x=0; x<=N; x++){
    for(int y=0; y<=0; y++){
      int z = N - x -y;
      int total = 10000*x + 5000*y +1000*z;
      if(total == Y){
        cout << x <<''<< y<<'' << z <<endl;
        return 0;
      }
    }
  }
  cout << -1<<'' << -1 <<''<< -1<< endl;
}

Compiler output:
a.cc:16:21: error: empty character constant
   16 |         cout << x <<''<< y<<'' << z <<endl;
      |                     ^~
a.cc:16:29: error: empty character constant
   16 |         cout << x <<''<< y<<'' << z <<endl;
      |                             ^~
a.cc:21:15: error: empty character constant
   21 |   cout << -1<<'' << -1 <<''<< -1<< endl;
      |               ^~
a.cc:21:26: error: empty character constant
   21 |   cout << -1<<'' << -1 <<''<< -1<< endl;
      |                          ^~
Language: C++

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

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


Compiler output:
a.cc:18:3: error: 'cout' does not name a type
   18 |   cout << A << " " << B << " " << C;
      |   ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

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

using namespace std;

int main() {
	cin.tie(0);
   	ios::sync_with_stdio(false);
	

	int N;
	int s;
    cin >> N >> s;
	int s = s/1000;
	int x = -1, y = -1, z = -1;
	for (int i = 0; i < N+1; i++)
	{
		for (int j = 0; i+j < N+1; j++)
		{
			if(s-10*i-5*j<0||s-10*i-5*j>N-i-j) continue;
			else {
				x=i, y=j, z=s-10*i-5*j;
			}
		}
		
	}
	cout << x << " " << y << " " << z << endl;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: redeclaration of 'int s'
   14 |         int s = s/1000;
      |             ^
a.cc:12:13: note: 'int s' previously declared here
   12 |         int s;
      |             ^
Language: C++

#include <iostream>
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-i;j++){
             int l=N-i-j;
             int total = 10000*i+5000*j+1000*l;
             if(total==Y){
                 a=j;
                 b=k;
                 c=l;
             }
         }
     }
     cout<<a<<b<<c<<endl;
 }

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: expected initializer before '==' token
   13 |     int k == N - i - j;
      |           ^~
a.cc:14:42: error: 'k' was not declared in this scope
   14 |      int total = 10000*i + 5000*j + 1000*k;
      |                                          ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: expected initializer before '==' token
   13 |     int k == N - i - j;
      |           ^~
a.cc:14:42: error: 'k' was not declared in this scope
   14 |      int total = 10000*i + 5000*j + 1000*k;
      |                                          ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: expected '(' before 'k'
   13 |     if k == N - i - j;
      |        ^
      |        (
a.cc:14:42: error: 'k' was not declared in this scope
   14 |      int total = 10000*i + 5000*j + 1000*k;
      |                                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int max_n = 2000;
ll d[max_n][max_n][max_n];
ll n,sum;
void solve(){
  for(int i=0 ; i<=n ; i++){
    for(int j=0 ; j<=n-i ; j++){
        if(10000*i + 5000*j + 1000*(n-i-j) == sum){
          cout << i << ' ' << j << ' ' << n-i-j << endl;
          return;
      }
    }
  }
  cout << "-1 -1 -1" << endl;
}
int main(){
  cin >> n >> sum;
  solve();
  return 0;
}


Compiler output:
/tmp/ccjfWfRl.o: in function `solve()':
a.cc:(.text+0x3a): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccjfWfRl.o
a.cc:(.text+0x5b): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccjfWfRl.o
a.cc:(.text+0xa8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccjfWfRl.o
a.cc:(.text+0xef): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccjfWfRl.o
a.cc:(.text+0x111): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccjfWfRl.o
/tmp/ccjfWfRl.o: in function `main':
a.cc:(.text+0x152): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccjfWfRl.o
a.cc:(.text+0x16e): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccjfWfRl.o
collect2: error: ld returned 1 exit status
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: lvalue required as left operand of assignment
   12 |         if(10000*i+5000*j+1000*k = y){
      |            ~~~~~~~~~~~~~~^~~~~~~
Language: Java

import java.util.*;
 
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int  num = sc.nextInt();
	int  yen = sc.nextInt();
	int x =0;
	int y = 0;
	int z = 0;
	boolean flg = false;
	for(int i = num; i >= 0; i--){
		for(int j = i; j >= 0; j--){
			for(int k = j; k >= 0; k--){
				if(x+y+z == num && i*10000 + j*5000 + k*1000){
					System.out.println(x +" "+ y + " " + z);
					flg = true;
				}
			}
		}
	}
	if(!flg){
		System.out.println("-1 -1 -1");
	}
  }
}

Compiler output:
Main.java:15: error: bad operand types for binary operator '&&'
				if(x+y+z == num && i*10000 + j*5000 + k*1000){
				                ^
  first type:  boolean
  second type: int
1 error
Language: Java

import java.util.*;
 
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int  num = sc.nextInt();
	int  yen = sc.nextInt();
	int x =0;
	int y = 0;
	int z = 0;
	boolean flg = false;
	for(int i = 0; i <= num; i++){
		for(int j = 0; j <= num; j++){
			for(int k = 0; k <= num; k++){
				if(x+y+z == num && i*10000 + j*5000 + k*1000){
					System.out.println(x +" "+ y + " " + z);
					flg = true;
				}
			}
		}
	}
	if(!flg){
		System.out.println("-1 -1 -1");
	}
  }
}

Compiler output:
Main.java:15: error: bad operand types for binary operator '&&'
				if(x+y+z == num && i*10000 + j*5000 + k*1000){
				                ^
  first type:  boolean
  second type: int
1 error
Language: Java

import java.util.*;
 
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int  num = sc.nextInt();
	int  yen = sc.nextInt();
	int x =0;
	int y = 0;
	int z = 0;
	boolean flg = false;
	for(int i = 0; i <= 2000; i++){
		for(int j = 0; j <= 2000; j++){
			for(int k = 0; k <= 2000; k++){
				if(x+y+z == num && i*10000 + j*5000 + k*1000){
					System.out.println(x +" "+ y + " " + z);
					flg = true;
				}
			}
		}
	}
	if(!flg){
		System.out.println("-1 -1 -1");
	}
  }
}

Compiler output:
Main.java:15: error: bad operand types for binary operator '&&'
				if(x+y+z == num && i*10000 + j*5000 + k*1000){
				                ^
  first type:  boolean
  second type: int
1 error
Language: C++

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

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

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

#include<iostream>
using namespace std;
int main(){
  int a, b, c; //temporary
  int n; // 枚数
  int y; // 金額
  int sub, sub2;
  // 入力
  cin >> n >> y;
  // 探索
  sub = y/1000 - n;
  a = floor(sub/9);
  b = 0;
  while(a>=0 && (a+b<=n)){
    sub2 = 9*a + 4*b - sub;
    if( sub2 < 0 ){ // 足りない
      b++;
    } else if( sub2 > 0 ){ // 多い
      a--;
    } else {
      break;
    }
  }
  if(a>=0 && (a+b<=n)){
    c = n - a - b;
  } else {
    a = -1;
    b = -1;
    c = -1;
  }
  cout << a << " " << b << " " << c <<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: 'floor' was not declared in this scope
   12 |   a = floor(sub/9);
      |       ^~~~~
Language: C++

#include <iostream>
using namespace std;

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


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

#include <iostream>
using namespace std;

int main() {
  int N, Y;
  cin >> N >> Y;
  bool flag = false;
  for (int x = 0; x <= N; ++i) {
    for (int y = 0; y <= N - x; ++j) {
      int z = N - x - y;
      int total = 10000 * x + 5000 * y + 1000 * z;
      if (total == Y) {
        cout << x << y << z << endl;
        flag = true;
        break;
      }
    }
    if (flag) break;
  }
  if (!flag) cout << -1 << -1 << -1 << endl;
}


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

#include <iostream>
using namespace std;

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

  for (int x = 0; x <= N; ++i) {
    for (int y = 0; y <= N - x; ++j) {
      int z = N - x - y;
      int total = 10000 * x + 5000 * y + 1000 * z;
      if (total == Y) {
        cout << x << y << z << endl;
        flag = true;
        break;
      }
    }
    if (flag) break;
  }
  if (!flag) cout << -1 << -1 << -1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: 'i' was not declared in this scope
    8 |   for (int x = 0; x <= N; ++i) {
      |                             ^
a.cc:9:35: error: 'j' was not declared in this scope
    9 |     for (int y = 0; y <= N - x; ++j) {
      |                                   ^
a.cc:14:9: error: 'flag' was not declared in this scope
   14 |         flag = true;
      |         ^~~~
a.cc:18:9: error: 'flag' was not declared in this scope
   18 |     if (flag) break;
      |         ^~~~
a.cc:20:8: error: 'flag' was not declared in this scope
   20 |   if (!flag) cout << -1 << -1 << -1 << endl;
      |        ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: expected ';' before '}' token
   14 |         a = i; b = j
      |                     ^
      |                     ;
   15 |       }
      |       ~
Language: C++

#includ<iostream>
using namespace std;
int main(){
int n,y,i,j,k;
cin >> n >> y;;
for(i=0;i<=n;i++){
for(j=0;j<=n;j++){
k=n-i-j;
if(1000*i+5000*j+10000*k==y){
printf("%d %d %d\n",k,j,i);
return 0;
}
}
}
printf("-1 -1 -1\n");
return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #includ; did you mean #include?
    1 | #includ<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin >> n >> y;;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #includ<iostream>
a.cc:10:1: error: 'printf' was not declared in this scope
   10 | printf("%d %d %d\n",k,j,i);
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #includ<iostream>
a.cc:15:1: error: 'printf' was not declared in this scope
   15 | printf("-1 -1 -1\n");
      | ^~~~~~
a.cc:15:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#includ<iostream>
using namespace std;
int main(){
int n,y,i,j,k;
cin >> n;
for(i=0;i<=n;i++){
for(j=0;j<=n;j++){
k=n-i-j;
if(1000*i+5000*j+10000*k==y){
printf("%d %d %d\n",k,j,i);
return 0;
}
}
}
printf("-1 -1 -1\n");
return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #includ; did you mean #include?
    1 | #includ<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin >> n;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #includ<iostream>
a.cc:10:1: error: 'printf' was not declared in this scope
   10 | printf("%d %d %d\n",k,j,i);
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #includ<iostream>
a.cc:15:1: error: 'printf' was not declared in this scope
   15 | printf("-1 -1 -1\n");
      | ^~~~~~
a.cc:15:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n,y,i,j,k;
  cin >> n >> y;
  for(i=0;i<=n;i++){
    for(j=0;j<=i;j++){
      for(k=0;k<=n;k++){
        if(i+j+k=n && 10000*i+5000*j+1000*k=y){
          printf("%d %d %d\n",k,j,i);
          return 0;
        }
      }
    }
  }
printf("-1 -1 -1\n");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: lvalue required as left operand of assignment
    9 |         if(i+j+k=n && 10000*i+5000*j+1000*k=y){
      |                  ~~^~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n,y,i,j,k;
  cin >> n >> y;
  for(i=0;i<=n;i++){
    for(j=0;j<=i;j++){
      for(k=0;k<=n;k++){
        if(i+j+k=n && 10000i+5000j+1000k=y){
          printf("%d %d %d\n",i,j,k);
          return 0;
        }
      }
    }
  }
printf("-1 -1 -1\n");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:36: error: fixed-point types not supported in C++
    9 |         if(i+j+k=n && 10000i+5000j+1000k=y){
      |                                    ^~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n,y,i,j,k;
  cin >> n >> y;
  for(i=0;i<=n;i++){
    for(j=0;j<=i;j++){
      for(k=0;k<=n;k++){
        if(i+j+k=n && 10000i+5000j+1000k=y){
          scanf("%d %d %d\n",i,j,k);
          return 0;
        }
      }
    }
  }
printf("-1 -1 -1\n");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:36: error: fixed-point types not supported in C++
    9 |         if(i+j+k=n && 10000i+5000j+1000k=y){
      |                                    ^~~~~
Language: C++

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


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incluide; did you mean #include?
    1 | #incluide<iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> n >> y;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incluide<iostream>
a.cc:10:18: error: 'scanf' was not declared in this scope
   10 |                  scanf("%d %d %d\n",i,j,k);
      |                  ^~~~~
a.cc:16:3: error: 'printf' was not declared in this scope
   16 |   printf("-1 -1 -1\n");
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #incluide<iostream>
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n,y,i,j,k;
  cin >> n >> y;
  for(i=0;i<=n;i++){
    for(j=0;j<=i;j++){
      for(k=0;k<=n;k++){
        if(i+j+k=n && 10000i+5000j+1000k=y){
          scanf("%d %d %d\n",i,j,k);
          return 0;
        }
      }
    }
  }
}
printf("-1 -1 -1\n");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:36: error: fixed-point types not supported in C++
    9 |         if(i+j+k=n && 10000i+5000j+1000k=y){
      |                                    ^~~~~
a.cc: At global scope:
a.cc:17:7: error: expected constructor, destructor, or type conversion before '(' token
   17 | printf("-1 -1 -1\n");
      |       ^
a.cc:18:1: error: expected unqualified-id before 'return'
   18 | return 0;
      | ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int n,y,i,j,k;
cin >> n;
for(i=0;i<=n;i++){
for(j=0;j<=n;j++){
for(k=0;k<=n;n++){
if(i+j+k--n && 1000*i+5000*j+10000*k==y){
scanf("%d %d %d\n",i,j,k);
return 0;
}
}
}
}
cout << -1 << -1 << -1 <<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: expected ')' before 'n'
    9 | if(i+j+k--n && 1000*i+5000*j+10000*k==y){
      |   ~       ^
      |           )
Language: C++

#incluide<iostream>
using namespace std;
int main(){
int n,y,i,j,k;
  cin >> n >> y;
  for(i=0;i<=n;i++){
  	for(j=0;j<=n;j++){
  		for(k=0;k<=n;k++){
        	if(i+j+k==n && 1000*i+5000*j+10000*k==y){
         	 cout << i << j << k << endl;
       	 	}
          return 0;
  		}
  	}
  }
  cout<< "-1" << "-1" << "-1" << endl;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incluide; did you mean #include?
    1 | #incluide<iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> n >> y;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incluide<iostream>
a.cc:10:18: error: 'cout' was not declared in this scope
   10 |                  cout << i << j << k << endl;
      |                  ^~~~
a.cc:10:18: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:41: error: 'endl' was not declared in this scope
   10 |                  cout << i << j << k << endl;
      |                                         ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incluide<iostream>
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout<< "-1" << "-1" << "-1" << endl;
      |   ^~~~
a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:34: error: 'endl' was not declared in this scope
   16 |   cout<< "-1" << "-1" << "-1" << endl;
      |                                  ^~~~
a.cc:16:34: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#incluide<iostream>
using namespace std;
int main(){
int n,y,,i,j,k;
  cin >> n >> y;
  for(i=0;i<=n;i++){
  	for(j=0;j<=n;j++){
  		for(k=0;k<=n;k++){
        	if(i+j+k==n && 1000*i+5000*j+10000*k==y){
         	 cout << i << j << k << endl;
       	 	}
          return 0;
  		}
  	}
  }
  cout<< "-1" << "-1" << "-1" << endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incluide; did you mean #include?
    1 | #incluide<iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:9: error: expected unqualified-id before ',' token
    4 | int n,y,,i,j,k;
      |         ^
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> n >> y;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incluide<iostream>
a.cc:10:18: error: 'cout' was not declared in this scope
   10 |                  cout << i << j << k << endl;
      |                  ^~~~
a.cc:10:18: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:41: error: 'endl' was not declared in this scope
   10 |                  cout << i << j << k << endl;
      |                                         ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incluide<iostream>
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout<< "-1" << "-1" << "-1" << endl;
      |   ^~~~
a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:34: error: 'endl' was not declared in this scope
   16 |   cout<< "-1" << "-1" << "-1" << endl;
      |                                  ^~~~
a.cc:16:34: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n,y,i,j,k;
  cin >> n >> y;
  for(i=0;i<=n;i++){
    for(j=0;j<=i;j++){
      for(k=0;k<=n;k++){
        if(i+j+k=n && 10000i+5000j+1000k=y){
          scanf("%d %d %d",i,j,k);
          return 0;
        }
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:36: error: fixed-point types not supported in C++
    9 |         if(i+j+k=n && 10000i+5000j+1000k=y){
      |                                    ^~~~~
Language: C++

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

int MOD=1000000007;

int main()
{
  long long N,Y;
  cin >> N >> Y;
  for(long long x=0; x<N+1; x++){
    for(long long y=0; y<N-i+1; y++){
            long long z=N-x-y;

            if(x*10000+y*5000+z*1000==Y){
                cout << x << " " << y << " " << z << endl;
                return 0;
            }
            if(k<0){ cout << -1 << " " << -1 << " " << endl;}
    }
  }
  cout << -1 << " " << -1 << " " << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: 'i' was not declared in this scope
   15 |     for(long long y=0; y<N-i+1; y++){
      |                            ^
a.cc:22:16: error: 'k' was not declared in this scope
   22 |             if(k<0){ cout << -1 << " " << -1 << " " << endl;}
      |                ^
Language: C++

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


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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:41: error: expected ')' before '{' token
   11 |        if(y==10000*i+5000*j+1000*(n-i-j){
      |          ~                              ^
      |                                         )
a.cc:15:5: error: expected primary-expression before '}' token
   15 |     }
      |     ^