/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 2ms 332.0 KiB
#2 Accepted 2ms 540.0 KiB
#3 Wrong Answer 2ms 528.0 KiB

Code

#include <iostream>
using namespace std;
int main() {
    
    // SAYED AL MAMUN_LU

    int n, sum = 0, sum1 = 0, sum2 = 0, i;
    cin >> n;

    char samp[n];
    cin >> samp;

    for (i = 0; i < n; i++) {
        if (samp[i] == 'M') {
            sum++;
        } else if (samp[i] == 'E') {
            sum1++;
        } else if (samp[i] == '?') {
            sum2++;
        }
    }

    if (sum > sum1 && sum > sum2) {
        cout << "Mahfuz" << endl;
    }
    else if (sum1 > sum && sum1 > sum2) {
        cout << "Emon" << endl;
    } 
    else if(sum == sum1 && sum2 > sum){
        cout<<"IDK"<<endl;
    }
    else if(sum == sum1 && sum2 < sum){
        cout<<"IDK"<<endl;
    }
    else {
        cout << "IDK" << endl;
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1031 Clash of programmers
Contest
Brain booster #2
Language
C++17 (G++ 13.2.0)
Submit At
2024-03-06 15:40:40
Judged At
2024-11-11 03:41:36
Judged By
Score
20
Total Time
2ms
Peak Memory
540.0 KiB