#P5315. Avatar Upload Validator
Avatar Upload Validator
Avatar Upload Validator
You are given n images that you may upload as avatars on a website. The website requires that the final uploaded avatar is a square with both the width and height at least L. Before uploading, the system performs a processing step on each image as follows:
If any side of an image is greater than G, the system repeatedly halves both the width and height (using floor division) until both dimensions are less than or equal to G.
After processing, for each image:
- If any dimension is less than L, output
Too Young
. - If the image meets the size requirement but is not a square, output
Too Simple
. - If the image meets the size requirement and is a square, output
Sometimes Naive
.
Note: All output strings are printed without quotes.
Processing Algorithm:
While either the width or height is greater than G, update:
\[ \text{width} = \left\lfloor \frac{\text{width}}{2} \right\rfloor, \quad \text{height} = \left\lfloor \frac{\text{height}}{2} \right\rfloor \]inputFormat
The first line contains three integers n L G where:
- n is the number of images.
- L is the minimum allowed dimension for each side of the processed image.
- G is the maximum allowed dimension before processing.
Each of the following n lines contains two integers Wi Hi, representing the width and height of the i-th image.
outputFormat
For each image, output one line containing one of the following strings (without quotes):
Too Young
Too Simple
Sometimes Naive
sample
3 5 20
10 10
4 10
10 20
Sometimes Naive
Too Young
Too Simple
</p>