/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 2ms 560.0 KiB
#2 Accepted 2ms 480.0 KiB
#3 Accepted 2ms 772.0 KiB
#4 Accepted 2ms 520.0 KiB
#5 Accepted 2ms 512.0 KiB
#6 Wrong Answer 3ms 476.0 KiB

Code

#include <iostream>
#include <string>
#include <unordered_map>

using namespace std;

int main() {
    string s;
    cin >> s;

    unordered_map<char, int> main; 
    for (char c : s) {
        main[c]++;
    }

    
    if (main['l'] >= 2 && main['e'] >= 2 && main['a'] >= 1 &&
        main['d'] >= 1 && main['i'] >= 2 && main['n'] >= 2 &&
        main['g'] >= 1 && main['u'] >= 1 && main['v'] >= 1 &&
        main['r'] >= 1 && main['s'] >= 1 && main['t'] >= 1 &&
        main['y'] >= 1) {
        cout << "Leading University" << endl;
    } else {
        cout << "Impossible" << endl;
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1024 Rearrange Character
Contest
Brain booster #2
Language
C++17 (G++ 13.2.0)
Submit At
2024-03-06 15:23:25
Judged At
2024-11-11 03:41:40
Judged By
Score
40
Total Time
3ms
Peak Memory
772.0 KiB