Identify the time complexity of the following code as constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard. import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        DExplorerSpace solver = new DExplorerSpace();
        solver.solve(1, in, out);
        out.close();
    }

    static class DExplorerSpace {
        int n;
        int m;
        int k;
        int[][] col;
        int[][] row;
        long[][][] memo;

        public void readInput(Scanner sc) {
            n = sc.nextInt();
            m = sc.nextInt();
            k = sc.nextInt();
            col = new int[n][m - 1];
            for (int i = 0; i < n; i++)
                for (int j = 0; j < m - 1; j++)
                    col[i][j] = sc.nextInt();
            row = new int[n - 1][m];
            for (int i = 0; i < n - 1; i++)
                for (int j = 0; j < m; j++)
                    row[i][j] = sc.nextInt();
        }

        public void solve(int testNumber, Scanner sc, PrintWriter pw) {
            int q = 1;
            while (q-- > 0) {
                readInput(sc);
                if (k % 2 == 1) {
                    for (int i = 0; i < n; i++) {
                        for (int j = 0; j < m; j++)
                            pw.print(-1 + " ");
                        pw.println();
                    }
                    return;
                }
                memo = new long[k + 1][n][m];
                for (long[][] x : memo)
                    for (long[] y : x)
                        Arrays.fill(y, -1);
                for (int i = 0; i < n; i++) {
                    for (int j =... Complexity: