Language: C++


import java.util.Scanner;
import java.util.ArrayList;


class Main{
	public static void main(String[] args){
		Solve s = new Solve();
		s.solve();
	}	
}

class Solve{
	Solve(){}

	void solve(){
		Scanner in = new Scanner(System.in);

		int n = in.nextInt();
		int [][] ar = new int[n][n];

		for(int i = 0; i < n; i++){
			int u = in.nextInt() - 1, k = in.nextInt();
			for(int j = 0; j < k; j++){
				int v = in.nextInt() -1;
				ar[u][v] = 1;
			}
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < n; j++){
				if(j != 0) System.out.print(" ");
				System.out.print(ar[i][j]);
			}
			System.out.println("");
		}

	}
}

Compiler output:
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.ArrayList;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:15: error: expected ':' before 'static'
    7 |         public static void main(String[] args){
      |               ^~~~~~~
      |               :
a.cc:7:33: error: 'String' has not been declared
    7 |         public static void main(String[] args){
      |                                 ^~~~~~
a.cc:7:42: error: expected ',' or '...' before 'args'
    7 |         public static void main(String[] args){
      |                                          ^~~~
a.cc:11:2: error: expected ';' after class definition
   11 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:8:17: error: 'Solve' was not declared in this scope
    8 |                 Solve s = new Solve();
      |                 ^~~~~
a.cc:9:17: error: 's' was not declared in this scope
    9 |                 s.solve();
      |                 ^
a.cc: At global scope:
a.cc:39:2: error: expected ';' after class definition
   39 | }
      |  ^
      |  ;
a.cc: In member function 'void Solve::solve()':
a.cc:17:17: error: 'Scanner' was not declared in this scope
   17 |                 Scanner in = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:19:25: error: 'in' was not declared in this scope; did you mean 'int'?
   19 |                 int n = in.nextInt();
      |                         ^~
      |                         int
a.cc:20:21: error: structured binding declaration cannot have type 'int'
   20 |                 int [][] ar = new int[n][n];
      |                     ^~
a.cc:20:21: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:20:21: error: empty structured binding declaration
a.cc:20:23: error: expected initializer before '[' token
   20 |                 int [][] ar = new int[n][n];
      |                       ^
a.cc:24:44: error: 'k' was not declared in this scope
   24 |                         for(int j = 0; j < k; j++){
      |                                            ^
a.cc:26:33: error: 'ar' was not declared in this scope; did you mean 'char'?
   26 |                                 ar[u][v] = 1;
      |                                 ^~
      |                                 char
a.cc:32:44: error: 'System' was not declared in this scope
   32 |                                 if(j != 0) System.out.print(" ");
      |                                            ^~~~~~
a.cc:33:33: error: 'System' was not declared in this scope
   33 |                                 System.out.print(ar[i][j]);
      |                                 ^~~~~~
a.cc:33:50: error: 'ar' was not declared in this scope; did you mean 'char'?
   33 |                                 System.out.print(ar[i][j]);
      |                                                  ^~
      |                                                  char
a.cc:35:25: error: 'System' was not declared in this scope
   35 |                         System.out.println("");
      |                         ^~~~~~