Infinity

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Problem type

The number 63 may be small right now, but four of them together join together to make infinity. How, you may ask? 63 is more commonly known by contest programmers as 3F, and 3F3F3F3F (4 bytes of 3F) is the hexadecimal representation of the decimal number 1061109567, which is commonly used to denote a value of infinity. This is because two of these numbers added together do not exceed the bounds of a 32-bit integer, and so infinity + infinity is still larger than or equal to infinity. Given two hexadecimal numbers less than or equal to our infinity (3F3F3F3F16), in decimal representation, determine whether the sum of these numbers is larger than our infinity.

Sample Input 1

3ADE68B1
075BCD15

Sample Output 1

Yes

Sample Input 2

baa
bad

Sample Output 2

No

Comments

There are no comments at the moment.