/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 2ms 324.0 KiB
#2 Accepted 2ms 320.0 KiB
#3 Wrong Answer 1ms 320.0 KiB

Code

#include<iostream>
using namespace std;
int main(){
    int n;
    cin>>n;
    char ch[n];
    int e=0,m=0,unknown=0;
    for(int i=0; i<n; i++){
        cin>>ch[i];
        if(ch[i]=='M'){
            m++;
        }
        else if(ch[i]=='E'){
            e++;
        }
        else if(ch[i]=='?'){
            unknown=1;
        }
    }
    if(e>m && !unknown){
        cout<<"Emon"<<endl;
    }
    else if(m>e && !unknown){
        cout<<"Mahfuz"<<endl;
    }
    else if(unknown|| m==e){
        cout<<"IDK"<<endl;
    }
return 0;
}

Information

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