TOPIC

wrong answer 10%

Lindenberg asked 2 years ago

#include <iostream>

using namespace std;

int main(){

    long long int m;
    long long int xp, yp, xc, yc, ac, ap;

    while(cin>>xp>>yp>>m){

        for(int i=0; i<m; i++){
        cin>>xc>>yc;

        if((xc>xp&&xc>yp) || (yc>xp&&yc>yp)){
            cout<<"Nao"<<endl;
        }else{
            ac = xc * yc;
            ap = xp * yp;
            if(ac>ap){
                cout<<"Nao"<<endl;
            }else{
                cout<<"Sim"<<endl;
            }

        }
      }
    }
    return 0;
}

Nao estou conseguindo identificar a falha, alguem ajuda?

Remember not post solutions. Your post may be reviewed by our moderators.