# 牛客小白月赛71
## A 猫猫与广告
签到题
先分别把两个矩形的短边和长边对其,然后比较一下就好了
```c
#include<bits/stdc++.h>
using namespace std;
int a,b,c,d;
int main(){
cin>>a>>b>>c>>d;
if(a>b){
swap(a,b);
}
if(c>d){
swap(c,d);
}
if(a<=c&&b<=d){
cout<<"YES";
}
else{
cout<<"NO";
}
}
```
## B 猫猫与密信
判断字符串s中有没有“lov”、"lve"、"loe"、“ove”即可
(纯暴力写法,建议不看)
```c
#include<bits/stdc++.h>
using namespace std;
const int N=1e5+10;
char ch[N];
int main(){
cin>>ch+1;
int len=strlen(ch+1);
for(int i=1;i<=len;i++){
if(ch[i]=='l'){
if(ch[i+1]=='o'&&ch[i+2]=='v'||ch[i+1]=='o'&&ch[i+2]=='e'||ch[i+1]=='v'&&ch[i+2]=='e'){
cout<<"YES";
return 0;
}
}
else if(ch[i]=='o'){
if(ch[i+1]=='v'&&ch[i+2]=='e'){
cout<<"YES";
return 0;
}
}
}
cout<<"NO";
return 0;
}
```
## C 猫猫与数列
数学题
~~但是我一开始以为是while一下就好了,结果ull也炸了~~
~~然后懒得用高精度写法,用了python,还是炸~~
~~最后被逼的去推了一下,结果很简单()~~
~~然后懒得换语言了,python直接交了~~
推导过程如下:
$$
a_{n-2}^{a_{n-1}}\le M\newline
e^{a_{n-1}*ln(a_{n-2})}\le e^{ln(M)}\newline
a_{n-1}*ln(a_{n-2})\le ln(M)\newline
a_{n-1}\le ln(M)/ln(a_{n-2})
$$
```python
import math
a1,a2=input().split()
a1=int(a1)
a2=int(a2)
m=1e18
cnt=3
while a2<=math.log(m,math.e)/math.log(a1,math.e):
temp=pow(a1,a2)
a1=a2
a2=temp#这么写可以不用开数组
cnt+=1
print(cnt-1)
```
后面的题目以后再来探索吧
~~还记得的话(~~