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

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

int main(void){
	ios::sync_with_stdio(false);
	int N, Y, i, j, k, l[3];
	cin >> N >> Y;
	Y /= 1000;
	i = 0;
	j = 0;
	l[]=-1
	for (i = 0; i <=N; i++) {
		for (j = 0; j <= N-j; j++) {
			if (Y == j * 5 + i * 10 + N - i - j) {
				l[1] = i;
				l[2] = j;
				l[3] = k;
			}
			l++;
		}
	}
	cout << l[1] <<' ' << l[2] <<' ' << l[3];
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: expected primary-expression before ']' token
   14 |         l[]=-1
      |           ^
a.cc:15:31: error: expected ';' before ')' token
   15 |         for (i = 0; i <=N; i++) {
      |                               ^
      |                               ;
Language: C++

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

int main(void){
	ios::sync_with_stdio(false);
	int N, Y, i, j, k,;
	cin >> N >> Y;
	Y /= 1000;
	i = 0;
	j = 0;
	for (i = 0; i <= Y / 10; i++) {
		for (j = 0; j <= Y / 5; j++) {
			if (Y == j * 5 + i * 10 + N - i - j) break;
			l++;
		}
		if (Y == j * 5 + i * 10 + N - i - j) break;

	}
	k = N - i - j;
	if (l == (Y / 10+1)*(Y / 5+1)) {
		i = -1;
		j = -1;
		k = -1;
	}
	cout << i <<' ' << j <<' ' << k;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: expected unqualified-id before ';' token
    9 |         int N, Y, i, j, k,;
      |                           ^
a.cc:17:25: error: 'l' was not declared in this scope
   17 |                         l++;
      |                         ^
a.cc:23:13: error: 'l' was not declared in this scope
   23 |         if (l == (Y / 10+1)*(Y / 5+1)) {
      |             ^
Language: C++

#include<iostream>
using namespace std;

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:36: error: 'res1000' was not declared in this scope; did you mean 'res5000'?
    8 |   int res10000 = -1, res5000 = -1; res1000 = -1;
      |                                    ^~~~~~~
      |                                    res5000
Language: C++

#include<iostream>
using namespace std;
int main() {
	int N, Y;
	cin >> N >> Y;
	int s, t, u ;
	bool X=false;
	for (int i = 0; i <= N; i++) {
		for (int j = 0; j <= N - i; j++) {
			int c;
			c = N - i - j;
			if ((10000 * i + 5000 * j + 1000 * c) == Y) {
				X = true;
				s = i;
				t = j;
				u = c;

			}
		}
	}
	if (X) {
		cout << s t u << endl;
	}
	else {
		cout << "-1 -1 -1" << endl;
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:26: error: expected ';' before 't'
   22 |                 cout << s t u << endl;
      |                          ^~
      |                          ;
Language: C++

#include<iostream>
using namespace std;
int main() {
	int N, Y;
	cin >> N >> Y;
	int s, t, u ;
	bool X=false;
	for (int i = 0; i <= N; i++) {
		for (int j = 0; j <= N - a; j++) {
			int c;
			c = N - i - j;
			if ((10000 * i + 5000 * j + 1000 * c) == Y) {
				X = true;
				s = i;
				t = j;
				u = c;

			}
		}
	}
	if (X) {
		cout << s t u << endl;
	}
	else {
		cout << "-1 -1 -1" << endl;
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:42: error: 'a' was not declared in this scope
    9 |                 for (int j = 0; j <= N - a; j++) {
      |                                          ^
a.cc:22:26: error: expected ';' before 't'
   22 |                 cout << s t u << endl;
      |                          ^~
      |                          ;
Language: C++

#include<iostream>
using namespace std;
int main() {
	int N, Y;
	cin >> N >> Y;
	int s, t, u, ;
	bool X=false;
	for (int i = 0; i <= N; i++) {
		for (int j = 0; j <= N - a; j++) {
			int c;
			c = N - i - j;
			if ((10000 * i + 5000 * j + 1000 * c) == Y) {
				X = true;
				s = i;
				t = j;
				u = c;

			}
		}
	}
	if (X) {
		cout << s t u << endl;
	}
	else {
		cout << "-1 -1 -1" << endl;
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: expected unqualified-id before ';' token
    6 |         int s, t, u, ;
      |                      ^
a.cc:9:42: error: 'a' was not declared in this scope
    9 |                 for (int j = 0; j <= N - a; j++) {
      |                                          ^
a.cc:22:26: error: expected ';' before 't'
   22 |                 cout << s t u << endl;
      |                          ^~
      |                          ;
Language: C++

#include <iostream>
#include <cmath>

using namespace std;

int main() {

    int bills,money;
    int ten_thousand_yen = -1;
    int five_thousand_yen = -1;
    int one_thousand_yen = -1;

    cin >> bills >> money;

    for(int a = 0; a <= bills, ++a) {
        for(int b = 0; b + a <= bills; ++b) {
            int c = bills - a - b;
            int total = 10000 * a + 5000 * b + 1000 * c;
            if(total == money){
                ten_thousand_yen = a;
                five_thousand_yen = b;
                one_thousand_yen = c;
            }
        }
    }

    cout << ten_thousand_yen << " " << five_thousand_yen << " " << one_thousand_yen;
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:35: error: expected ';' before ')' token
   15 |     for(int a = 0; a <= bills, ++a) {
      |                                   ^
      |                                   ;
Language: C++

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: expected primary-expression before ';' token
   10 |   for (int i=0;i<=N;+;++i){
      |                      ^
a.cc:10:22: error: expected ')' before ';' token
   10 |   for (int i=0;i<=N;+;++i){
      |       ~              ^
      |                      )
a.cc:10:25: error: 'i' was not declared in this scope
   10 |   for (int i=0;i<=N;+;++i){
      |                         ^
Language: C++

#include <bits/stdc++.h>
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+1-i; j++) {
      int k = N - i - j;
      if (10000 * i + 5000 * j + 1000 * k == Y) {
        cout << i << ' ' << j << ' ' << k << endl;
        return 0;
      }
    }
  }
  cout << "-1 -1 -1" << endl;


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

int main() {
    int N, Y;
    cin >> N >> Y;
    bool flag = 0;
    REP(x,N+1){
        if(flag == 1){
            break;
        }
        REP(y,N+1-x){
            int z = N - x - y;
            if(10000*x + 5000*y + 1000*z == Y){
                cout << x << " " << y << " " << z << endl;
                flag = 1;
                break;
            }
        }
    }
    if (!flag){
        cout << "-1 -1 -1" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> N >> Y;
      |     ^~~
a.cc:5:9: error: 'x' was not declared in this scope
    5 |     REP(x,N+1){
      |         ^
a.cc:5:5: error: 'REP' was not declared in this scope
    5 |     REP(x,N+1){
      |     ^~~
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout << "-1 -1 -1" << endl;
      |         ^~~~
a.cc:19:31: error: 'endl' was not declared in this scope
   19 |         cout << "-1 -1 -1" << endl;
      |                               ^~~~
Language: C++

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

int main(){
  int N, Y;
  cin>>N >> Y;
  int res10k=-1, res5k=-1, res1k=-1;

  for(int a=0;a<N;a++){
    for(int b=0;b<N;b++){
      int c=N-a-b;
      int total =10000*a + 5000*b + 1000c;
      if(total == Y){
        res10k = a;
        res5k = b;
        res1k = c;
      }
    }
  }
  cout << res10k << " " << res5k << " " << res1k << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:37: error: unable to find numeric literal operator 'operator""c'
   12 |       int total =10000*a + 5000*b + 1000c;
      |                                     ^~~~~
Language: C++

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

#define rep(i, n) for(int i = 0; i < (n); i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define pb push_back

bool hantei(int x, int y, int z, int Y) {
  if(x*10000 + y*5000 + z*1000 == Y) return true;
  return false;
}

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

  int N, Y;
  cin >> N >> Y;

  rep(x, N + 1) {
    rep(y, N + 1) {
      if(x + y + z > N) continue;
      if((Y - x*10000 - y*5000) % 1000 != 0) continue;
      int z = (Y - x*10000 - y*5000) / 1000;
      if(hantei(x, y, 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:22:18: error: 'z' was not declared in this scope
   22 |       if(x + y + z > N) continue;
      |                  ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: 'i' was not declared in this scope
   21 |   if (t==true) cout << i << " " <<j <<" " << k <<endl;
      |                        ^
a.cc:21:35: error: 'j' was not declared in this scope
   21 |   if (t==true) cout << i << " " <<j <<" " << k <<endl;
      |                                   ^
a.cc:21:46: error: 'k' was not declared in this scope
   21 |   if (t==true) cout << i << " " <<j <<" " << k <<endl;
      |                                              ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'i' was not declared in this scope
   10 |   for (i=0; i<=N;i++){
      |        ^
a.cc:11:13: error: 'j' was not declared in this scope
   11 |         for(j=0; j<=N-i; j++){
      |             ^
a.cc:21:24: error: 'i' was not declared in this scope
   21 |   if (t==true) cout << i << " " <<j <<" " << k <<endl;
      |                        ^
a.cc:21:35: error: 'j' was not declared in this scope
   21 |   if (t==true) cout << i << " " <<j <<" " << k <<endl;
      |                                   ^
a.cc:21:46: error: 'k' was not declared in this scope
   21 |   if (t==true) cout << i << " " <<j <<" " << k <<endl;
      |                                              ^
Language: C++

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

int main() {
	int n, y;
	bool ans = false;
	cin >> n >> y;
	y/=1000;
  	int a = y;
	if (y/10 > n) { ans = false; } else {
		for (int i = 0; a > 0; i++) {
          	if (i!=0){a = y - 10*i;}
			for (int j = 0; a > 0; j++) {
				if (j!=0) {a -= 5;}
				if (n == a+i+j){cout << i << " " << j << " " << a << endl;ans=true;goto exit;}
			}
			a = y - 10*i;
		}
	}
  	exit:if (ans) {return 0};
  	{cout << -1 << " " << -1 << " " << -1 << endl;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:32: error: expected ';' before '}' token
   20 |         exit:if (ans) {return 0};
      |                                ^
      |                                ;
Language: C++

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

int main() {
	int n, y;
	bool ans = false;
	cin >> n >> y;
	y/=1000;
  	int a = y;
	if (y/10 > n) { ans = false; } else {
		for (int i = 0; a > 0; i++) {
          	if (i!=0){a = y - 10*i;}
			for (int j = 0; a > 0; j++) {
				if (j!=0) {a -= 5;}
				if (n == a+i+j){cout << i << " " << j << " " << a << endl;ans=true;goto exit;}
			}
			a = y - 10*i;
		}
	}
  	exit:if (ans) {return 0};
  	else {cout << -1 << " " << -1 << " " << -1 << endl;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:32: error: expected ';' before '}' token
   20 |         exit:if (ans) {return 0};
      |                                ^
      |                                ;
a.cc:21:9: error: 'else' without a previous 'if'
   21 |         else {cout << -1 << " " << -1 << " " << -1 << endl;}
      |         ^~~~
Language: C

#include<stdio.h>
int n,y;
int main()
{
    int i,j,k;
    scanf("%d%d",&n,&y);
    for(i=0;i<=n;i++)
    for(j=0;j<=n;j++)
    for(k=0;k<=n,i+j+k<=n;k++)
    if(i+j+k=n&&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:10:13: error: lvalue required as left operand of assignment
   10 |     if(i+j+k=n&&i*10000+j*5000+k*1000==y)
      |             ^
Language: C++

#include <iostream>
using namespace std;

int main() {
    int N, Y;

    cin >> N >> Y;
    Y /= 1000;
    
    for (int man=0; man<=N; man++) {
        for (int go=0; go<=N-man; go++) {
            for (int sen=0; sen<=N-man-go; sen++) {
                int total = 10*man + 5*go + sen;
                if (total == Y) {
                    cout << man << " " << go << " " << sen << endl;
                    return 0;
                }
            }
        }
    }
    cout << "-1 -1 -1" << endl;
}
}

Compiler output:
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

N,Y = [int(i) for i in input().split()]
x,y,z = [0,0,0]
x+=Y//10000 ; Y2=Y%10000
y+=Y2//5000 ; Y3=Y2%5000
z+=Y3//1000
if x+y+z>N:
    print("-1 -1 -1")
elif x+y+z==N:
    print(*[x,y,z])
else:
    N-=(x+y+z)
    while x>=0 and 9<=N:
        x-=1 ; z+=10
        N-=9
    while x>=0 and 5<=N:
        x-=1 ; y+=1 ; z+=5
        N-=5
    while y>=0 and 4<=N:
        y-=1 ; z+=5
        N-=4
    while z>=0 and 1<=N:
        z-=1 ; y+=5
        N-=1
    if N!=0:
        print("-1 -1 -1")
    else:
        print(*[x,y,z])

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N,Y = [int(i) for i in input().split()]
      | ^
a.cc:13:16: error: 'z' does not name a type
   13 |         x-=1 ; z+=10
      |                ^
a.cc:16:16: error: 'y' does not name a type
   16 |         x-=1 ; y+=1 ; z+=5
      |                ^
a.cc:16:23: error: 'z' does not name a type
   16 |         x-=1 ; y+=1 ; z+=5
      |                       ^
a.cc:19:16: error: 'z' does not name a type
   19 |         y-=1 ; z+=5
      |                ^
a.cc:22:16: error: 'y' does not name a type
   22 |         z-=1 ; y+=5
      |                ^
Language: C++

#include<iostream>
using namespace std;

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

    cout << res10000 << " " << res50000 << " " << res1000 <<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:19:32: error: 'res50000' was not declared in this scope; did you mean 'res5000'?
   19 |     cout << res10000 << " " << res50000 << " " << res1000 <<endl;
      |                                ^~~~~~~~
      |                                res5000
a.cc:20:4: error: expected '}' at end of input
   20 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

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

#include<stdio.h>

int main() {
	int n, y;
	scanf_s("%d %d",&n, &y);

	for (int ix = 0; ix <= n; ++ix) {
		for (int i = 0; i <= n - ix; ++i) {
			if (ix * 10000 + i * 5000 + (n - ix - i) * 1000 == y) {
				printf_s("%d %d %d\n", ix, i, n - ix - i);
				return 0;
			}
		}
	}

	printf_s("-1 -1 -1\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    5 |         scanf_s("%d %d",&n, &y);
      |         ^~~~~~~
      |         scanf
a.cc:10:33: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
   10 |                                 printf_s("%d %d %d\n", ix, i, n - ix - i);
      |                                 ^~~~~~~~
      |                                 printf
a.cc:16:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
   16 |         printf_s("-1 -1 -1\n");
      |         ^~~~~~~~
      |         printf
Language: C++

#include<iostream>
using namespace std;
int main(){
    int x,y,z,n,s;
    cin>>n>>s;
    for(z=0;z<n;z++)
    y=((s-1000*n)-9000*z);
    if(y%4000==0&&(y/4000)>=0){x=n-z-y;if(x>=0)
    {cout<<z<<" "<<y<<" "<<x;return 0;}}
    else break;
    cout<<-1<<" "<<-1<<" "<<-1;
    return 0;
}

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

#include<iostream>
using namespace std;
int main(){
    int x,y,z,n,s;
    cin>>n>>s;
    for(x=0;x<n;x++)
    for(y=0;y<n;y++)
    for(z=0;z<n;z++)
    if(z*10000+y*5000+x*1000==s&&z+y+x==n)
    {cout<<z<<" "<<y<<" "<<x;return 0}
    cout<<-1<<" "<<-1<<" "<<-1;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:38: error: expected ';' before '}' token
   10 |     {cout<<z<<" "<<y<<" "<<x;return 0}
      |                                      ^
      |                                      ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> N >> Y;
      |     ^~~
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << res10000 << " " << res5000 << " " << res1000 << endl;
      |   ^~~~
a.cc:16:59: error: 'endl' was not declared in this scope
   16 |   cout << res10000 << " " << res5000 << " " << res1000 << endl;
      |                                                           ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:26: error: break statement not within loop or switch
   18 |         if(flag == true) break;
      |                          ^~~~~
a.cc: At global scope:
a.cc:20:5: error: expected unqualified-id before 'if'
   20 |     if(flag == false) cout << -1  << -1 << -1 << endl;
      |     ^~
a.cc:21:5: error: expected unqualified-id before 'return'
   21 |     return 0;
      |     ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

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

int main(){
    cin.tie(0);
   	ios::sync_with_stdio(false);
    int N,Y;
    cin >> N >> Y;
    int res10000 = -1, res5000 = -1, res1000= -1;
    int a,b,c;
    for(a=0;a<=N;a++){
      for(b=0;a+b<=N;b++){
        c = N - a - b;
        if((10000*a + 5000*b + 1000*c) == Y){
          res10000 = a;
          res5000 = b;
          res1000 = c;
        }
      }
    }
    cout << res10000 << res5000 << res1000 << "¥n"
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:51: error: expected ';' before '}' token
   37 |     cout << res10000 << res5000 << res1000 << "¥n"
      |                                                   ^
      |                                                   ;
   38 | }
      | ~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

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

int main(){
    cin.tie(0);
   	ios::sync_with_stdio(false);
    int N,Y;
    cin >> N >> Y;
    int res10000 = -1, res5000 = -1, res1000= -1;
    int a,b,c;
    for(a=0,a<=N;a++){
      for(b=0;a+b<=N;b++){
        c = N - a - b;
        if((10000*a + 5000*b + 1000*c) == Y){
          res10000 = a;
          res5000 = b;
          res1000 = c;
        }
      }
    }
    cout << res10000 << res5000 << res1000 << "¥n"
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:21: error: expected ';' before ')' token
   27 |     for(a=0,a<=N;a++){
      |                     ^
      |                     ;
a.cc:37:51: error: expected ';' before '}' token
   37 |     cout << res10000 << res5000 << res1000 << "¥n"
      |                                                   ^
      |                                                   ;
   38 | }
      | ~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

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

int main(){
    cin.tie(0);
   	ios::sync_with_stdio(false);
    int N,Y;
    cin >> N >> Y;
    int res10000 = -1, res5000 = -1, res1000= -1;
    int a,b,c;
    REP(a=0,N){
      for(b=0;a+b<=N;b++){
        c = N - a - b;
        if((10000*a + 5000*b + 1000*c) == Y){
          res10000 = a;
          res5000 = b;
          res1000 = c;
        }
      }
    }
    cout << res10000 << res5000 << res1000 << "¥n"
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:11: error: lvalue required as left operand of assignment
   27 |     REP(a=0,N){
      |           ^
a.cc:2:27: note: in definition of macro 'REP'
    2 | #define REP(i, n) for(int i = 0;i < n;i++)
      |                           ^
a.cc:27:11: error: lvalue required as increment operand
   27 |     REP(a=0,N){
      |           ^
a.cc:2:39: note: in definition of macro 'REP'
    2 | #define REP(i, n) for(int i = 0;i < n;i++)
      |                                       ^
a.cc:37:51: error: expected ';' before '}' token
   37 |     cout << res10000 << res5000 << res1000 << "¥n"
      |                                                   ^
      |                                                   ;
   38 | }
      | ~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;
int main() {
	ll n, y;
	cin >> n >> y;
	for (int i = 0; i <= n; i++) {
		for (int j = 0; i + j <= n; j++) {
			if (10000 * i + 5000 * j + 1000 * (n - i - j) == y){
				cout << i << " " << j << " " << n-i-j << endl;
				return 0;
		}
	}
		cout << "-1" << "-1" << "-1" << endl;
	getchar();
	getchar();
	return 0;
}

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

import java.util.*;

public class ABC085C_Otoshidama2 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int Y = sc.nextInt();
		int M = 0;
		int G = 0;
		int S = 0;
		int chek = 0;

		loop: for(int i = 0; i <= N; i++) {
			if(i == 0 && N * 10000 == Y) {
				M = N;
				chek = 1;
				break loop ;
			}
			if(i == 0 && N * 5000 == Y) {
				G = N;
				chek = 1;
				break loop ;
			}
			if(i == 0 && N * 1000 == Y) {
				S = N;
				chek = 1;
				break loop ;
			}
			if(Y >= i * 10000 && Y <= N * 10000) {
				M = i;
			}
			for(int j = 0; j <= N - M; j++) {
				G = j;
				if(M + G == N && M * 10000 + G * 5000 == Y) {
					chek = 1;
					break loop;
				}
				if((Y - (M * 10000 + G * 5000)) / 1000 == N - M - G) {
					S = (Y - (M * 10000 + G * 5000)) / 1000;
					chek = 1;
					break loop;
				}
			}
			G = 0;
		}
		if(chek == 0) {
			M = -1;
			G = -1;
			S = -1;
		}
		System.out.print(M + " " + G + " " + S);
	}
}

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

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int n;
		int y;
		try (Scanner scanner = new Scanner(System.in)) {
			n = scanner.nextInt();
			y = scanner.nextInt();
		}

		int a = y / 10000;
		int b = y % 10000 >= 5000 ? 1 : 0;
		int c = y % 10000 >= 5000 ? y % 10000 / 1000 - 5 : y % 10000 / 1000;

		if (n > y / 1000) {
			Main1.printFailed();
			return;
		}
		if (n < a + b + c) {
			Main1.printFailed();
			return;
		}

		while (true) {
			if (n >= a + b + c + 9 && a > 0) {
				a -= 1;
				c += 10;
			} else if (n >= a + b + c + 4 && b > 0) {
				b -= 1;
				c += 5;
			} else if (n >= a + b + c + 1 && a > 0) {
				a -= 1;
				b += 2;
			} else if (n == a + b + c) {
				Main1.printSuccseeded(a, b, c);
				break;
			} else {
				Main1.printFailed();
				break;
			}
		}
	}

	public static void printFailed() {
		System.out.println("-1 -1 -1");
	}

	public static void printSuccseeded(int a, int b, int c) {
		System.out.println(a + " " + b + " " + c);
	}
}

Compiler output:
Main.java:17: error: cannot find symbol
			Main1.printFailed();
			^
  symbol:   variable Main1
  location: class Main
Main.java:21: error: cannot find symbol
			Main1.printFailed();
			^
  symbol:   variable Main1
  location: class Main
Main.java:36: error: cannot find symbol
				Main1.printSuccseeded(a, b, c);
				^
  symbol:   variable Main1
  location: class Main
Main.java:39: error: cannot find symbol
				Main1.printFailed();
				^
  symbol:   variable Main1
  location: class Main
4 errors
Language: Java

import java.util.Scanner;

public class Main1 {
	public static void main(String[] args) {
		int n;
		int y;
		try (Scanner scanner = new Scanner(System.in)) {
			n = scanner.nextInt();
			y = scanner.nextInt();
		}

		int a = y / 10000;
		int b = y % 10000 >= 5000 ? 1 : 0;
		int c = y % 10000 >= 5000 ? y % 10000 / 1000 - 5 : y % 10000 / 1000;

		if (n > y / 1000) {
			Main1.printFailed();
			return;
		}
		if (n < a + b + c) {
			Main1.printFailed();
			return;
		}

		while (true) {
			if (n >= a + b + c + 9 && a > 0) {
				a -= 1;
				c += 10;
			} else if (n >= a + b + c + 4 && b > 0) {
				b -= 1;
				c += 5;
			} else if (n >= a + b + c + 1 && a > 0) {
				a -= 1;
				b += 2;
			} else if (n == a + b + c) {
				Main1.printSuccseeded(a, b, c);
				break;
			} else {
				Main1.printFailed();
				break;
			}
		}
	}

	public static void printFailed() {
		System.out.println("-1 -1 -1");
	}

	public static void printSuccseeded(int a, int b, int c) {
		System.out.println(a + " " + b + " " + c);
	}
}

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

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

int N;
i64 Y;
int main(){
    cin >> N >> Y;
    N /= 1000;

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

Compiler output:
a.cc:5:1: error: 'i64' does not name a type
    5 | i64 Y;
      | ^~~
a.cc: In function 'int main()':
a.cc:7:17: error: 'Y' was not declared in this scope
    7 |     cin >> N >> Y;
      |                 ^
Language: C++

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

using namespace std;

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

    int tt = 0, ft = 0, ot = 0;
    long long total = 0;
    bool ans = true;
    for (tt = 0 ; tt <= N ; tt++) {
        if (total + 10000 == Y) {
            tt += 1;
            break;
        } else if (total + 10000 > Y) {
            for (ft = 0 ; ft <= N-tt ; ft++) {
                if (total + 5000 == Y) {
                    ft += 1;
                    break;
                } elseif (total + 5000 > Y) {
                    if (total + (1000 * (N-(tt + ft))) >= Y) ot = (int)(Y-(10000*tt)-(5000*ft))/1000;
                    else ans = false;
                    break;
                }
                total += 5000;              
                if (ft == N-tt) {
                    ans = false;
                    break;
                }
            }
            break;
        }
        total += 10000;
        if (tt == N) {
            ans = false;
            break;
        }

    }
    
    if (! ans) cout<<"-1 -1 -1"<<endl;
    else cout<<tt<<" "<<ft<<" "<<ot<<endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:19: error: 'elseif' was not declared in this scope
   24 |                 } elseif (total + 5000 > Y) {
      |                   ^~~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define SIZE(x) ((int)(x).size())
#define UQ(v) v.erase(unique(v,begin(),v,end()),v.end());
ll INF = 1LL <<61;
#define pb push_back 
int dxy4[5] = { 0,1,0,-1,0 };
int dxy8[9] = { 0,1,1,0,-1,1,-1,-1,0 };
int gcd(int a, int b) { return b ? gcd(b, a%b) : a; }
ll mod7 = 1000000007;
ll mod9 = 1000000009;
#define all(x) (x).begin(),(x).end()
#define rep(i, n) for(int i = 0; i < n; i++)
#define FOR(i,x,n) for(int i=x;i<n;++i)
//vector< vector<int> > v (max1, vector<in t>(max2) );

int main() {
	int n,y;
	cin >> n >> y;
	y = (int)y/1000;
	if (n*10<y or n>y) {
		cout << -1 << " " << -1 << " " << -1 << endl;
		return 0;
	int v;
	rep(i, n+1)for (int j = 0; j <= n - i;++j) {
		if (i * 10 + n - i > y)break;
		if ((i * 10) + ((n - i) * 5) < y)break;
		v = (i * 10 + j * 5) + (n - i - j);
		//cout << "i:" << i << " j:" << j << " k:" << n-i-j << " v:" << v << endl;
		if (v == y) {
			cout << i << " " << j << " " << n - i - j << endl;
			return 0;
		}
	}
	cout << -1 << " " << -1 << " " << -1 << endl;
	int i;
	cin >> i;
}

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

#include <iostream>
#include <cmath>
#include <string>
#include <set>
#include <vector>
#include <map>
#include <list>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;

int main(void) {
    vector<ll> vec;
    ll n, y;
    ll i, j, k;
    cin >> n >> y;
    for(i=0; i<=min(y/1000, n); i++)
            vec.push_back(1000*i);

    sort(vec.begin(), vec.end());
    for(i=0; i<=min(y/10000, n); i++) {
        for(j=0; j<=min(y/5000, n); j++) {
            if(binary_search(vec.begin(), vec.end(), y-10000*i-5000*j) && i+j+(y-10000*i-5000*j)/1000==n) {
                printf("%lld %lld %lld", i, j, (y-10000*i-5000*j)/1000);
                return 0;
            }
        }
    }
    printf("-1 -1 -1\n");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   21 |     sort(vec.begin(), vec.end());
      |     ^~~~
      |     sqrt
a.cc:24:16: error: 'binary_search' was not declared in this scope
   24 |             if(binary_search(vec.begin(), vec.end(), y-10000*i-5000*j) && i+j+(y-10000*i-5000*j)/1000==n) {
      |                ^~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <cmath>
#include <string>
#include <set>
#include <vector>
#include <map>
#include <list>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;

int main(void) {
    vector<ll> vec;
    ll n, y;
    ll i, j, k;
    cin >> n >> y;
    for(i=0; i<=y/1000; i++) {
        for(j=0; j<=y/5000; j++) {
            vec.push_back(1000*i+5000*j);
        }
    }
    sort(vec.begin(), vec.end());
    for(i=0; i<=y/10000; i++) {
        if(binary_search(vec.begin(), vec.end(), y-10000*i)) {
            printf("%lld 0 %lld", i, (y-10000*i)/1000);
            return 0;
        }
    }
    printf("-1 -1 -1\n");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   23 |     sort(vec.begin(), vec.end());
      |     ^~~~
      |     sqrt
a.cc:25:12: error: 'binary_search' was not declared in this scope
   25 |         if(binary_search(vec.begin(), vec.end(), y-10000*i)) {
      |            ^~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
	int n,y;
	cin>>n>>y;
	int s=-1;
	int t=-1;
	int u=-1;
	
	for(int i=0;i<=n;i++){
		for(int i+j=0;j<=n;j++){
			int z=n-i-j;
			if(i*10000+j*5000+z*1000==y){
				s=i;
				t=j;
				u=z;
			}
		}
	}
	cout<<s<<' '<<t<<' '<<u<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:26: error: expected ';' before '+' token
   14 |                 for(int i+j=0;j<=n;j++){
      |                          ^
      |                          ;
a.cc:14:27: error: 'j' was not declared in this scope
   14 |                 for(int i+j=0;j<=n;j++){
      |                           ^
a.cc:14:35: error: expected ')' before ';' token
   14 |                 for(int i+j=0;j<=n;j++){
      |                    ~              ^
      |                                   )
a.cc:14:36: error: 'j' was not declared in this scope
   14 |                 for(int i+j=0;j<=n;j++){
      |                                    ^
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Eighth {
	
	public static void main(String[] args) throws Exception {
		
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        
        String boxstr[] = line.split(" ");
        int[] box = new int[2];
        box[0] = Integer.parseInt(boxstr[0]);
        box[1] = Integer.parseInt(boxstr[1])/1000;
        
        int[] gift = {-1,-1,-1};
        
        
        
      outside: for(int i=box[0];i+1>0;i--){
       // 	System.out.println("Hi" + i);
        	if(i*10==box[1]){
        		gift[0] =i;
        		gift[1] =0;
        		gift[2] =0;
        		break outside;

        	}else if(i*10 <box[1]){
            //	System.out.println("Change" + i);
            	for(int j=box[0]-i;j+1>0;j--){
              //  	System.out.println("Hii" + j);
                	if(i*10+j*5==box[1]){
                		gift[0]=i;
                		gift[1] =j;
                		gift[2] =0;
                		break outside;
                		
                	}else if(i*10+j*5 <box[1]){
                    //	System.out.println("Change" + i);
                    	for(int h=box[0]-i-j;h+1>0;h--){
                     // 	System.out.println("Hee" + h);
                        	if(i*10+j*5+h==box[1]){
                        		gift[0]=i;
                        		gift[1] =j;
                        		gift[2] =h;
                        		
                        		break outside;
                    	}
                	}
                	}
        		
        	}
        }
        
        
        
        
        
           }
        for(int i=0;i<3;i++){
        	System.out.print(gift[i]+" ");
        }
        
        
        
        


	}
	}
	

	

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

#include<stdio.h>

int main() {
	int n,i,y,a,b,c,cnt=0,d=0,e=0,f=0;
	
	scanf_s("%d %d", &n, &y);
	
		for (a = 0; a < n; a++) {
			for (b = 0; b < n; b++) {
				for (c = 0; c < n; c++) {
					if (a + b + c == n && 10000 * a + 5000 * b + 1000 * c == y) {
						d = a;
						e = b;
						f = c;
						cnt++;
						
					}



				}
			}
		}
	
	if (cnt == 0)printf("%d %d %d", -1, -1, -1);
	printf("%d %d %d", d, e, f);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d %d", &n, &y);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <bits/stdc++.h>
int main(){
  int n,y;
  cin>>n>>y;
  int a=n;
  for(int i=y;i>=0&&a>=0;i-=10000){
    if((i-a*1000)%4000==0&&i<=a*5000&&i>=a*1000){
      cout<<n-a<<' '<<(i-a*1000)/4000<<' '<<(a*5000-i)/4000;
      return 0;
    }
    a--;
  }
  cout<<"-1 -1 -1";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>n>>y;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |       cout<<n-a<<' '<<(i-a*1000)/4000<<' '<<(a*5000-i)/4000;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout<<"-1 -1 -1";
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
int main(){
  int n,y;
  cin>>n>>y;
  int a=n;
  for(int i=y;i>=0&&a>=0;i-=10000){
    if((i-a*1000)%4000==0&&i<=a*5000){
      cout<<n-a<<' '<<(i-a*1000)/4000<<' '<<(a*5000-i)/4000;
      return 0;
    }
    a--;
  }
  cout<<"-1 -1 -1";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>n>>y;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |       cout<<n-a<<' '<<(i-a*1000)/4000<<' '<<(a*5000-i)/4000;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout<<"-1 -1 -1";
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc:9:15: error: extended character 　 is not valid in an identifier
    9 |       for(int b　=　0; b + a <= N; ++b){
      |               ^
a.cc:9:19: error: extended character 　 is not valid in an identifier
    9 |       for(int b　=　0; b + a <= N; ++b){
      |                   ^
a.cc: In function 'int main()':
a.cc:9:19: error: '\U000030000' was not declared in this scope
    9 |       for(int b　=　0; b + a <= N; ++b){
      |                   ^~~
a.cc:9:24: error: 'b' was not declared in this scope
    9 |       for(int b　=　0; b + a <= N; ++b){
      |                        ^
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc:9:15: error: extended character 　 is not valid in an identifier
    9 |       for(int b　=　0; b + a <= N; ++b){
      |               ^
a.cc:9:19: error: extended character 　 is not valid in an identifier
    9 |       for(int b　=　0; b + a <= N; ++b){
      |                   ^
a.cc: In function 'int main()':
a.cc:9:19: error: '\U000030000' was not declared in this scope
    9 |       for(int b　=　0; b + a <= N; ++b){
      |                   ^~~
a.cc:9:24: error: 'b' was not declared in this scope
    9 |       for(int b　=　0; b + a <= N; ++b){
      |                        ^
Language: C++

#include <iostream>
using namespace std;

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


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

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: 'i' was not declared in this scope
    8 |         for(int a = 0; i <= N; ++i){
      |                        ^
a.cc:9:20: error: 'k' was not declared in this scope
    9 |       for(int b=0; k <= N; ++i){
      |                    ^
Language: Java

import java.util.*;

public class MyApp {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int y = sc.nextInt();
    int man = -1, gosen = -1, sen = -1;
    for (int i = 0; i <= n; i++) {
      for (int j = 0; j <= n - i; j++) {
        int k = n - i - j;
        int tmp = 10000 * i + 5000 * j + 1000 * k;
        if (y == tmp) {
          man = i;
          gosen = j;
          sen = k;
        }
      }
    }
    System.out.println(man + " " + gosen + " " + sen);
  }
}


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

import java.util.*;

public class Main {
  public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int y = sc.nextInt();
    int a = y / 10000;
    int b;
    int c;
    loop: for(int i = a; i >= 0; i--) {
      b = (y - 10000 * i) / 5000;
      for(int j = b; j >= 0; j--) {
        c = (y - 10000 * i - 5000 * j) / 1000;
        if(i + j + k == n) {
           System.out.println(i + " " + j + " " + k);
           break loop;
        }     
      }
      if(i == 0) {
        System.out.println(-1 + " " + -1 + " " + -1);
      }
    }
  }
}


Compiler output:
Main.java:15: error: cannot find symbol
        if(i + j + k == n) {
                   ^
  symbol:   variable k
  location: class Main
Main.java:16: error: cannot find symbol
           System.out.println(i + " " + j + " " + k);
                                                  ^
  symbol:   variable k
  location: class Main
2 errors