Identify the time complexity of the following code as constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard. import java.io.*;
import static java.lang.Math.*;
import java.util.*;
import java.util.function.*;
import java.lang.*;

public class Main {
    final static boolean debug = false;
    final static String fileName = "";
    final static boolean useFiles = false;

    public static void main(String[] args) throws FileNotFoundException {
        long start;
        if (debug)
            start = System.nanoTime();
        InputStream inputStream;
        OutputStream outputStream;
        if (useFiles) {
            inputStream = new FileInputStream(fileName + ".in");
            outputStream = new FileOutputStream(fileName + ".out");
        } else {
            inputStream = System.in;
            outputStream = System.out;
        }
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task(in, out);
        solver.solve();
        if(debug)
            out.println((System.nanoTime() - start) / 1e+9);
        out.close();
    }
}
class Task {
    int[][] dist, pre;
    int[] x, y, d, prev;
    String[] leafDescription;
    String[] linerDescription;
    String[][] allDescriptions;
    int xs, ys, n;

    int dist(int i, int j) {
        return (x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]);
    }

    void go(int[] prev, String[] leafDescription, int[] d, int len, int add, String description){
        for (int mask = 0; mask < d.length; mask++) {
            if ((mask & add) != add)
                continue;
            int newValue = d[mask & (~add)] + len;
            if (d[mask] > newValue){
                d[mask] = newValue;
                leafDescription[mask] = description;
                prev[mask] = mask & (~add);
            }
        }
    }

    int rec(int mask) {
        if (d[mask] != -1)
            return d[mask];
        int lowest = 0;
        for (; ((1 << lowest) & mask) == 0; lowest++) ;

        int newMask = mask & (~(1 << lowest));
        d[mask] = rec(newMask) + dist[lowest][n];
    ... Complexity: