题面:池里V升茶,同时向池中倒茶qV,喝茶pV,问池中茶的数量会无限变多,V一直在变化。
解析:已知p,q,若p>q,则不行,反之。
其实最主要还是考虑p=q的情况,此时池中一直是V。
写题时直接猜测V是连续的,看了题解,通过解方程求出
图片说明
所以V是时间连续递增的。
代码

#include<bits/stdc++.h>
using namespace std;
int t;
double p,q;
int main(){
    cin>>t;
    while(t--){
        cin>>p>>q;
        if(p<=q) cout<<"N0 M0R3 BL4CK 1CE TEA!"<<endl;
        else cout<<"ENJ0Y YOURS3LF!"<<endl;
    }