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

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:10:11: error: 'X' undeclared (first use in this function)
   10 |   for(x=0;X<=2000;x++){
      |           ^
main.c:10:11: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include "bits/stdc++.h"
#define ed cout<<"\n";
#define SPEED ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
//#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define ll longlongint
using namespace std;
int main(){
     SPEED;
     int N,Y;
     cin>>N>>Y;
     int ans10000=-1;
     int ans5000=-1;
     int ans1000=-1;

     for(int i=0;i<=N;i++){
         for(int j=0;j<=N;j++){
             int c=n-i-j;
             int sum=10000*i+5000*j+1000*c;
             if(sum==Y){
                 ans10000=i;
                 ans5000=j;
                 ans1000=c;
             }
         }
     }
     cout<<ans10000<<" "<<ans5000<<" "<<ans1000;
     ed;
    return 0;
}


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

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

int main() {
  int N,Y,count;
  vector<int> X(3);
  cin >> N >> Y;
  count=0;
 for(int i=0;i<N+1;i++){
 for(int j=0;j<N+1;j++){
 for(int k=0;k<N+1;k++){

   if(Y == 10000*i+5000*j+1000*k && N==i+j+k){
     count =1;
     X={i,j,k};
     break;
   }
   }
 }
 }
   
if(count==1){
  cout << X[0] << << X[1] << << X[2] <<endl;
}
else{
  X={-1,-1,-1};
  cout << X[0] << X[1] << X[2] <<endl;
}
}  


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

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

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

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

#define ll long long
#define INF 99999999
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()

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

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


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

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

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

        


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

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

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

        


Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: 'k' was not declared in this scope
   11 |       if(h = n - i - k && h >= 0 && 10000*i + 5000*j + 1000*h = y){
      |                      ^
Language: C++

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

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

        

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'h' was not declared in this scope
   11 |       if(h = n - i - k && h >= 0 && 10000*i + 5000*j + 1000*h = y){
      |          ^
a.cc:11:22: error: 'k' was not declared in this scope
   11 |       if(h = n - i - k && h >= 0 && 10000*i + 5000*j + 1000*h = y){
      |                      ^
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 a = -1;
        int b = -1;
        int c = -1;

        for(int i=0; i<=n; i++){
        	for(int j=0; j<=n-i; j++){
                if(10000*i+5000*j+1000*(n-i-j) == n){
                    int a = i;
                    int b = j;
                    int c = n-i-j;
                }
            }
        }
        System.out.print(a+" "+b+" "+c);
    }
}


Compiler output:
Main.java:16: error: variable a is already defined in method main(String[])
                    int a = i;
                        ^
Main.java:17: error: variable b is already defined in method main(String[])
                    int b = j;
                        ^
Main.java:18: error: variable c is already defined in method main(String[])
                    int c = n-i-j;
                        ^
3 errors
Language: C++

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

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

#include <bits/stdc++.h>

int n, y

int main() {
    std::cin >> n >> y;
    y /= 1000;
    for (int i = 1; i < n; i++) {
        for (int p = 1; p < n - i; p++) {
            if (10*i+5*p+1*(n-i-p) == y) {
                std::cout << i << " " << " " << p << " " << (n-i-p) << std::endl;
                return 0;
            }
        }
    }
}


Compiler output:
a.cc:5:1: error: expected initializer before 'int'
    5 | int main() {
      | ^~~
Language: Java

import java.util.Scanner;

public class C85 {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());
	int Y = Integer.parseInt(sc.next());
	int num10000;
	int num5000;
	int num1000;
	int sum;
	int cnt = 0;
	
	for(int i=0; i <= N; i++) {
	    for(int j=0; j <= N-i; j++) {
		for(int k=0; k <= N-i-j; k++) {
		    sum = 10000*i + 5000*j + 1000*k;
		    System.out.println(sum);
		    if(sum == Y) {
			cnt++;
		    }
		}
	    }
	}
	System.out.println(cnt);
    }
}


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

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

int main(){
    int N, Y;
    cin >> N >> Y;
    int man1 = -1, sen5 = -1, sen1 = -1;

    for(int a=0;a<=N;a++){
        for(int b=0;b<=N;b++){
            int c = N - a - b;
            if(Y == a*10000 + b*5000 + c*1000) {
                man1 = a;
                sen5 = b;
                sen1 = c;
            }
        }
    } 
    cout << man1 << " " << sen5 << " " << senl << " " << end1 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:43: error: 'senl' was not declared in this scope; did you mean 'sen1'?
   19 |     cout << man1 << " " << sen5 << " " << senl << " " << end1 ;
      |                                           ^~~~
      |                                           sen1
a.cc:19:58: error: 'end1' was not declared in this scope
   19 |     cout << man1 << " " << sen5 << " " << senl << " " << end1 ;
      |                                                          ^~~~
Language: C++

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

int main(){
    int N, Y;
    cin >> N >> Y;
    int man1 = -1, sen5 = -1, sen1 = -1;

    for(int a=0;a<=N;a++){
        for(int b=0;b<=N;b++){
            int c = N - a - b;
            if(Y == a*10000 + b*5000 + c*1000) {
                man1 = a;
                sen5 = b;
                sen1 = c;
            }
        }
    } 
    cout << man1 << " " << sen5 << " " << sen1 << " " << end1 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:58: error: 'end1' was not declared in this scope
   19 |     cout << man1 << " " << sen5 << " " << sen1 << " " << end1 ;
      |                                                          ^~~~
Language: C++

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

int main(){
    int N, Y;
    cin >> N >> Y;
    int man1 = -1, sen1 = -1, sen1 = -1;

    for(int a=0;a<=N;a++){
        for(int b=0;b<=N;b++){
            int c = N - a - b;
            if(Y == a*10000 + b*5000 + c*1000) {
                man1 = a;
                sen5 = b;
                sen1 = c;
            }
        }
    } 
    cout << man1 << " " << sen5 << " " << sen1 << " " << end1 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:31: error: redeclaration of 'int sen1'
    7 |     int man1 = -1, sen1 = -1, sen1 = -1;
      |                               ^~~~
a.cc:7:20: note: 'int sen1' previously declared here
    7 |     int man1 = -1, sen1 = -1, sen1 = -1;
      |                    ^~~~
a.cc:14:17: error: 'sen5' was not declared in this scope; did you mean 'sen1'?
   14 |                 sen5 = b;
      |                 ^~~~
      |                 sen1
a.cc:19:28: error: 'sen5' was not declared in this scope; did you mean 'sen1'?
   19 |     cout << man1 << " " << sen5 << " " << sen1 << " " << end1 ;
      |                            ^~~~
      |                            sen1
a.cc:19:58: error: 'end1' was not declared in this scope
   19 |     cout << man1 << " " << sen5 << " " << sen1 << " " << end1 ;
      |                                                          ^~~~
Language: C++

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

int main(){
    int N, Y;
    cin >> N >> Y;
    int 1man = -1,5sen = -1, 1sen = -1;

    for(int a=0;a<=N;a++){
        for(int b=0;b<=N;b++){
            int c = N - a - b;
            if(Y == a*10000 + b*5000 + c*1000) {
                man1 = a;
                sen5 = b;
                sen1 = c;
            }
        }
    } 
    cout << man1 << " " << sen5 << " " << sen1 << " " << end1 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected unqualified-id before numeric constant
    7 |     int 1man = -1,5sen = -1, 1sen = -1;
      |         ^~~~
a.cc:13:17: error: 'man1' was not declared in this scope
   13 |                 man1 = a;
      |                 ^~~~
a.cc:14:17: error: 'sen5' was not declared in this scope
   14 |                 sen5 = b;
      |                 ^~~~
a.cc:15:17: error: 'sen1' was not declared in this scope
   15 |                 sen1 = c;
      |                 ^~~~
a.cc:19:13: error: 'man1' was not declared in this scope
   19 |     cout << man1 << " " << sen5 << " " << sen1 << " " << end1 ;
      |             ^~~~
a.cc:19:28: error: 'sen5' was not declared in this scope
   19 |     cout << man1 << " " << sen5 << " " << sen1 << " " << end1 ;
      |                            ^~~~
a.cc:19:43: error: 'sen1' was not declared in this scope
   19 |     cout << man1 << " " << sen5 << " " << sen1 << " " << end1 ;
      |                                           ^~~~
a.cc:19:58: error: 'end1' was not declared in this scope
   19 |     cout << man1 << " " << sen5 << " " << sen1 << " " << end1 ;
      |                                                          ^~~~
Language: C++

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

int main(){
    int N, Y;
    cin >> N >> Y;
    int 1man = -1,5sen = -1, 1sen = -1;

    for(int a=0;a<=N;a++){
        for(int b=0;b<=N;b++){
            int c = N - a - b;
            if(Y == a*10000 + b*5000 + c*1000) {
                1man = a;
                5sen = b;
                1sen = c;
            }
        }
    } 
    cout << 1man << " " << 5sen << " " << 1sen<< " " << end1 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected unqualified-id before numeric constant
    7 |     int 1man = -1,5sen = -1, 1sen = -1;
      |         ^~~~
a.cc:13:17: error: unable to find numeric literal operator 'operator""man'
   13 |                 1man = a;
      |                 ^~~~
a.cc:14:17: error: unable to find numeric literal operator 'operator""sen'
   14 |                 5sen = b;
      |                 ^~~~
a.cc:15:17: error: unable to find numeric literal operator 'operator""sen'
   15 |                 1sen = c;
      |                 ^~~~
a.cc:19:13: error: unable to find numeric literal operator 'operator""man'
   19 |     cout << 1man << " " << 5sen << " " << 1sen<< " " << end1 ;
      |             ^~~~
a.cc:19:28: error: unable to find numeric literal operator 'operator""sen'
   19 |     cout << 1man << " " << 5sen << " " << 1sen<< " " << end1 ;
      |                            ^~~~
a.cc:19:43: error: unable to find numeric literal operator 'operator""sen'
   19 |     cout << 1man << " " << 5sen << " " << 1sen<< " " << end1 ;
      |                                           ^~~~
a.cc:19:57: error: 'end1' was not declared in this scope
   19 |     cout << 1man << " " << 5sen << " " << 1sen<< " " << end1 ;
      |                                                         ^~~~
Language: C++

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

int main(){
    int N, Y;
    cin >> N >> Y;
    int 1man = -1,5sen = -1, 1sen = -1;

    for(int a=0;a<=N;a++){
        for(int b=0;b<=N;b++){
            int c = N - a - b;
            if(Y == a*10000 + b*5000 + c*1000) {
                1man = a;
                5sen = b;
                1sen = c;
            }
        }
    } 
    cout << 1man << 5sen << 1sen<< end1 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected unqualified-id before numeric constant
    8 |     int 1man = -1,5sen = -1, 1sen = -1;
      |         ^~~~
a.cc:14:17: error: unable to find numeric literal operator 'operator""man'
   14 |                 1man = a;
      |                 ^~~~
a.cc:15:17: error: unable to find numeric literal operator 'operator""sen'
   15 |                 5sen = b;
      |                 ^~~~
a.cc:16:17: error: unable to find numeric literal operator 'operator""sen'
   16 |                 1sen = c;
      |                 ^~~~
a.cc:20:13: error: unable to find numeric literal operator 'operator""man'
   20 |     cout << 1man << 5sen << 1sen<< end1 ;
      |             ^~~~
a.cc:20:21: error: unable to find numeric literal operator 'operator""sen'
   20 |     cout << 1man << 5sen << 1sen<< end1 ;
      |                     ^~~~
a.cc:20:29: error: unable to find numeric literal operator 'operator""sen'
   20 |     cout << 1man << 5sen << 1sen<< end1 ;
      |                             ^~~~
a.cc:20:36: error: 'end1' was not declared in this scope
   20 |     cout << 1man << 5sen << 1sen<< end1 ;
      |                                    ^~~~
Language: C++

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

int main{
    int N, Y;
    cin >> N >> Y;
    int 1man = -1,5sen = -1, 1sen = -1;

    for(int a=0;a<=N;a++){
        for(int b=0;b<=N;b++){
            int c = N - a - b;
            if(Y == a*10000 + b*5000 + c*1000) {
                1man = a;
                5sen = b;
                1sen = c;
            }
        }
    } 
    cout << 1man << 5sen << 1sen<< end1 ;
}

Compiler output:
a.cc:5:5: error: cannot declare '::main' to be a global variable
    5 | int main{
      |     ^~~~
a.cc:6:5: error: expected primary-expression before 'int'
    6 |     int N, Y;
      |     ^~~
a.cc:6:5: error: expected '}' before 'int'
a.cc:5:9: note: to match this '{'
    5 | int main{
      |         ^
a.cc:7:5: error: 'cin' does not name a type
    7 |     cin >> N >> Y;
      |     ^~~
a.cc:8:9: error: expected unqualified-id before numeric constant
    8 |     int 1man = -1,5sen = -1, 1sen = -1;
      |         ^~~~
a.cc:10:5: error: expected unqualified-id before 'for'
   10 |     for(int a=0;a<=N;a++){
      |     ^~~
a.cc:10:17: error: 'a' does not name a type
   10 |     for(int a=0;a<=N;a++){
      |                 ^
a.cc:10:22: error: 'a' does not name a type
   10 |     for(int a=0;a<=N;a++){
      |                      ^
a.cc:20:5: error: 'cout' does not name a type
   20 |     cout << 1man << 5sen << 1sen<< end1 ;
      |     ^~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++

//10000 円札と、5000 円札と、1000 円札が合計で NN 枚あって、合計金額が YY 円であったという。このような条件を満たす各金額の札の枚数の組を 1 つ求めなさい。そのような状況が存在し得ない場合には -1 -1 -1 と出力しなさい。

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

int main(){
    int X = -1, Y = -1, Z = -1;

    int N, SUM;

    cin >> N >> SUM;

    for (int x; x <= N; ++x){
        for (int y; y <= N; ++ y){
            int z = N - x - y;
            int total = 10000 * x + 5000 * y + 1000 * z;

            if (total == SUM){
                X = x; Y = y; Z = z;
                break;
            }
        }
    }

    cout << X << " " << Y << " " << Z << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:26:47: error: expected '}' at end of input
   26 |     cout << X << " " << Y << " " << Z << endl;
      |                                               ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C++

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

int main(){
    int X = -1, Y = -1, Z = -1;

    int N, SUM;

    cin >> N >> SUM;

    for (int x; x <= N; ++x){
        for (int y; y <= N; ++ y){
            int z = N - x - y;
            int total = 10000 * x + 5000 * y + 1000 * z;

            if (total == sum){
                X = x; Y = y; Z = z;
                break;
            }
        }
    }

    cout << X << " " << Y << " " << Z << endl;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:26: error: 'sum' was not declared in this scope
   17 |             if (total == sum){
      |                          ^~~
Language: C++

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

int main(){
    int X = -1, Y = -1, Z = -1;

    int N, SUM;

    cin >> N >> SUM;

    for (int x; x <= N; ++x){
        for (int y; y <= N; ++ y){
            int z = N - x - y;
            int total = 10000 * x + 5000 * y + 1000 * z;

            if (total == sum){
                X = x; Y = y; Z = z;
                break;
            }
        }
    }

    cout << (X, Y, Z) << endl;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:26: error: 'sum' was not declared in this scope
   17 |             if (total == sum){
      |                          ^~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: expected ';' before 'for'
    6 |     cin>>m>>n
      |              ^
      |              ;
    7 |     for(int i=0;i<=m;i++)
      |     ~~~       
a.cc:7:17: error: 'i' was not declared in this scope
    7 |     for(int i=0;i<=m;i++)
      |                 ^
a.cc:8:21: error: 'j' was not declared in this scope
    8 |         for(int j=0;j<=m;j++)
      |                     ^
a.cc:9:29: error: 'k' was not declared in this scope
    9 |                 for(int k=0;k<=m,i+j+k<=m;k++)
      |                             ^
Language: C++

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

int main(){
    int N, Y;
    cin >> N >> Y;
    for(int x = 0; x <= N; x++){
        for(int y = 0; y <= N-x; y++){
                int Z = N-x-y;
                if((x*10000)+(y*5000)+(z*1000) == Y){
            }
        }
    }
    cout << x << ' ' << y << ' ' << z << endl;
                    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:40: error: 'z' was not declared in this scope
   11 |                 if((x*10000)+(y*5000)+(z*1000) == Y){
      |                                        ^
a.cc:15:13: error: 'x' was not declared in this scope
   15 |     cout << x << ' ' << y << ' ' << z << endl;
      |             ^
a.cc:15:25: error: 'y' was not declared in this scope
   15 |     cout << x << ' ' << y << ' ' << z << endl;
      |                         ^
a.cc:15:37: error: 'z' was not declared in this scope
   15 |     cout << x << ' ' << y << ' ' << z << endl;
      |                                     ^
Language: C++

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

int main(){
    int N, Y;
    cin >> N >> Y;
    for(int x = 0; x <= N; x++){
        for(int y = 0; y <= N-x; y++){
                int Z = N-x-y;
                if((x*10000)+(y*5000)+(z*1000) == Y){
                    cout << x << ' ' << y << ' ' << z << endl;
                    return 0;
                }
        }
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:40: error: 'z' was not declared in this scope
   11 |                 if((x*10000)+(y*5000)+(z*1000) == Y){
      |                                        ^
a.cc:16:6: error: expected '}' at end of input
   16 |     }
      |      ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

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

Compiler output:
a.cc:12:34: error: empty character constant
   12 |                     cout << x << '' << y << '' << z << endl;
      |                                  ^~
a.cc:12:45: error: empty character constant
   12 |                     cout << x << '' << y << '' << z << endl;
      |                                             ^~
Language: C++

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

int main(){
  int N, Y;
  cin >> N >> Y;
  
  for(int m = 0; true; m++){
    if(m > Y) break;
    for(int g = 0; true; g++){
      int s = n - m - g;
      if(s < 0)  break;
      if(s * 1000 + g * 5000 + m * 10000 == Y)
      {
        cout << m << " " << g << " " << s << endl;
        return 0;
      }
    }
  }
  cout << "-1 -1 -1" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'n' was not declared in this scope
   11 |       int s = n - m - g;
      |               ^
Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 1000000007;
typedef long double ld;
const ll INF = 1e+14;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second

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

    int N, Y; cin >> N >> Y;
    Y /= 1000;

    rep(a, N + 1) {
        rep(b, N + 1) {
            if(a + b <= N && a + 5 * b + 10 * (N - a - b) == Y) {
                cout << a << " " << b << " " << c << "\n";
                return 0;
            } 
        }
    }

    cout << "-1 -1 -1\n" ; 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:49: error: 'c' was not declared in this scope
   51 |                 cout << a << " " << b << " " << c << "\n";
      |                                                 ^
Language: C++

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

/* メモリ食い過ぎ注意 */
#define int long long

typedef long long ll;

int euclid(int a, int b)
{
    if (a < b)
        euclid(b, a);
    if (b == 0)
        return a;
    int r;
    while ((r = a % b))
    {
        a = b;
        b = r;
    }
    return b;
}

/* define const */
const ll INF = (1ll << 60);
const ll MOD = (ll)1e9 + 7;
/* end defineing */

signed main()
{
    ll n, y;
    cin >> n >> y;

    int x = -1, y = -1, z = -1;
    for (int i = 0; i <= n; i++)
    {
        for (int j = 0; i + j <= n; j++)
        {
            ll sum = i * 10000 + j * 5000 + (n - i - j) * 1000;
            if (sum == y)
            {
                x = i;
                y = j;
                z = (n - i - j);
            }
        }
    }
    cout << x << " " << y << " " << z << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:17: error: redeclaration of 'long long int y'
   34 |     int x = -1, y = -1, z = -1;
      |                 ^
a.cc:31:11: note: 'll y' previously declared here
   31 |     ll n, y;
      |           ^
Language: C++

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

typedef long long ll;
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 ot=y-10000*i-5000j;
      if (ot == 1000*(n-i-j)){
	a=i;
	b=j;
	c=n-i-j;
      }
    }
  }
  cout << a << " " << b << " " << c << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:23: error: cannot convert '__complex__ int' to 'int' in initialization
   16 |       int ot=y-10000*i-5000j;
      |              ~~~~~~~~~^~~~~~
      |                       |
      |                       __complex__ int
Language: C++

n, yen = map(int ,input().split())

for x in range(yen // 10000 + 1):
    for y in range((yen - x * 10000) // 5000 + 1):
        if x * 10000 + y * 5000 + 1000 *(n - x - y) == yen:
            print(x, y, (n-x-y))
            exit()

print(-1, -1, -1)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n, yen = map(int ,input().split())
      | ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
  int N,Y;
  cin >> N >> Y;
  ubt 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 = 1000*a+5000*b+1000*c;
      if(total == Y){
        res10000 = a;
        res5000 = b;
        res1000 = c;
      }
    }
  }
  cout << res10000 << ' ' << res5000 << ' ' << res1000 <<endl;  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'ubt' was not declared in this scope
    6 |   ubt res10000 = -1, res5000 = -1; res1000 = -1;
      |   ^~~
a.cc:6:36: error: 'res1000' was not declared in this scope
    6 |   ubt res10000 = -1, res5000 = -1; res1000 = -1;
      |                                    ^~~~~~~
a.cc:12:9: error: 'res10000' was not declared in this scope
   12 |         res10000 = a;
      |         ^~~~~~~~
a.cc:13:9: error: 'res5000' was not declared in this scope
   13 |         res5000 = b;
      |         ^~~~~~~
a.cc:18:11: error: 'res10000' was not declared in this scope
   18 |   cout << res10000 << ' ' << res5000 << ' ' << res1000 <<endl;  return 0;
      |           ^~~~~~~~
a.cc:18:30: error: 'res5000' was not declared in this scope
   18 |   cout << res10000 << ' ' << res5000 << ' ' << res1000 <<endl;  return 0;
      |                              ^~~~~~~
Language: C++

#include<vector>
#include<algorithm>
using namespace std;
int main(void){
  int N,Y;
  cin >> N >>Y;
  int TT=10000,FT=5000,T=1000;
  int flag=0;
  for(int i = 0; i <= N; ++i){
    for(int j = 0; j <= N; ++j){
      for(int k = 0; k <= N; ++k){
        if(i*TT+j*FT+k*T == Y && i+k+k <= N){
          cout << i << ' '<< j << ' '<< k << ' ' << endl;
          flag=1;
        }
        if(flag) break;

      }
      if(flag) break;

    }
    if(flag) break;
  }
  if(flag == 0) cout << -1 << ' '<< -1 << ' '<< -1 << ' '<< endl;
  return 0;
}
                 

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> N >>Y;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:13:11: error: 'cout' was not declared in this scope
   13 |           cout << i << ' '<< j << ' '<< k << ' ' << endl;
      |           ^~~~
a.cc:13:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:53: error: 'endl' was not declared in this scope
   13 |           cout << i << ' '<< j << ' '<< k << ' ' << endl;
      |                                                     ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<algorithm>
  +++ |+#include <ostream>
    3 | using namespace std;
a.cc:24:17: error: 'cout' was not declared in this scope
   24 |   if(flag == 0) cout << -1 << ' '<< -1 << ' '<< -1 << ' '<< endl;
      |                 ^~~~
a.cc:24:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:61: error: 'endl' was not declared in this scope
   24 |   if(flag == 0) cout << -1 << ' '<< -1 << ' '<< -1 << ' '<< endl;
      |                                                             ^~~~
a.cc:24:61: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

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

N,Y = map(int,input().split())

for z in range(N):
  money = z*1000
  for y in range(N-z):
    x = N-y-z
    money += y*5000+x*10000
    if money==Y:
      print(x,y,z)
      exit()
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<iostream>
#include<algorithm>
#include<string>
using namespace std;

int main(){
	int n,y;

	cin>>n>>y;
	y/=1000;

	for(int i=0;i<=;i++)
		if((y-n-9*i)/4<=100&&(y-n-9*i)%4==0){
			cout<<i<<" "<<(y-n-9*i)/4<<" "<<n-i-(y-n-9*i)/4<<endl;
			return 0;
		}
	cout<<"-1 -1 -1"<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: expected primary-expression before ';' token
   12 |         for(int i=0;i<=;i++)
      |                        ^
Language: C++

#include<iostream>
#include<string.h>
using namespace std;

int main()
{
    int n;10
    long long y; 
    cin >> n >> y;
    int m1000 = -1, m5000 = -1, m10000 = -1;
    int k = 0;

    for (int i=0; i<=n; i++)
    {
        for (int j=0; j<=n-i; j++)
        {
            k = n - i - j;
            if( y == i*10000 + j*5000 + k*1000)
            {
                m10000 = i;
                m5000 = j;
                m1000 = k;
                break;
            }
        }
    }

    cout << m10000 << " " << m5000 << " " << m1000 << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected ';' before 'long'
    7 |     int n;10
      |             ^
      |             ;
    8 |     long long y;
      |     ~~~~     
a.cc:9:17: error: 'y' was not declared in this scope
    9 |     cin >> n >> y;
      |                 ^
Language: C++

#include <iostream>

using namespace std;


int main()
{
	int N, Y;
	int count[3]; // 0:10000 1:5000 2:1000
	bool flag = false;
	memset(count, 0, sizeof(int) * 3);

	cin >> N >> Y;

	for (int i = 1; i <= N; i++)
	{
		
		if (Y - 10000 >= 0)
		{
			Y -= 10000;
			count[0]++;
			if (Y == 0)
			{
				flag = true;
				break;
			}
		}
		else
		{
			if (Y - 5000 >= 0)
			{
				Y -= 5000;
				count[1]++;
				if (Y == 0)
				{
					flag = true;
					break;
				}
			}
			else
			{
				if (Y - 1000 >= 0)
				{
					Y -= 1000;
					count[2]++;
					if (Y == 0)
					{
						flag = true;
						break;
					}
				}
			}
		}
	}

	if (flag == true)
	{
		cout << count[0] << " " << count[1] << " " << count[2] << endl;
	}
	else
	{
		cout << "-1 -1 -1" << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'memset' was not declared in this scope
   11 |         memset(count, 0, sizeof(int) * 3);
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>

using namespace std;

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

	if(Y%1000 != 0) cout << "-1 -1 -1";
    
  	bool breakF = false;
  	for(int i=0; i<=N; i++){
     	for(int j=0; j+i<=N; j++){
          	int hideo_num = N - i - j;
          
          	int total = i*10000 + j*5000 + hideo_num*1000;
          
         	 if(Y == total){
               	cout << yukiti_num << " " << yosano_num << " " << hideo_num << endl;
               	breakF = true;
              	break;
             }
        }
      	if(breakF) break;
    }
  	if(!breakF){
      	cout << "-1 -1 -1";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: 'yukiti_num' was not declared in this scope
   20 |                 cout << yukiti_num << " " << yosano_num << " " << hideo_num << endl;
      |                         ^~~~~~~~~~
a.cc:20:46: error: 'yosano_num' was not declared in this scope
   20 |                 cout << yukiti_num << " " << yosano_num << " " << hideo_num << endl;
      |                                              ^~~~~~~~~~
Language: C++

#include <iostream>

using namespace std;

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

	if(Y%1000 != 0) cout << "-1 -1 -1";
    
  	bool breakF = false;
  	for(int i=0; i<=N; i++){
     	for(int j=0; j+i<=N; j++){
          	int yukiti_num = i;
          	int yosano_num = j;
          	int hideo_num = N - i - j;
          
          	int total = i*10000 + j*5000 + (Y-i*10000 - j*5000)
          
         	 if(Y == total){
               	cout << yukiti_num << " " << yosano_num << " " << hideo_num << endl;
               	breakF = true;
              	break;
             }
        }
      	if(breakF) break;
    }
  	if(!breakF){
      	cout << "-1 -1 -1";
    }
}

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

#include <iostream>

using namespace std;

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

	if(Y%1000 != 0) cout << "-1 -1 -1";
    
  	bool breakF = false;
  	for(int i=0; i<=N; i++){
     	for(int j=0; j+i<=N; j++){
          	int yukiti_num = i;
          	int yosano_num = j;
          	int hideo_num = N - i - j;
          
          	int total = i*10000 + j*5000 + (Y-i*10000 - j*5000)
          
         	 if(Y == total){
               	cout << yukiti_num << " " << yosano_num << " " << hideo_num << endl;
               	breakF = true;
              	break;
             }
        }
      	if(breakF) break;
    }
  	if(!breakF) cout << "-1 -1 -1";
}

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

#include <iostream>

using namespace std;

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

	if(Y%1000 != 0) cout << -1 << " " << -1 << " " << -1;
    
  	bool breakF = false;
  	int ans = 0;
  	for(int i=0; i<N; i++){
     	for(int j=0; j<N; j++){
         	 if(Y == i*10000 + j*5000 + (Y-i*10000 - j*5000)){
               cout << i << " " << j << " " << N-i-j << endl;
               breakF = ture;
               break;
             }
        }
      	if(breakF) break;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:25: error: 'ture' was not declared in this scope
   18 |                breakF = ture;
      |                         ^~~~
Language: C++

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

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

  return 0;
}


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

#include <cstdio>
using namespace std;
int main(void)
{
  int n, y;
  bool flag=True;
  scanf("%d %d", &n, &y);
  
  for(int i=0; i<=n; i++)
  {
    for(int j=0; j<=n-i; j++)
    {
      for(int k=0; k<=n-i-j; k++)
      {
        if(i*10000 + j*5000 + k*1000 == y)
        {
          printf("%d %d %d\n", i, j, k);
          flag = False;
          break;
        }
      }
    }
  }
  
  if(flag) printf("-1 -1 -1\n");
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'True' was not declared in this scope
    6 |   bool flag=True;
      |             ^~~~
a.cc:18:18: error: 'False' was not declared in this scope
   18 |           flag = False;
      |                  ^~~~~
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define int64 long long
#define yokuwaruprime (10*10*10*10*10*10*10*10*10+7)
using namespace std;

int main(){
  int n,yen;
  cin>>n>>yen;
  int ans10=-1,ans5=-1,ans1=-1;
  rep(i,yen/10000+1){
    rep(j,n-i+1){
      if(9*s+4*t==yen/1000-n){
        ans10=i; ans5=j; ans1=n-i-j;
      }
    }
  }
  cout<<ans10<<" "<<ans5<<" "<<ans1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: 's' was not declared in this scope
   20 |       if(9*s+4*t==yen/1000-n){
      |            ^
a.cc:20:16: error: 't' was not declared in this scope
   20 |       if(9*s+4*t==yen/1000-n){
      |                ^
Language: C++

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

using namespace std;


int main(){
  int n,y;
  cin >> n >> Y;
  int judge=0;
  for(int x=0; ;x++){
    for(int y=0; ;y++){
      if(10000*x + 5000*y + 1000*(n-x-y) == Y){
        judge=1;
        break;
      }
      else if(10000*x + 5000*y + 1000*(n-x-y) > Y){
        judge=2;
        break;
      }
    }
    if(judge==1 || judge ==2) break;
  }
  if(judge == 1){
    cout << x <<" "<<y <<" "<<n-x-y <<" "<< endl;
  }else{
    cout << "-1 -1 -1" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'Y' was not declared in this scope
   12 |   cin >> n >> Y;
      |               ^
a.cc:28:13: error: 'x' was not declared in this scope
   28 |     cout << x <<" "<<y <<" "<<n-x-y <<" "<< endl;
      |             ^
Language: C++

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

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

    int x=0,y=0;

    for ( ; x <= N ; x++){
        for ( ; y <= N-x ; y++){
            if( 10000*x+5000*y+1000*(N-x-y) == Y) {
                break;
            }
        }
        if( 10000*x+5000*y+1000*(N-x-y) == Y) break;

    }

    if ( x=N && 10000*x != Y) {
        cout << "-1 -1 -1" << endl;
    }

    if( 10000*x+5000*y+1000*(N-x-y) == Y) {
        cout << x << y << z <<endl;
    }


}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:27: error: 'z' was not declared in this scope
   25 |         cout << x << y << z <<endl;
      |                           ^
Language: C++

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

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

    int x=0,y=0,ansx; ansy; ansz;

    for ( ; x <= N ; x++){
        for ( ; y <= N-x ; y++){
            if( 10000*x+5000*y+1000*(N-x-y) == Y) {
                break;
            }
        }
        if( 10000*x+5000*y+1000*(N-x-y) == Y) break;

    }

    if ( x=N && 10000*x != Y) {
        cout << "-1 -1 -1" << endl;
    }

    if( 10000*x+5000*y+1000*(N-x-y) == Y) {
        cout << x << y << z <<endl;
    }


}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: 'ansy' was not declared in this scope; did you mean 'ansx'?
    8 |     int x=0,y=0,ansx; ansy; ansz;
      |                       ^~~~
      |                       ansx
a.cc:8:29: error: 'ansz' was not declared in this scope; did you mean 'ansx'?
    8 |     int x=0,y=0,ansx; ansy; ansz;
      |                             ^~~~
      |                             ansx
a.cc:25:27: error: 'z' was not declared in this scope
   25 |         cout << x << y << z <<endl;
      |                           ^
Language: C++

#include<bits/stdc++.h>
2.using namespace std;
3.int main(){
4.  int N,Y;cin>>N>>Y;
5.  bool finished=false;
6.  for(int i=0;i<=N;i++){
7.  	for(int j=0;j<=N-i;j++){
8.      if(10000*i+5000*j+1000*(N-i-j)==Y){
9.      	cout<<i<<" "<<j<<" "<<N-i-j<<endl;
10.        finished=true;
11.        break;
12.      }
13.    }
14.    if(finished) break;
15.    else if(i==N-1) cout<<-1<<" "<<-1<<" "<<-1<<endl;
16.  }
17.}


Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.using namespace std;
      | ^~~~~~~
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3.int main(){
      | ^~~~~
Language: Java

	private void solveC() {
		Scanner scanner = null;
		int n = 0;
		int y = 0;

		try {
			scanner = new Scanner(System.in);
			n = scanner.nextInt();
			y = scanner.nextInt();

			for (int i = n; i >= 0; i--) {
				if (i * 10000 > y) {
					continue;
				}
				for (int j = 0; j <= n - i; j++) {
					for (int k = 0; k <= n - i - j; k++) {
						if (n == i + j + k && i * 10000 + j * 5000 + k * 1000 == y) {
							System.out.println(i + " " + j + " " + k);
							return;
						}
					}
				}
			}

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

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	private void solveC() {
	        ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.Scanner;
public class Otoshidama{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int Y = scan.nextInt();
        int count = 0;
        int x = 0;
        int y = 0;

        for(x = 0; x <= N; x++){
            for(y = 0; y <= N-x; y++){
                if((Y == 10000*x + 5000 * y + 1000 * (N-x-y)) && (count == 0)){
                    System.out.println(x + " " + y + " " + (N - x- y));
                    count++;
                    break;
                }
            }
        }
        
        if(count == 0){            
            System.out.println("-1 -1 -1");
        }
    }
}

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

#include <cstdio>

int main(){
    int N, Y;
    scanf("%d %d", &N, &Y);
    Y = Y / 1000;

    for(int x = 0; x <= N; x++){
        for(int y = 0; y <= N - x; y++){
            int z = N - x - y
            if(x * 10 + y * 5 + z == Y){
                printf("%d %d %d", x, y, z);
                return 0;
            }
            }
        }
    }

    printf("-1 -1 -1");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: expected ',' or ';' before 'if'
   11 |             if(x * 10 + y * 5 + z == Y){
      |             ^~
a.cc: At global scope:
a.cc:19:11: error: expected constructor, destructor, or type conversion before '(' token
   19 |     printf("-1 -1 -1");
      |           ^
a.cc:20:5: error: expected unqualified-id before 'return'
   20 |     return 0;
      |     ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
 //Compiler version g++ 6.3.0

 int main()
 {
 	ll n,x;
 	cin >> n >> x;
 	 m = (x-n*1000)/1000;
 	if(m<0){
 		cout << "-1 -1 -1 " << endl;
 		return 0;
 	}
 	for (int i = 0; i < n; i++){
 		for (int j = 0; j < n-i; j++){
 			if(i*9+j*4==m){
 				cout << i <<" "<< j <<" "<< n-i-j << endl;
 				return 0;
 			}
 		}
 	}cout << "-1 -1 -1" << endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'm' was not declared in this scope
   11 |          m = (x-n*1000)/1000;
      |          ^
Language: C++

#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
 //Compiler version g++ 6.3.0

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |          n,x;
      |          ^
      |          yn
a.cc:9:12: error: 'x' was not declared in this scope
    9 |          n,x;
      |            ^
a.cc:11:10: error: 'm' was not declared in this scope; did you mean 'tm'?
   11 |          m = (x-n*1000)/1000;
      |          ^
      |          tm