题解 P5315 【头像上传】

这个题就是标准的模拟

上来先把所有图的大小搞成<=G

然后判是不是>=L

然后输出就好

1
2
3
4
5
6
7
8
9
10
11
12
13
#include <bits/stdc++.h>
using namespace std;
long long n,l,g,w,h;
int main(){
scanf ("%lld%lld%lld",&n,&l,&g);//读入,long long防卡
while (n--){
scanf ("%lld%lld",&w,&h);
while (w>g||h>g)w>>=1,h>>=1;//如果有一条边长了,两边一起减半
if (w<l||h<l){puts("Too Young");continue;}//小了,输出
if (w!=h){puts("Too Simple");continue;}//不是正方形,输出
puts("Sometimes Naive");//否则没问题
}
}