Language: C++

import java.util.*;
class ABC85C{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int Y = sc.nextInt();
		boolean flag = false;
		for(int i = 0; i <= N; i++){
			if(flag == true)break;
			for(int j = 0; j <= N-i; j++){
				if(flag == true)break;
				if(i * 10000 + j * 5000 + (N-i-j)*1000 == Y){
					System.out.println(i + " " + j + " " + (N-i-j));
					flag = true;
				}
			}
		}
		if(flag == false)System.out.println("-1 -1 -1");
	
	
	
	}



}





Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:15: error: expected ':' before 'static'
    3 |         public static void main(String[] args){
      |               ^~~~~~~
      |               :
a.cc:3:33: error: 'String' has not been declared
    3 |         public static void main(String[] args){
      |                                 ^~~~~~
a.cc:3:42: error: expected ',' or '...' before 'args'
    3 |         public static void main(String[] args){
      |                                          ^~~~
a.cc:26:2: error: expected ';' after class definition
   26 | }
      |  ^
      |  ;
a.cc: In static member function 'static void ABC85C::main(int*)':
a.cc:4:17: error: 'Scanner' was not declared in this scope
    4 |                 Scanner sc = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:5:25: error: 'sc' was not declared in this scope
    5 |                 int N = sc.nextInt();
      |                         ^~
a.cc:7:17: error: 'boolean' was not declared in this scope; did you mean 'bool'?
    7 |                 boolean flag = false;
      |                 ^~~~~~~
      |                 bool
a.cc:9:28: error: 'flag' was not declared in this scope
    9 |                         if(flag == true)break;
      |                            ^~~~
a.cc:11:36: error: 'flag' was not declared in this scope
   11 |                                 if(flag == true)break;
      |                                    ^~~~
a.cc:13:41: error: 'System' was not declared in this scope
   13 |                                         System.out.println(i + " " + j + " " + (N-i-j));
      |                                         ^~~~~~
a.cc:13:72: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
   13 |                                         System.out.println(i + " " + j + " " + (N-i-j));
      |                                                            ~~~~~~~~~~~ ^ ~~~
      |                                                                    |     |
      |                                                                    |     const char [2]
      |                                                                    const char*
a.cc:14:41: error: 'flag' was not declared in this scope
   14 |                                         flag = true;
      |                                         ^~~~
a.cc:18:20: error: 'flag' was not declared in this scope
   18 |                 if(flag == false)System.out.println("-1 -1 -1");
      |                    ^~~~
a.cc:18:34: error: 'System' was not declared in this scope
   18 |                 if(flag == false)System.out.println("-1 -1 -1");
      |                                  ^~~~~~