0_0_27698981_30305.cpp:1:1: error: 'import' does not name a type
import java.util.Scanner;
^
0_0_27698981_30305.cpp:2:1: error: 'import' does not name a type
import java.util.LinkedList;
^
0_0_27698981_30305.cpp:3:1: error: 'import' does not name a type
import java.util.Queue;
^
0_0_27698981_30305.cpp:6:9: error: expected ':' before 'int'
public int index;
^
0_0_27698981_30305.cpp:7:9: error: expected ':' before 'int'
public int parentIndex;
^
0_0_27698981_30305.cpp:13:1: error: expected ';' after class definition
}
^
0_0_27698981_30305.cpp: In constructor 'Node::Node(int, int)':
0_0_27698981_30305.cpp:10:8: error: request for member 'index' in '(Node*)this', which is of pointer type 'Node*' (maybe you meant to use '->' ?)
this.index = index;
^
0_0_27698981_30305.cpp:11:8: error: request for member 'parentIndex' in '(Node*)this', which is of pointer type 'Node*' (maybe you meant to use '->' ?)
this.parentIndex = parentIndex;
^
0_0_27698981_30305.cpp: At global scope:
0_0_27698981_30305.cpp:16:9: error: expected ':' before 'int'
public int start;
^
0_0_27698981_30305.cpp:17:9: error: expected ':' before 'int'
public int end;
^
0_0_27698981_30305.cpp:23:1: error: expected ';' after class definition
}
^
0_0_27698981_30305.cpp: In constructor 'Edge::Edge(int, int)':
0_0_27698981_30305.cpp:20:8: error: request for member 'start' in '(Edge*)this', which is of pointer type 'Edge*' (maybe you meant to use '->' ?)
this.start = vertexIndexA;
^
0_0_27698981_30305.cpp:21:8: error: request for member 'end' in '(Edge*)this', which is of pointer type 'Edge*' (maybe you meant to use '->' ?)
this.end = vertexIndexB;
^
0_0_27698981_30305.cpp: At global scope:
0_0_27698981_30305.cpp:26:25: error: ISO C++ forbids in-class initialization of non-const static member 'RoadNet::maxWeight'
static int maxWeight = 100000;
^
0_0_27698981_30305.cpp:30:6: error: expected unqualified-id before '[' token
Node[] node;
^
0_0_27698981_30305.cpp:32:5: error: expected unqualified-id before '[' token
int[][] capacity;
^
0_0_27698981_30305.cpp:34:5: error: expected unqualified-id before '[' token
int[][] flow;
^
0_0_27698981_30305.cpp:40:29: error: multidimensional array must have bounds for all dimensions except the first
RoadNet(int nodeNum, int[][] capacity){
^
0_0_27698981_30305.cpp:40:31: error: expected ',' or '...' before 'capacity'
RoadNet(int nodeNum, int[][] capacity){
^
0_0_27698981_30305.cpp:59:9: error: expected ':' before 'void'
public void solution() {
^
0_0_27698981_30305.cpp:67:10: error: expected ':' before 'boolean'
private boolean updateParent() {
^
0_0_27698981_30305.cpp:67:10: error: 'boolean' does not name a type
0_0_27698981_30305.cpp:93:10: error: expected ':' before 'void'
private void updateCF() {
^
0_0_27698981_30305.cpp:119:1: error: expected ';' after class definition
}
^
0_0_27698981_30305.cpp: In constructor 'RoadNet::RoadNet(int)':
0_0_27698981_30305.cpp:41:8: error: request for member 'nodeNum' in '(RoadNet*)this', which is of pointer type 'RoadNet*' (maybe you meant to use '->' ?)
this.nodeNum = nodeNum;
^
0_0_27698981_30305.cpp:42:8: error: request for member 'node' in '(RoadNet*)this', which is of pointer type 'RoadNet*' (maybe you meant to use '->' ?)
this.node = new Node[nodeNum];
^
0_0_27698981_30305.cpp:42:31: error: no matching function for call to 'Node::Node()'
this.node = new Node[nodeNum];
^
0_0_27698981_30305.cpp:42:31: note: candidates are:
0_0_27698981_30305.cpp:9:2: note: Node::Node(int, int)
Node(int index, int parentIndex){
^
0_0_27698981_30305.cpp:9:2: note: candidate expects 2 arguments, 0 provided
0_0_27698981_30305.cpp:5:7: note: constexpr Node::Node(const Node&)
class Node{
^
0_0_27698981_30305.cpp:5:7: note: candidate expects 1 argument, 0 provided
0_0_27698981_30305.cpp:5:7: note: constexpr Node::Node(Node&&)
0_0_27698981_30305.cpp:5:7: note: candidate expects 1 argument, 0 provided
0_0_27698981_30305.cpp:43:8: error: request for member 'capacity' in '(RoadNet*)this', which is of pointer type 'RoadNet*' (maybe you meant to use '->' ?)
this.capacity = new int[nodeNum][nodeNum];
^
0_0_27698981_30305.cpp:43:43: error: array size in new-expression must be constant
this.capacity = new int[nodeNum][nodeNum];
^
0_0_27698981_30305.cpp:43:43: error: 'nodeNum' is not a constant expression
0_0_27698981_30305.cpp:44:8: error: request for member 'flow' in '(RoadNet*)this', which is of pointer type 'RoadNet*' (maybe you meant to use '->' ?)
this.flow = new int[nodeNum][nodeNum];
^
0_0_27698981_30305.cpp:44:39: error: array size in new-expression must be constant
this.flow = new int[nodeNum][nodeNum];
^
0_0_27698981_30305.cpp:44:39: error: 'nodeNum' is not a constant expression
0_0_27698981_30305.cpp:47:9: error: request for member 'node' in '(RoadNet*)this', which is of pointer type 'RoadNet*' (maybe you meant to use '->' ?)
this.node[i] = new Node(i,i);
^
0_0_27698981_30305.cpp:49:22: error: 'capacity' was not declared in this scope
for(int i = 0; i < capacity.length; i++) {
^
0_0_27698981_30305.cpp:50:9: error: request for member 'capacity' in '(RoadNet*)this', which is of pointer type 'RoadNet*' (maybe you meant to use '->' ?)
this.capacity[i] = capacity[i].clone();
^
0_0_27698981_30305.cpp:54:10: error: request for member 'flow' in '(RoadNet*)this', which is of pointer type 'RoadNet*' (maybe you meant to use '->' ?)
this.flow[i][j] = 0;
^
0_0_27698981_30305.cpp: In member function 'void RoadNet::solution()':
0_0_27698981_30305.cpp:60:22: error: 'updateParent' was not declared in this scope
while(updateParent()) {
^
0_0_27698981_30305.cpp: In member function 'void RoadNet::updateCF()':
0_0_27698981_30305.cpp:95:21: error: 'node' was not declared in this scope
int parentIndex = node[currentIndex].parentIndex;
^
0_0_27698981_30305.cpp:99:7: error: 'capacity' was not declared in this scope
if(capacity[parentIndex][currentIndex] < cfp)
^
0_0_27698981_30305.cpp:109:4: error: 'capacity' was not declared in this scope
capacity[parentIndex][currentIndex] -= cfp;
^
0_0_27698981_30305.cpp:111:4: error: 'flow' was not declared in this scope
flow[parentIndex][currentIndex] += cfp;
^
0_0_27698981_30305.cpp: At global scope:
0_0_27698981_30305.cpp:121:1: error: expected unqualified-id before 'public'
public class Main {
^
|