| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 2048 MB | 102 | 35 | 25 | 34.722% |
Nick is preparing a problem for a programming contest about comparing big integers. He has decided on the input format for the integers: They will be expressed in base 62, with 0ドル$ through 9ドル$ representing digit values 0ドル$ through 9ドル,ドル lowercase letters a through z representing digit values 10ドル$ through 35ドル,ドル and uppercase letters A through Z representing digit values 36ドル$ through 61ドル$. For example, the string Aa would represent 36ドル \times 62 + 10 = 2242$.
The problem is to take two strings representing two distinct base 62 integers and determine which of the two is smaller. However, Nick wrote his judge solution incorrectly, assuming that the lexicographically smaller string is always the smaller integer.
Given some test cases, determine for each if Nick's solution would report the correct result.
The first line of input contains a single integer $t$ (1ドル\leq t \leq 10^5$). This is the number of test cases.
Each test case consists of two lines.
The first line contains a single alphanumeric string of length at most 10ドル^5$.
The second line contains a single alphanumeric string of length at most 10ドル^5$.
Both strings are guaranteed to contain no unnecessary leading zeroes, and the two strings are guaranteed to be distinct.
The sum of the lengths of all input strings across all $t$ test cases is guaranteed to be at most 2ドル \times 10^6$.
For each test case, output a single line with YES if the lexicographically smaller string represents the smaller integer in base 62, and output a single line with NO otherwise.
2 icpc ICPC a bc
NO YES
ICPC > Regionals > North America > Pacific Northwest Regional > 2024 ICPC Pacific Northwest Regional > Division 1 B번
ICPC > Regionals > North America > Pacific Northwest Regional > 2024 ICPC Pacific Northwest Regional > Division 2 A번