Identify the time complexity of the following code as constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard. import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
import java.util.regex.*;
//import java.math.*;
//import static java.lang.Math.*;
//import static java.util.Arrays.*;
 
public class Main{
    public static void main(String[] args) throws IOException { //1-checker 2-console
        //if (args.length==2) open(args[0], args[1], true, false); else open ("input.txt", "output.txt", true, false);
        open ("input.txt", "output.txt", false, true);
        char[] alph = " ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
        Pattern pat = Pattern.compile("[A-Z]+[\\d]+");
        Matcher mat;
        boolean b ;
        String  s;
        int index, coef, row, col;
        int n = nextInt();
        String[] tmp;
        char[] c;
        for (int i=0; i<n; i++)
        {
            s = nextLine();
            c = s.toCharArray();
            mat = pat.matcher(s);
            b = mat.matches();
            if (b)
            {
                
                index = c.length-1;
                coef = 1;
                row = 0;
                while (c[index]>='0' && c[index]<='9')
                {
                    row += (c[index]-'0')*coef;
                    coef*=10;
                    index--;
                }
                coef = 1;
                col = 0;
                while (index>=0)
                {
                    /*if (coef!=1)*/ col += (Arrays.binarySearch(alph, c[index]))*coef;
                    //else col += (Arrays.binarySearch(alph, c[index]))*coef;
                    coef*=26;
                    index--;
                }
                out.println("R"+row+"C"+col);
            }
            else
            {
                tmp = s.split("R|C");
                //out.print(tmp.length);
                //row = Integer.parseInt(tmp[1]);
                col = Integer.parseInt(tmp[2]);
                char[] temp = new char[10];
                int len = 0;
                int v = 0;
                while (col>0)
                {
                    index =... Complexity: