F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_38864910_15310.cpp:1:1: error: 'import' does not name a type
    1 | import java.util.Arrays;
      | ^~~~~~
0_0_38864910_15310.cpp:1:1: note: C++20 'import' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
0_0_38864910_15310.cpp:2:1: error: 'import' does not name a type
    2 | import java.util.LinkedList;
      | ^~~~~~
0_0_38864910_15310.cpp:2:1: note: C++20 'import' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
0_0_38864910_15310.cpp:3:1: error: 'import' does not name a type
    3 | import java.util.Queue;
      | ^~~~~~
0_0_38864910_15310.cpp:3:1: note: C++20 'import' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
0_0_38864910_15310.cpp:4:1: error: 'import' does not name a type
    4 | import java.util.Scanner;
      | ^~~~~~
0_0_38864910_15310.cpp:4:1: note: C++20 'import' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
0_0_38864910_15310.cpp:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
0_0_38864910_15310.cpp:35:16: error: expected ':' before 'int'
   35 |         private int leftSetNumber;
      |                ^~~~
      |                :
0_0_38864910_15310.cpp:36:16: error: expected ':' before 'int'
   36 |         private int rightSetNumber;
      |                ^~~~
      |                :
0_0_38864910_15310.cpp:37:16: error: expected ':' before 'boolean'
   37 |         private boolean[][] matrix;
      |                ^~~~~~~~
      |                :
0_0_38864910_15310.cpp:37:17: error: 'boolean' does not name a type; did you mean 'bool'?
   37 |         private boolean[][] matrix;
      |                 ^~~~~~~
      |                 bool
0_0_38864910_15310.cpp:38:16: error: expected ':' before 'int'
   38 |         private int[] leftResult;
      |                ^~~~
      |                :
0_0_38864910_15310.cpp:38:20: error: expected unqualified-id before '[' token
   38 |         private int[] leftResult;
      |                    ^
0_0_38864910_15310.cpp:39:16: error: expected ':' before 'int'
   39 |         private int[] rightResult;
      |                ^~~~
      |                :
0_0_38864910_15310.cpp:39:20: error: expected unqualified-id before '[' token
   39 |         private int[] rightResult;
      |                    ^
0_0_38864910_15310.cpp:40:16: error: expected ':' before 'boolean'
   40 |         private boolean[] rightUsed;
      |                ^~~~~~~~
      |                :
0_0_38864910_15310.cpp:40:17: error: 'boolean' does not name a type; did you mean 'bool'?
   40 |         private boolean[] rightUsed;
      |                 ^~~~~~~
      |                 bool
0_0_38864910_15310.cpp:41:16: error: expected ':' before 'int'
   41 |         private int[] preLeft;
      |                ^~~~
      |                :
0_0_38864910_15310.cpp:41:20: error: expected unqualified-id before '[' token
   41 |         private int[] preLeft;
      |                    ^
0_0_38864910_15310.cpp:43:15: error: expected ':' before 'Hungary'
   43 |         public Hungary(int leftSetNumber, int rightSetNumber) {
      |               ^~~~~~~~
      |               :
0_0_38864910_15310.cpp:53:15: error: expected ':' before 'void'
   53 |         public void addEdge(int left, int right) {
      |               ^~~~~
      |               :
0_0_38864910_15310.cpp:57:15: error: expected ':' before 'int'
   57 |         public int maxMatch() {
      |               ^~~~
      |               :
0_0_38864910_15310.cpp:99:2: error: expected ';' after class definition
   99 | }
      |  ^
      |  ;
0_0_38864910_15310.cpp: In constructor 'Hungary::Hungary(int, int)':
0_0_38864910_15310.cpp:44:22: error: request for member 'leftSetNumber' in '(Hungary*)this', which is of pointer type 'Hungary*' (maybe you meant to use '->' ?)
   44 |                 this.leftSetNumber = leftSetNumber;
      |                      ^~~~~~~~~~~~~
0_0_38864910_15310.cpp:45:22: error: request for member 'rightSetNumber' in '(Hungary*)this', which is of pointer type 'Hungary*' (maybe you meant to use '->' ?)
   45 |                 this.rightSetNumber = rightSetNumber;
      |                      ^~~~~~~~~~~~~~
0_0_38864910_15310.cpp:46:17: error: 'matrix' was not declared in this scope
   46 |                 matrix = new boolean[leftSetNumber][rightSetNumber];
      |                 ^~~~~~
0_0_38864910_15310.cpp:46:30: error: 'boolean' does not name a type; did you mean 'bool'?
   46 |                 matrix = new boolean[leftSetNumber][rightSetNumber];
      |                              ^~~~~~~
      |                              bool
0_0_38864910_15310.cpp:47:17: error: 'leftResult' was not declared in this scope
   47 |                 leftResult = new int[leftSetNumber];
      |                 ^~~~~~~~~~
0_0_38864910_15310.cpp:48:17: error: 'rightResult' was not declared in this scope
   48 |                 rightResult = new int[rightSetNumber];
      |                 ^~~~~~~~~~~
0_0_38864910_15310.cpp:49:17: error: 'rightUsed' was not declared in this scope
   49 |                 rightUsed = new boolean[rightSetNumber];
      |                 ^~~~~~~~~
0_0_38864910_15310.cpp:49:33: error: 'boolean' does not name a type; did you mean 'bool'?
   49 |                 rightUsed = new boolean[rightSetNumber];
      |                                 ^~~~~~~
      |                                 bool
0_0_38864910_15310.cpp:50:17: error: 'preLeft' was not declared in this scope
   50 |                 preLeft = new int[leftSetNumber];
      |                 ^~~~~~~
0_0_38864910_15310.cpp: In member function 'void Hungary::addEdge(int, int)':
0_0_38864910_15310.cpp:54:17: error: 'matrix' was not declared in this scope
   54 |                 matrix[left][right] = true;
      |                 ^~~~~~
0_0_38864910_15310.cpp: In member function 'int Hungary::maxMatch()':
0_0_38864910_15310.cpp:58:17: error: 'Arrays' was not declared in this scope
   58 |                 Arrays.fill(leftResult, -1);
      |                 ^~~~~~
0_0_38864910_15310.cpp:58:29: error: 'leftResult' was not declared in this scope
   58 |                 Arrays.fill(leftResult, -1);
      |                             ^~~~~~~~~~
0_0_38864910_15310.cpp:59:29: error: 'rightResult' was not declared in this scope
   59 |                 Arrays.fill(rightResult, -1);
      |                             ^~~~~~~~~~~
0_0_38864910_15310.cpp:60:29: error: 'preLeft' was not declared in this scope
   60 |                 Arrays.fill(preLeft, -1);
      |                             ^~~~~~~
0_0_38864910_15310.cpp:64:39: error: 'Integer' was not declared in this scope
   64 |                                 Queue<Integer> queue = new LinkedList<Integer>();
      |                                       ^~~~~~~
0_0_38864910_15310.cpp:64:33: error: 'Queue' was not declared in this scope
   64 |                                 Queue<Integer> queue = new LinkedList<Integer>();
      |                                 ^~~~~
0_0_38864910_15310.cpp:64:48: error: 'queue' was not declared in this scope
   64 |                                 Queue<Integer> queue = new LinkedList<Integer>();
      |                                                ^~~~~
0_0_38864910_15310.cpp:64:60: error: expected type-specifier
   64 |                                 Queue<Integer> queue = new LinkedList<Integer>();
      |                                                            ^~~~~~~~~~~~~~~~~~~
0_0_38864910_15310.cpp:66:33: error: 'boolean' was not declared in this scope; did you mean 'bool'?
   66 |                                 boolean hasAP = false;
      |                                 ^~~~~~~
      |                                 bool
0_0_38864910_15310.cpp:67:45: error: 'rightUsed' was not declared in this scope
   67 |                                 Arrays.fill(rightUsed, false);
      |                                             ^~~~~~~~~
0_0_38864910_15310.cpp:68:61: error: 'hasAP' was not declared in this scope
   68 |                                 while (!queue.isEmpty() && !hasAP) {
      |                                                             ^~~~~
0_0_38864910_15310.cpp:71:53: error: 'matrix' was not declared in this scope
   71 |                                                 if (matrix[left][right] && !rightUsed[right]) {
      |                                                     ^~~~~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-27 19:00:19, Gzip enabled