# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
230658 | Giantpizzahead | ČVENK (COI15_cvenk) | Java | 3178 ms | 198684 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/*
Solution: The labyrinth is a tree! So, do your standard shortest # of steps to meet up thing on this
tree. Find the midpoint of the people, and calculate the # of steps needed to move there.
*/
import java.util.*;
import java.io.*;
public class cvenk {
int N;
Point[] people;
Node root;
HashMap<Long, Node> nodes = new HashMap<>();
class Node {
Node left, right;
int x, y, numPeople = 0, numPeopleST = 0;
Node(int x, int y) {
this.x = x;
this.y = y;
nodes.put(hash(x, y), this);
}
@Override
public String toString() {
return "(" + x + ", " + y + ")";
}
}
cvenk(BufferedReader in, PrintWriter out) throws IOException {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |