The biggest problem is determining the type of first input of each line.
Solu:
Character.isAlphebet( ) // true for letter
Character.isDigit( ) // true for digit
After the judge, choose to input the next 2 or 1 integer.
Basic idea: Two and only two lines can create an intersection according to the instruction. So it is basically a permutations and combinations question: how many sets of 4 vertex does the graph have? Since the sequence of the 4 vertex won’t affect the fi…