HARDBET: HARDEST PROBLEM BET

Problem:

There are 33 problems in a contest namely A, B, C respectively. Alice bets Bob that problem CC is the hardest while Bob says that problem BB will be the hardest.

You are given three integers SA,SB,SCSA,SB,SC which denotes the number of successful submissions of the problems A,B,CA,B,C respectively. It is guaranteed that each problem has a different number of submissions. Determine who wins the bet.

1) If Alice wins the bet (i.e. problem CC is the hardest), then output AliceAlice.

2) If Bob wins the bet (i.e. problem BB is the hardest), then output BobBob.

3) If no one wins the bet (i.e. problem AA is the hardest), then output

Solution:

#include<iostream>
using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--){
        int a,b,c;
        cin>>a>>b>>c;
        if(a < b && a < c){
            cout< < "Draw"< < endl;
        }else if(b < c){
            cout< < "Bob"< < endl;
        }else{
            cout< < "Alice"< < endl;
        }
    }
    return 0;
}
The content uploaded on this website is for reference purposes only. Please do it yourself first.
Home
Account
Cart
Search