Comparison of Android versionsTime limit:2000/1000 MS (java/others) Memory limit:32768/32768 K (java/others)
Total submission (s): 1175 Accepted Submission (s): 472
Problem Descriptionas an Android developer, Itˇs really isn't easy-to-figure out a newer version of the kernels, because and Roid are updated so frequently and have many branches. Fortunately, Google identifies individual builds with a short build code, e.g. frf85b.
The first letter is the code name of the release family, e.g. F is Froyo. The code names is ordered alphabetically. The latest code name is K (KitKat).
The second letter are a branch code that allows Google to identify the exact code branch that the build were made from, and R is by convention the primary release branch.
The next letter and the digits is a date code. The letter counts quarters, with A being Q1 2009. Therefore, F is Q2 2010. The digits count days within the quarter, so F85 is June 24 2010.
Finally, the last letter identifies individual versions related to the same date code, sequentially starting with A; A is actually implicit and usually omitted for brevity.
Please develop a compare the Android build numbers.
Inputthe first line is a integer n (1 <= n <=), which indicates how many test cases need to process.
Each of the test case consists of a is a single line containing the build numbers, separated by a space character.
Outputfor each test case, output A, starting with¨case #:〃 (# means the number of the the test case). Then, output the result of release comparison as follows:
Print "<" If the release of the first build number is lower than the second one;
Print "=" If the release of the first build number is same as he second one;
Print ">" If the release of the first build number is higher than the second one.
Continue to output the result of date comparison as follows:
Print "<" if the date of the first build number is lower than the second one;
Print "=" If the date of the first build number is same as he second one;
Print ">" If the date of the first build number is higher than the second one.
If the builds is not in the same Code branch, just compare the date code; If they is in the same Code branch, compare the date code together with the individual version.
Sample Input
2frf85b epf21bktu84l ktu84m
Sample Output
Case 1: > >case 2: = <
Source
2014 Shanghai National Invitational Competition--re-title (thanks to Shanghai University for its topics)
This question is English, alas, English is a mishap, and specifically has been annotated
Hdu 5099 Comparison of Android versions